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.
Created from redmine issue https://projects.theforeman.org/issues/28541
Upstream bug assigned to mshira
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28541 has been resolved.
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.
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.
Verified for RHEV using similar steps. Will verify the whole BZ once I test with VMWare tomorrow.
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.
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