Bug 1665780

Summary: hammer host create Error: Found more than one compute_profile
Product: Red Hat Satellite Reporter: Ram Nainsingh Tiruwa <ramsingh>
Component: Hammer - ContentAssignee: Martin Bacovsky <mbacovsk>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: akarsale, apatel, chris.snell, dhlavacd, egolov, kgaikwad, mbacovsk, mhulan, mshira, rabajaj, ramsingh, roarora
Target Milestone: 6.5.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-hammer_cli_katello-0.16.0.5-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:39:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ram Nainsingh Tiruwa 2019-01-14 01:44:44 UTC
hammer host create --compute-resource <resource-name> --compute-profile <profile-name>

RedHat Satellite 6.4


hammer  host create --build true --managed true --location='Default location' --organization="Default Organization" --provision-method build --name test1.beaker.local --hostgroup hostgroup1 --ip 192.168.100.57 --compute-profile libvirt


Actual results:
hammer  host create --build true --managed true --location="Default Location" --organization="Default Organization" --provision-method build --name test1.beaker.local --hostgroup hostgroup1 --ip 192.168.100.57 --compute-profile libvirt

Could not create the host:
  Error: Found more than one compute_profile.


Expected results:

Host created.


Additional info: using --compute-profile-id host is created.

hammer  host create --build true --managed true --location="Default Location" --organization="Default Organization" --provision-method build --name test1local --hostgroup hostgroup1 --ip 192.168.100.57 --compute-profile-id 1
Host created.

Comment 3 Bryan Kearney 2019-01-14 08:38:30 UTC
Upstream bug assigned to cfouant

Comment 4 Bryan Kearney 2019-01-14 08:38:31 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24316 has been resolved.

Comment 6 Martin Bacovsky 2019-01-14 17:46:46 UTC
Ram Nayan Singh,

could you please share debug output of the command? It should help us to see what was returned from the server during the command execution?

Regards,
Martin

Comment 9 Martin Bacovsky 2019-01-15 15:07:46 UTC
Ram Singh,

thanks for the logs it helped. 

I can see two problems here. The first problem seems to be --compute-profile libvirt where libvirt is not a existing compute profile name but rather compute resource probably. From the logs I can see the valid profile names would be profile1, profile2 and 3-Large.

The other problem is a bug in hammer that prevents hammer from finding the correct profile by name.
The cause is that building of the search arguments is unintentionally modified by Katello plugin for hammer.
Updating the component.

Comment 10 Bryan Kearney 2019-01-15 15:12:23 UTC
Upstream bug assigned to mbacovsk

Comment 11 Bryan Kearney 2019-01-15 15:12:25 UTC
Upstream bug assigned to mbacovsk

Comment 12 Bryan Kearney 2019-01-15 15:13:20 UTC
Upstream bug assigned to mbacovsk

Comment 13 Bryan Kearney 2019-01-15 15:13:21 UTC
Upstream bug assigned to mbacovsk

Comment 14 Bryan Kearney 2019-01-15 15:14:21 UTC
Upstream bug assigned to mbacovsk

Comment 15 Bryan Kearney 2019-01-15 15:14:22 UTC
Upstream bug assigned to mbacovsk

Comment 16 Bryan Kearney 2019-01-15 15:15:22 UTC
Upstream bug assigned to mbacovsk

Comment 17 Bryan Kearney 2019-01-15 15:15:23 UTC
Upstream bug assigned to mbacovsk

Comment 18 Bryan Kearney 2019-01-15 23:03:23 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24750 has been resolved.

Comment 19 Bryan Kearney 2019-01-15 23:04:41 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24750 has been resolved.

Comment 20 Bryan Kearney 2019-01-15 23:05:12 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24750 has been resolved.

Comment 21 Bryan Kearney 2019-01-15 23:06:16 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24750 has been resolved.

Comment 23 Roman Plevka 2019-03-13 10:34:04 UTC
VERIFIED
on sat6.5.0-19

the host can be successfully created by providing a compute-profile name

# hammer host create --build true --managed true --location MFZSePFwoR --organization MrWZyXcBJP --provision-method build --name test1 --ip 192.168.100.57 --hostgroup IOXDzanmfm --compute-profile 1-Small --mac de:ad:be:ea:ae:aa
Host created.

Comment 25 errata-xmlrpc 2019-05-14 12:39:53 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-2019:1222