Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1198245 - Command hammer --version fails (for discovery module)
Command hammer --version fails (for discovery module)
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: Unused
Assigned To: orabin
jaudet
http://projects.theforeman.org/issues...
: Triaged
: 1201686 (view as bug list)
Depends On: 1190013
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-03 11:05 EST by Lukas Pramuk
Modified: 2017-02-23 15:24 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-12 01:28:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 9746 None None None 2016-04-22 12:03 EDT
Red Hat Product Errata RHSA-2015:1592 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 05:04:35 EDT

  None (edit)
Description Lukas Pramuk 2015-03-03 11:05:25 EST
Description of problem:
hammer --version fails with undefined method `version' for HammerCLIForemanDiscovery:Module.
This time the error is caused by foreman_discovery module.

Version-Release number of selected component (if applicable):
Satellite-6.1.0-RHEL-6-20150302.0
rubygem-hammer_cli_foreman_discovery-0.0.1.2-1.el6_6sat.noarch
rubygem-hammer_cli_foreman-0.1.4.6-1.el6_6sat.noarch
rubygem-hammer_cli-0.1.4.3-1.el6_6sat.noarch

How reproducible:
100'/.

Steps to Reproduce:
0. Currently the other modules have issues with version method too - we need to enable only related module(s), disable the others:
# sed -i 's|true|false|' /etc/hammer/cli.modules.d/*.yml
# sed -i 's|false|true|' /etc/hammer/cli.modules.d/foreman{,_discovery}.yml

1.# hammer --version 
hammer (0.1.4)
 * hammer_cli_foreman (0.1.4.6)
Error: undefined method `version' for HammerCLIForemanDiscovery:Module

Actual results:
fails with an error

Expected results:
shows module versions
Comment 1 RHEL Product and Program Management 2015-03-03 15:19:09 EST
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 3 Lukas Zapletal 2015-03-10 12:56:05 EDT
We should include this fix in the next rebase as well, Ori. Can you investigate please?
Comment 4 Lukas Zapletal 2015-03-13 08:46:44 EDT
*** Bug 1201686 has been marked as a duplicate of this bug. ***
Comment 5 Tomas Strachota 2015-03-13 15:08:11 EDT
The version is actually defined in the code so it should be just matter of requiring 'version.rb' from the top plugin file.
Comment 6 Bryan Kearney 2015-03-16 12:05:53 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/9746 has been closed
-------------
Dominic Cleal
Applied in changeset commit:hammer-discovery|890b2af80448c238193ff7b614fe46184e7adddb.
Comment 9 jaudet 2015-03-30 12:56:50 EDT
Tested against Satellite-6.1.0-RHEL-6-20150324.0 and Satellite-6.1.0-RHEL-7-20150324.0:

    # cd /etc/hammer/cli.modules.d/
    # grep -i 'enable_module' *.yml | column -t
    foreman_bootdisk.yml:   :enable_module:  true
    foreman_discovery.yml:  :enable_module:  true
    foreman.yml:            :enable_module:  true
    gutterball.yml:         :enable_module:  true
    import.yml:             :enable_module:  true
    katello.yml:            :enable_module:  true
    # sed -i -e 's/enable_module: true/enable_module: false/' *.yml
    # sed -i -e 's/enable_module: false/enable_module: true/' foreman{,_discovery}.yml
    # hammer --version
    hammer (0.1.4.8)
    * hammer_cli_foreman (0.1.4.7)
    * hammer_cli_foreman_discovery (0.0.1.4)
    # sed -i -e 's/enable_module: false/enable_module: true/' *.yml
    # hammer --version
    hammer (0.1.4.8)
    * hammer_cli_foreman (0.1.4.7)
    * hammer_cli_foreman_bootdisk (0.1.2.5)
    * hammer_cli_foreman_discovery (0.0.1.4)
    * hammer_cli_gutterball (unknown version)
    * hammer_cli_import (0.10.6.3)
    * hammer_cli_katello (0.0.7.5)
Comment 10 Bryan Kearney 2015-08-11 09:31:26 EDT
This bug is slated to be released with Satellite 6.1.
Comment 11 errata-xmlrpc 2015-08-12 01:28:33 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1592

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