Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1196502 - Command hammer --version fails (for gutterball module)
Summary: Command hammer --version fails (for gutterball module)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: Nightly
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: Adam Price
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Whiteboard:
: 1201687 (view as bug list)
Depends On: 1190013
Blocks: 1193969
TreeView+ depends on / blocked
 
Reported: 2015-02-26 05:59 UTC by Sachin Ghai
Modified: 2017-02-23 20:26 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 16:03:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 10791 0 None None None 2016-04-22 15:43:23 UTC
Red Hat Bugzilla 1192113 0 unspecified CLOSED Command hammer --version fails (for bootdisk module) 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1198245 0 unspecified CLOSED Command hammer --version fails (for discovery module) 2021-02-22 00:41:40 UTC

Internal Links: 1192113 1198245

Description Sachin Ghai 2015-02-26 05:59:32 UTC
Description of problem:
while executing hammer -v -d --version, getting following error:

hammer (0.1.4)
 * hammer_cli_foreman (0.1.4)
[ERROR 2015-02-26 00:50:04 Exception] Error: undefined method `version' for HammerCLIGutterball:Module
Error: undefined method `version' for HammerCLIGutterball:Module
[ERROR 2015-02-26 00:50:04 Exception] 

NoMethodError (undefined method `version' for HammerCLIGutterball:Module):
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/main.rb:23
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/main.rb:22:in `each'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/main.rb:22
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/abstract.rb:219:in `instance_exec'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/abstract.rb:219:in `option_version='
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/attribute/instance.rb:62:in `send'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/attribute/instance.rb:62:in `take'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/option/parsing.rb:32:in `parse_options'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:53:in `parse'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:31:in `parse'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:23:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:126:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/bin/hammer:108
    /usr/bin/hammer:19:in `load'
    /usr/bin/hammer:19



Version-Release number of selected component (if applicable):
recent nightly

gutterball-1.0.12-1.el6.noarch
gutterball-certs-1.0-1.noarch
rubygem-hammer_cli_gutterball-0.0.1-1.201502202351git7ddb8f2.git.0.87f367e.el6.noarch
ruby193-rubygem-foreman_gutterball-0.0.1-1.git.0.d844c08.el6.noarch

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
should not throw exception

Additional info:

Comment 2 Lukas Zapletal 2015-03-13 12:46:18 UTC
*** Bug 1201687 has been marked as a duplicate of this bug. ***

Comment 3 Tomas Strachota 2015-03-13 19:08:04 UTC
The version is actually defined in the code so it should be just matter of requiring 'version.rb' from the top plugin file.

Comment 4 Adam Price 2015-06-11 18:52:52 UTC
hammer-cli-gutterball no longer gives a stacktrace, but just says unknown version.

still a bug.

Comment 5 Adam Price 2015-06-11 20:34:54 UTC
Created redmine issue http://projects.theforeman.org/issues/10791 from this bug

Comment 8 Bryan Kearney 2015-06-26 14:32:51 UTC
Delivered in Snap10

Comment 9 Sachin Ghai 2015-07-08 07:28:18 UTC
Verified with sat6.1.1 snap11 c2.

I can see "hammer -v -d --version" version without any exception.

[root@cloud-qe ~]# rpm -qa | grep gutterball
gutterball-certs-1.0-1.noarch
gutterball-1.0.15.0-1.el7.noarch
rubygem-hammer_cli_gutterball-0.0.1.3-1.el7sat.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el7sat.noarch


[root@cloud-qe ~]# hammer -v -d --version
[ INFO 2015-07-08 03:24:59 Init] Initialization of Hammer CLI (0.1.4.11) has started...
[DEBUG 2015-07-08 03:24:59 Init] Running at ruby 2.0.0-p598
[ INFO 2015-07-08 03:24:59 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2015-07-08 03:24:59 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2015-07-08 03:24:59 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_bootdisk.yml has been loaded
[ INFO 2015-07-08 03:24:59 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_discovery.yml has been loaded
[ INFO 2015-07-08 03:24:59 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_docker.yml has been loaded
[ INFO 2015-07-08 03:24:59 Init] Configuration from the file /etc/hammer/cli.modules.d/gutterball.yml has been loaded
[ INFO 2015-07-08 03:24:59 Init] Configuration from the file /etc/hammer/cli.modules.d/import.yml has been loaded
[ INFO 2015-07-08 03:24:59 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded
[DEBUG 2015-07-08 03:24:59 Connection] Registered: foreman
[DEBUG 2015-07-08 03:24:59 API] Global headers: {
        :content_type => "application/json",
              :accept => "application/json;version=2",
    "Accept-Language" => "en"
}
[ INFO 2015-07-08 03:24:59 Modules] Extension module hammer_cli_foreman (0.1.4.14) loaded
[ INFO 2015-07-08 03:24:59 Modules] Extension module hammer_cli_foreman_bootdisk (0.1.2.7) loaded
[ INFO 2015-07-08 03:24:59 Modules] Extension module hammer_cli_foreman_discovery (0.0.1.10) loaded
[ INFO 2015-07-08 03:24:59 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
[ INFO 2015-07-08 03:24:59 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
[ INFO 2015-07-08 03:24:59 Modules] Extension module hammer_cli_gutterball (0.0.1.3) loaded
[ INFO 2015-07-08 03:24:59 Modules] Extension module hammer_cli_import (0.10.18) loaded
[ INFO 2015-07-08 03:24:59 Modules] Extension module hammer_cli_katello (0.0.7.16) loaded
[DEBUG 2015-07-08 03:24:59 Init] Using locale 'en'
[DEBUG 2015-07-08 03:24:59 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/share/gems/gems/hammer_cli-0.1.4.11/locale'
[DEBUG 2015-07-08 03:24:59 Init] 'mo' files for locale domain 'hammer-cli@system' loaded from '/usr/share/locale'
[DEBUG 2015-07-08 03:24:59 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/share/gems/gems/hammer_cli_foreman-0.1.4.14/locale'
[DEBUG 2015-07-08 03:24:59 Init] 'mo' files for locale domain 'hammer-cli-foreman@system' loaded from '/usr/share/locale'
[DEBUG 2015-07-08 03:24:59 Init] 'mo' files for locale domain 'hammer_cli_foreman_docker' loaded from '/usr/share/gems/gems/hammer_cli_foreman_docker-0.0.3.9/locale'
[DEBUG 2015-07-08 03:24:59 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/usr/share/gems/gems/hammer_cli_katello-0.0.7.16/locale'
hammer (0.1.4.11)
 * hammer_cli_foreman (0.1.4.14)
 * hammer_cli_foreman_bootdisk (0.1.2.7)
 * hammer_cli_foreman_discovery (0.0.1.10)
 * hammer_cli_foreman_docker (unknown version)
 * hammer_cli_gutterball (0.0.1.3)
 * hammer_cli_import (0.10.18)
 * hammer_cli_katello (0.0.7.16)
[root@cloud-qe ~]#

Comment 10 Bryan Kearney 2015-08-12 16:03:23 UTC
This bug was fixed in Satellite 6.1.1 which was delivered on 12 August, 2015.


Note You need to log in before you can comment on or make changes to this bug.