Bug 1196502
| Summary: | Command hammer --version fails (for gutterball module) | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Sachin Ghai <sghai> |
| Component: | Hammer | Assignee: | Adam Price <adprice> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Sachin Ghai <sghai> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | Nightly | CC: | bbuckingham, bkearney, dlobatog, lzap, sthirugn, tstrachota |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://projects.theforeman.org/issues/10791 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-08-12 16:03:23 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: | |||
| Bug Depends On: | 1190013 | ||
| Bug Blocks: | 1193969 | ||
*** Bug 1201687 has been marked as a duplicate of this bug. *** The version is actually defined in the code so it should be just matter of requiring 'version.rb' from the top plugin file. hammer-cli-gutterball no longer gives a stacktrace, but just says unknown version. still a bug. Created redmine issue http://projects.theforeman.org/issues/10791 from this bug Delivered in Snap10 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 ~]#
This bug was fixed in Satellite 6.1.1 which was delivered on 12 August, 2015. |
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: