Bug 1105535

Summary: hammer_cli_katello slows hammer start-up significantly
Product: Red Hat Satellite Reporter: Matej Kollar <mkollar>
Component: HammerAssignee: Adam Price <adprice>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: NightlyCC: bbuckingham, bkearney
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-07 13:51:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matej Kollar 2014-06-06 10:58:59 UTC
Description of problem: Hammer is slow, in partiluar its start phase. This is however not caused by hammer itself, but by hammer_cli_katello. Adding debug prints to part of code that loads modules, it shows:

  X pre loading module hammer_cli_import: Fri Jun 06 06:49:01 -0400 2014
  X post loading module hammer_cli_import: Fri Jun 06 06:49:01 -0400 2014
  X pre loading module hammer_cli_katello: Fri Jun 06 06:49:01 -0400 2014
  X post loading module hammer_cli_katello: Fri Jun 06 06:49:06 -0400 2014
  X pre loading module hammer_cli_foreman: Fri Jun 06 06:49:06 -0400 2014
  X post loading module hammer_cli_foreman: Fri Jun 06 06:49:06 -0400 2014


How reproducible: always deterministic


Steps to Reproduce: Just run hammer

Actual results: It takes some time before it prints help message (4-5 seconds)

Expected results: For user this is instantaneous.

Additional info: It looks like it does some requests on server in this phase before initialize for particular subcommand is called. (Sometimes even emits 404).

Comment 1 RHEL Program Management 2014-06-06 11:13:57 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 4 Adam Price 2015-06-25 18:08:54 UTC
With six hammer modules enabled (included hammer-cli-katello), I'm getting roughly 2.5 seconds of time between pressing enter and the command finishing. Is this amount of time still unacceptable? It is an improvement over 4-5 seconds.

$ time hammer --version
hammer (0.2.0)
 * hammer_cli_console (0.0.1)
 * hammer_cli_foreman (0.1.4.13)
 * hammer_cli_foreman_bootdisk (0.1.3)
 * hammer_cli_foreman_tasks (0.0.6)
 * hammer_cli_gutterball (1.0.0)
 * hammer_cli_katello (0.0.14)

real    0m2.443s
user    0m2.107s
sys     0m0.299s

Comment 6 Bryan Kearney 2016-10-07 13:51:27 UTC
Marking this as a dupe of a bug which has a fix.

*** This bug has been marked as a duplicate of bug 1122810 ***