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 1198245 - Command hammer --version fails (for discovery module)
Summary: Command hammer --version fails (for discovery module)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: orabin
QA Contact: jaudet
URL: http://projects.theforeman.org/issues...
Whiteboard:
: 1201686 (view as bug list)
Depends On: 1190013
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-03 16:05 UTC by Lukas Pramuk
Modified: 2017-02-23 20:24 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 05:28:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 9746 0 Normal Closed Command hammer --version fails (for discovery module) 2021-01-05 18:33:31 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 1196502 0 medium CLOSED Command hammer --version fails (for gutterball module) 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2015:1592 0 normal SHIPPED_LIVE Important: Red Hat Satellite 6.1.1 on RHEL 6 2015-08-12 09:04:35 UTC

Internal Links: 1192113 1196502

Description Lukas Pramuk 2015-03-03 16:05:25 UTC
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 Program Management 2015-03-03 20:19:09 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 3 Lukas Zapletal 2015-03-10 16:56:05 UTC
We should include this fix in the next rebase as well, Ori. Can you investigate please?

Comment 4 Lukas Zapletal 2015-03-13 12:46:44 UTC
*** Bug 1201686 has been marked as a duplicate of this bug. ***

Comment 5 Tomas Strachota 2015-03-13 19:08:11 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 6 Bryan Kearney 2015-03-16 16:05:53 UTC
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 16:56:50 UTC
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 13:31:26 UTC
This bug is slated to be released with Satellite 6.1.

Comment 11 errata-xmlrpc 2015-08-12 05:28:33 UTC
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.