Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1752914

Summary: Hammer: undefined method `[]' for nil:NilClass
Product: Red Hat Satellite Reporter: Lukáš Hellebrandt <lhellebr>
Component: Compute Resources - VMWareAssignee: Yifat Makias <ymakias>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: chrobert, mhulan, mshira, ppochop
Target Milestone: 6.9.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 13:12:13 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:
Attachments:
Description Flags
foreman-tail.log none

Description Lukáš Hellebrandt 2019-09-17 14:44:31 UTC
Description of problem:
When creating a VMWare host through Hammer, I get an undefined method error. It is entirely possible that I'm doing something wrong but the error doesn't help me much. No traceback, foreman-tail attached.

Version-Release number of selected component (if applicable):
Reproduced on Sat 6.6 snap 20.

How reproducible:
Deterministic

Steps to Reproduce:
1.Run hammer host create command. I ran:
# hammer host create --compute-resource testvmware --lifecycle-environment Library --content-view "Default Organization View" --content-source "$(hostname)" --architecture x86_64 --location "Default Location" --organization "Default Organization" --name "lhellebr-hammer-thick-thick" --domain-id 1 --subnet-id 1 --root-password secretpassword --image vmware-image1 --operatingsystem "RedHat 7.7" --provision-method image --interface "compute_type=VirtualE1000,compute_network=dvportgroup-647,domain-id=1,subnet-id=1"

Actual results:
Could not create the host:
  Failed to create a compute testvmware (VMware) instance lhellebr-hammer-thick-thick.lab.eng.bos.redhat.com: undefined method `[]' for nil:NilClass

Expected results:
Host created successfully or some useful error.

Comment 3 Lukáš Hellebrandt 2019-09-17 14:46:51 UTC
Created attachment 1615880 [details]
foreman-tail.log

Comment 4 Marek Hulan 2019-09-17 15:55:36 UTC
Most likely compute attributes are not specified correctly, I totally agree the error message does not provide much insights. We should add some validation for bare minimum vm attributes.

Comment 6 Lukáš Hellebrandt 2019-09-18 13:01:48 UTC
This is not a regression from 6.5.

Comment 8 Shira Maximov 2020-08-03 15:52:33 UTC
Created redmine issue https://projects.theforeman.org/issues/30552 from this bug

Comment 9 Bryan Kearney 2020-08-30 12:03:58 UTC
Upstream bug assigned to ymakias

Comment 10 Bryan Kearney 2020-08-30 12:04:00 UTC
Upstream bug assigned to ymakias

Comment 11 Bryan Kearney 2020-11-16 12:04:15 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30552 has been resolved.

Comment 16 errata-xmlrpc 2021-04-21 13:12:13 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 (Moderate: Satellite 6.9 Release), 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-2021:1313