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 1529252 - hammer host create ignores --image-id
Summary: hammer host create ignores --image-id
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.2.12
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: 6.7.0
Assignee: satellite6-bugs
QA Contact: Akhil Jha
URL:
Whiteboard:
: 1571086 1755146 (view as bug list)
Depends On:
Blocks: 1316897 1633345
TreeView+ depends on / blocked
 
Reported: 2017-12-27 10:29 UTC by Beat Rubischon
Modified: 2023-09-07 19:01 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 15:54:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 6159 0 Normal Closed Updating image in compute resource doesn't update the image_id attribute in compute profiles 2020-12-22 11:25:45 UTC
Red Hat Knowledge Base (Solution) 4438341 0 None None None 2019-10-08 15:43:50 UTC
Red Hat Product Errata RHBA-2020:1455 0 None None None 2020-04-14 15:54:23 UTC

Description Beat Rubischon 2017-12-27 10:29:17 UTC
Description of problem:

Provisioning a new VMware based VM from an image using hammer ignores the parameter --image-id, the image from the compute profile is taken.

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

Satellite 6.2.12

How reproducible:

always

Steps to Reproduce:
1. Attach Satellite to vCenter
2. Store templates
3. Provision new machine

hammer host create \
  --name "${vm_hostname}" \
  --ip "${vm_ip}" \
  --organization-id "${orgid}" \
  --domain "${vm_domain}" \
  --subnet "${SubnetName}" \
  --location "${SubnetLocation}" \
  --hostgroup "${vm_hostgroup}" \
  --compute-resource-id "${compute_resource_id}" \
  --compute-profile-id "${compute_profile_id}" \
  --provision-method "image" --image-id "${vm_image_id}" --build true \
  --enabled true --managed true \
  --compute-attributes="cpus=${cpus},\
                        corespersocket=${corespersocket},\
                        cluster=${cluster},\
                        memory_mb=${memory_mb},\
                        guest_id=${ostype},\
                        scsi_controller_type=${scsi_controller_type},\
                        start=1" \
  --interface="managed=true,primary=true,provision=true,compute_name=eth0,\
               compute_type=${compute_type},\
               compute_network=${compute_network},\
               ip=${vm_ip}" \
  --volume="datastore=${datastore},\
            size_gb=${disksize_gb},\
            bootable=true,\
            name='Hard Disk'"

Actual results:

--image-id is ignored, image from --compute-profile-id is taken

Expected results:

--image-id is considered

Additional info:

Comment 8 Ivan Necas 2018-10-09 10:23:00 UTC
Connecting redmine issue https://projects.theforeman.org/issues/6159 from this bug

Comment 10 Shira Maximov 2018-12-23 09:27:10 UTC
*** Bug 1571086 has been marked as a duplicate of this bug. ***

Comment 11 Bryan Kearney 2019-05-20 10:06:03 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/6159 has been resolved.

Comment 12 Oleh Fedorenko 2019-10-08 15:43:51 UTC
*** Bug 1755146 has been marked as a duplicate of this bug. ***

Comment 13 Lukáš Hellebrandt 2020-02-28 12:47:59 UTC
Verified with Sat 6.7 snap 13.

Used reproducer from OP. Created a compute profile with image1, used hammer command with that compute profile and specified image2, image2 was used.

Comment 16 errata-xmlrpc 2020-04-14 15:54: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/RHBA-2020:1455


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