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 1785620 - [Hammer] host creation using hostgroup fails
Summary: [Hammer] host creation using hostgroup fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources
Version: 6.7.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: 6.7.0
Assignee: Shira Maximov
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-20 13:19 UTC by Kavita
Modified: 2020-04-14 13:28 UTC (History)
5 users (show)

Fixed In Version: tfm-rubygem-hammer_cli_foreman-0.19.6.1-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 13:28:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 28541 0 High Closed [Hammer] host creation using hostgroup fails 2020-03-16 09:31:22 UTC
Red Hat Product Errata RHSA-2020:1454 0 None None None 2020-04-14 13:28:19 UTC

Description Kavita 2019-12-20 13:19:34 UTC
Description

Recently, image-id removed from compute-attributes while creating host and instead now user needs to pass --image-id option while creating a host.
However host creation fails when user selects hostgroup.

How Reproducible:
-------------------
Always

Steps:
-------------------

hammer host create --name gceHammered3 --organization-id 1 --location-id 2 --hostgroup-id 1 --provision-method 'image' --volume 'size_gb=13' --managed true --compute-attributes 'machine_type=g1-small,network=default,associate_external_ip=true' --image-id 1 
Could not create the host:
  Missing arguments for 'id'

Actual Behaviour:
-------------------
Host create command gives a failure for 'id'.

Expected Behaviour:
--------------------
1. The host should be provisioned


Note that when I try to send "image-id" key-value inside --compute-attributes and removed --image-id option, I am able to provision a host.

Comment 1 Kavita 2019-12-20 13:19:39 UTC
Created from redmine issue https://projects.theforeman.org/issues/28541

Comment 6 Bryan Kearney 2019-12-31 13:04:36 UTC
Upstream bug assigned to mshira

Comment 7 Bryan Kearney 2019-12-31 13:04:38 UTC
Upstream bug assigned to mshira

Comment 9 Bryan Kearney 2020-01-16 15:04:46 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28541 has been resolved.

Comment 11 Jitendra Yejare 2020-01-21 10:52:00 UTC
Verified for GCE!

@Satellite 6.7 snap 9


Steps:
--------------

# hammer host create --name gceHammered3 --organization-id 1 --location-id 2 --hostgroup-id 1 --provision-method 'image' --volume 'size_gb=13' --managed true --compute-attributes 'machine_type=g1-small,network=default,associate_external_ip=true' --image-id 1
Host created.


Observation:
------------------
This time(snap 9), the image-id option just works perfectly fine along with the host group and without passing UUID of an image in computing attributes.


Note:
-----------------
The BZ status of Verification is dependent on other Compute Resources results and behaviors.

Comment 12 vijsingh 2020-01-21 10:56:12 UTC
Verified for AzureRM:


Steps:

____________________________
[root@qe-sat6-bm1 ~]# hammer host create --name hammerclihg2 --hostgroup HG1 --location-id 2 --organization-id 1 --image img_ft --provision-method image --operatingsystem-id 1
Host created.

[root@qe-sat6-bm1 ~]# hammer host create --name hammerclihg3 --hostgroup HG1 --location-id 2 --organization-id 1 --image img_ud --provision-method image --operatingsystem-id 1 --root-password dog8code
Host created.


[root@qe-sat6-bm1 ~]# hammer host create --name hammerclihg6 --hostgroup HG2 --location-id 2 --organization-id 1 --image img_ud --provision-method image --compute-profile-id 1  --operatingsystem-id 1 --root-password dog8code
Host created.
____________________________

Observation:
 - Able to provision VM using HG with '--image-id' option and without passing any UUID of an image in compute_attributes.

Comment 13 Lukáš Hellebrandt 2020-01-21 15:30:57 UTC
Verified for RHEV using similar steps.

Will verify the whole BZ once I test with VMWare tomorrow.

Comment 14 Lukáš Hellebrandt 2020-01-22 14:56:36 UTC
Verified also with VMWare, using Sat 6.7 snap 10. Also tested PXE based provisioning for regressions and found none. Together, we verified this BZ for 4 different CR types which is enough.

Comment 18 errata-xmlrpc 2020-04-14 13:28:08 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-2020:1454


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