Bug 1576742

Summary: undefined method `each_with_object' for nil:NilClass on creating a virt-who config for libvirt
Product: Red Hat Satellite Reporter: Roman Plevka <rplevka>
Component: Virt-who Configure PluginAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact: satellite-doc-list
Priority: unspecified    
Version: 6.4CC: ehelms, mhulan, tstrachota
Target Milestone: 6.4.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman_virt_who_configure-0.2.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 19:25:18 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 Roman Plevka 2018-05-10 10:04:07 UTC
Description of problem:
whenever i try to create a config for a libvirt hypervisor (ui or cli) I get the following ISE:

Oops, we're sorry but something went wrong undefined method `each_with_object' for nil:NilClass

- i have a libvirt deployed on the same server as satellite. I doublechecked I'm able to remotely connect to the hypervisor using qemu+tcp


# hammer virt-who-config create --name virtfoo --satellite-url satfqdn.com --organization-id=1 --location-id=2 --hypervisor-username=admin --hypervisor-type=libvirt --hypervisor-server=qemu+tcp://satfqdn.com/system --hypervisor-id=hostname --interval=120 --filtering-mode=none

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

Steps to Reproduce:
1. setup libvirt hypervisor to listen on all interfaces
2. o nsatellite: try to add a virt-who config pointing to the hypervisor

Actual results:
Oops, we're sorry but something went wrong undefined method `each_with_object' for nil:NilClass

Expected results:
config created or a human-readable message is generated if i missed anything

Comment 3 Marek Hulan 2018-05-18 13:42:32 UTC
Created redmine issue http://projects.theforeman.org/issues/23641 from this bug

Comment 4 Roman Plevka 2018-07-17 10:00:42 UTC
VERIFIED
on sat6.4.0-12

the virt-who config can now be created using both - UI and CLI.


# hammer virt-who-config create --name virtfoo --satellite-url satfqdn.com --organization-id=1 --location-id=2 --hypervisor-username=admin --hypervisor-type=libvirt --hypervisor-server=qemu+tcp://$(hostname)/system --hypervisor-id=hostname --interval=120 --filtering-mode=none
Virt Who configuration [virtfoo] created
[root@tyan-gt24-12 ~]# hostname
hostname-abc-42.foo.bar.com

Comment 5 Bryan Kearney 2018-10-16 19:25:18 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-2018:2927