Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1317674 - hammer host-collection create fails with undefined local variable or method `option_host_ids'
hammer host-collection create fails with undefined local variable or method `...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity high (vote)
: Beta
: Unused
Assigned To: Brad Buckingham
sthirugn@redhat.com
http://projects.theforeman.org/issues...
: PrioBumpQA, Regression, Triaged
Depends On:
Blocks: 1214675
  Show dependency treegraph
 
Reported: 2016-03-14 16:31 EDT by Og Maciel
Modified: 2016-07-27 05:27 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 05:27:18 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 14365 None None None 2016-03-28 13:26 EDT
Red Hat Product Errata RHBA-2016:1501 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 08:28:58 EDT

  None (edit)
Description Og Maciel 2016-03-14 16:31:07 EDT
Description of problem:

The command hammer host-collection create is completely broken in latest 6.2.0 build:

hammer> host-collection create -h
Usage:
     host-collection create [OPTIONS]

Options:
 --description DESCRIPTION
 --host-collection-ids HOST_COLLECTION_IDS Array of host ids to replace the hosts in host collection
                                           Comma separated list of values.
 --hosts HOST_NAMES                        Comma separated list of values.
 --max-hosts MAX_HOSTS                     Maximum number of hosts in the host collection
 --name NAME                               Host Collection name
 --organization ORGANIZATION_NAME          Organization name to search by
 --organization-id ORGANIZATION_ID         organization ID
 --organization-label ORGANIZATION_LABEL   Organization label to search by
 --unlimited-hosts UNLIMITED_HOSTS         Whether or not the host collection may have unlimited hosts
                                           One of true/false, yes/no, 1/0.
 -h, --help                                print help
hammer> host-collection create --organization-id="1058" --name="dFJsRjkakviNeAv"
Could not create the host collection:
  Error: undefined local variable or method `option_host_ids' for #<HammerCLIKatello::HostCollection::CreateCommand:0x00000002f10700>

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

* Satellite 6.2.0 SNAP 3.1

How reproducible:


Steps to Reproduce:
1. Try to create a new host-collection via hammer
2.
3.

Actual results:


Expected results:


Additional info:
Comment 3 Brad Buckingham 2016-03-15 09:03:47 EDT
Created redmine issue http://projects.theforeman.org/issues/14203 from this bug
Comment 4 Bryan Kearney 2016-03-15 10:02:07 EDT
Upstream bug component is Content Management
Comment 5 Brad Buckingham 2016-03-15 10:50:21 EDT
hammer-cli-katello PR: https://github.com/Katello/hammer-cli-katello/pull/365
Comment 7 Og Maciel 2016-03-24 10:29:45 EDT
Talked to Brad Buckingham and though creation is working fine, we still see the same error showing up when we try to update a host-collection.

We then patched lib/hammer_cli_katello/host_collection.rb UpdateCommand with the same changes shown by https://github.com/Katello/hammer-cli-katello/pull/365/files and the problem was resolved. We decided that perhaps a thorough review of this specific module would be advisable, so I am keeping this issue as is and Brad will fix it.

Failed on Satellite 6.2.0 SNAP 5.1.
Comment 8 Brad Buckingham 2016-03-28 13:28:11 EDT
Adding some updates with http://projects.theforeman.org/issues/14365 .

Upstream hammer-cli-katello PR: https://github.com/Katello/hammer-cli-katello/pull/372

PR will allow user to provide 'hosts' or 'host_ids' as part of the host-collection 'create' or 'update' commands.
Comment 9 sthirugn@redhat.com 2016-04-07 08:48:12 EDT
Verified in satellite-6.2.0-6.2.beta.el7sat.noarch

hammer> host-collection create --organization-id=1 --name=newhostcollection 
Host collection created

But I did find an update error which I logged in https://bugzilla.redhat.com/show_bug.cgi?id=1324848
Comment 11 errata-xmlrpc 2016-07-27 05:27:18 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/RHBA-2016:1501

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