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 - Hammer: undefined method `[]' for nil:NilClass
Summary: Hammer: undefined method `[]' for nil:NilClass
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - VMWare
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.9.0
Assignee: Yifat Makias
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-17 14:44 UTC by Lukáš Hellebrandt
Modified: 2021-04-21 13:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-21 13:12:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
foreman-tail.log (4.66 KB, text/plain)
2019-09-17 14:46 UTC, Lukáš Hellebrandt
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30552 0 Normal Closed Hammer: undefined method `[]' for nil:NilClass 2021-02-15 13:47:16 UTC

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


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