Bug 1278534 - hammer host create using RHEV should use text IDs, not UUIDs
hammer host create using RHEV should use text IDs, not UUIDs
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Compute Resources (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: Tomas Strachota
Katello QA List
: Triaged, UserExperience
Depends On:
  Show dependency treegraph
Reported: 2015-11-05 12:34 EST by Dirk Herrmann
Modified: 2017-01-13 14:44 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-01-13 14:44:21 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
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 12502 None None None 2016-04-22 11:11 EDT

  None (edit)
Description Dirk Herrmann 2015-11-05 12:34:30 EST
Description of problem:

Using RHEV as a a compute resource and following the documentation (https://gist.github.com/tstrachota/f7858388976f19317b73) for RHEV (oVirt) related options I can not create a host using hammer CLI. Using UI works fine.

Sample command:

hammer -d host create --name dhtesthost4 --organization ACME --location 'munich' --hostgroup-id 33 --compute-resource acme-rhev-munich --compute-attributes 'memory=2147483648,cores=2,start=true,cluster=COE_RHS' --root-password 'redhat2015' --volume="size_gb=25,storage_domain=EQL_RHEV34,bootable=true" --partition-table 'ptable-acme-os-rhel-server' --interface 'name=eth0,network=v96'

Tried with many combinations of parameters, with and without compute profiles. Error message does not explain why it fails (422 Unprocessable Entity).

While debugging it with the help of Og we've figured out that the command used while creating a host using the WebUI converts the RHEV specific attributes into UUIDs.

Using the UUIDs for network and storage the hammer command successfully creates a host:

hammer -u admin -p redhat host create --name='rhel-7-server-omaciel-02' --root-pass='abracadabra' --organization='ACME' --location=munich --hostgroup="omaciel" --compute-resource-id=1 --compute-attributes="cluster='6a9a01e7-ee59-4fe3-817a-54d85612c124', cpus=2, memory=2147483648, start=1" --interface="name=eth0, network='6337e786-f7ab-4d3b-901d-09346baf8278'" --volume="size_gb=25, storage_domain='cde2d7fb-9673-4361-845a-009c4e203d30', bootable=true"

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

How reproducible:

Steps to Reproduce:
1. Create a host using hammer with the first command mentioned above.
2. Check if the host has been created.
3. Try the second command (requires to adapt UUIDs)

Actual results:

Host is only created using the UUIDs

Expected results:

Host is created using the human readable parameter as used in the WebUI.

Additional info:
Comment 2 Brad Buckingham 2015-11-16 16:17:35 EST
Created redmine issue http://projects.theforeman.org/issues/12502 from this bug
Comment 3 Bryan Kearney 2015-11-16 18:03:55 EST
Upstream bug component is Provisioning
Comment 4 Bryan Kearney 2015-11-17 04:03:21 EST
Upstream bug component is Hammer
Comment 5 Bryan Kearney 2016-08-12 08:10:17 EDT
Upstream bug component is Hammer
Comment 6 Bryan Kearney 2016-08-26 06:11:08 EDT
Upstream bug component is Hammer
Comment 7 Bryan Kearney 2016-09-30 06:11:28 EDT
Upstream bug assigned to tstrachota@redhat.com
Comment 8 Bryan Kearney 2017-01-13 14:44:21 EST
This is an older bug which has been reported upstream. We are not going to track this bug downstream. When the upstream issue is resolved, the next build will contain the fix. Thank you.

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