Bug 1679225 - Unable to build VM with bootdisk option using hammer-cli-foreman
Summary: Unable to build VM with bootdisk option using hammer-cli-foreman
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API
Version: 6.4.2
Hardware: x86_64
OS: Linux
unspecified
high vote
Target Milestone: 6.6.0
Assignee: satellite6-bugs
QA Contact: Jitendra Yejare
URL: https://projects.theforeman.org/issue...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-20 16:10 UTC by Chris Roberts
Modified: 2019-10-22 12:47 UTC (History)
12 users (show)

Fixed In Version: foreman-1.21.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-22 12:47:16 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 26099 'Normal' 'Resolved' 'Unable to build VM with bootdisk option using hammer-cli-foreman' 2019-12-06 09:30:55 UTC
Github theforeman hammer-cli-foreman pull 410 'None' 'closed' 'Fixes #26099 - Add bootdisk back to params' 2019-12-06 09:30:54 UTC
Red Hat Product Errata RHSA-2019:3172 None None None 2019-10-22 12:47:28 UTC

Description Chris Roberts 2019-02-20 16:10:22 UTC
Description of problem:
Trying to build a vm with hammer using bootdisk build method returns the following:

Error: Option '--provision-method': Value must be one of 'build', 'image'..

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

Satellite 6.4.2
Foreman-1.18.0.40
tfm-rubygem-hammer_cli-0.13.1.1-1.el7sat.noarch
tfm-rubygem-hammer_cli_katello-0.13.4.3-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3.3-3.el7sat.noarch
tfm-rubygem-hammer_cli_foreman-0.13.2.3-1.el7sat.noarch

How reproducible:


Steps to Reproduce:
1. Install Satellite 6.4.z
2. Setup hostgroup/compute resource/profile
3. Try to build vm with bootdisk

Actual results:

Error: Option '--provision-method': Value must be one of 'build', 'image'..

Expected results:

VM to build correctly

Additional info:

Patch here:

https://github.com/chris1984/hammer-cli-foreman/commit/a5734584598433f4d7071abc1b2b9fc871a2698b.patch

Comment 5 Bryan Kearney 2019-02-22 17:07:34 UTC
Upstream bug assigned to chrobert@redhat.com

Comment 6 Lukas Zapletal 2019-04-25 13:11:02 UTC
The problem was fixed in Foreman 1.21 and will be part of Satellite 6.6.

https://projects.theforeman.org/issues/25717

Comment 7 Bryan Kearney 2019-04-25 16:07:38 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/26099 has been resolved.

Comment 8 Jitendra Yejare 2019-06-13 08:48:56 UTC
Verified!

@ Satellite 6.6 snap 6

Steps:
----------
1. Installed Satellite.
2. Setup hostgroup/compute resource/profile.
3. Provision a vm with bootdisk option from hammer.


Observation:
--------------

# hammer host create --name vmhammer --compute-resource-id 1 --hostgroup-id 1 --location-id 2 --organization-id 1  --root-password dog8code --compute-profile-id 4 --provision-method bootdisk
Could not create the host

# curl -u admin:changeme -X GET --header "Content-Type:application/json" https://satellite/api/v2/hosts/7 --insecure

{"ip":"xx.xx.xx.xx","ip6":null,"environment_id":1, "name":"vmhammer.hostname.com", "environment_name":"production","last_report":null,"realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":1,"domain_name":"hostname.com","architecture_id":1,"architecture_name":"x86_64","operatingsystem_id":1,"operatingsystem_name":"RedHat 7.6","subnet_id":2,"subnet_name":"vmware_subnet","subnet6_id":null,"subnet6_name":null,"sp_subnet_id":null,"ptable_id":102,"ptable_name":"Kickstart default","medium_id":null,"medium_name":null,"pxe_loader":"PXELinux BIOS","build":true,"comment":null,"disk":null,"installed_at":null,"model_id":null,"hostgroup_id":1,"owner_id":4,"owner_name":"Admin User","owner_type":"User","enabled":true,"managed":true,"use_image":null,"image_file":"","uuid":"501ef0d7-8c40-b63b-1f9e-bc64fc6acb49","compute_resource_id":1,"compute_resource_name":"vmware_cr","compute_profile_id":4,"compute_profile_name":"vm_cp","capabilities":["build","image","bootdisk"],"provision_method":"bootdisk"}


Note:
------
1. Please ignore the stdout of hammer create as 'Could not create the host', its puppet issue in my setup. The host successfully provisioned even though this error displayed.
2. Some of the fields i hided from curl output for security reason and bigger output.

Comment 11 errata-xmlrpc 2019-10-22 12:47:16 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:3172


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