Bug 1744515

Summary: VIrt-who reported hypervisors tasks are failing with exception(undefined method `[]' for nil:NilClass)
Product: Red Hat Satellite Reporter: Satyajit Das <sadas>
Component: CandlepinAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: bcourt, bkearney, jturel, zhunting
Target Milestone: 6.6.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: candlepin-2.6.9-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 12:47:55 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:
Bug Depends On: 1746912    
Bug Blocks:    
Attachments:
Description Flags
Foreman-tail logs collected during virt-who execution.
none
verification screenshot none

Description Satyajit Das 2019-08-22 10:15:59 UTC
Created attachment 1606912 [details]
Foreman-tail logs collected during virt-who execution.

Description of problem:

Virt-who was reporting the correct host-to-guest mapping to the satellite server till Satellite 6.5, recently I have upgraded to satellite 6.6 Beta and the hypervisor task are failing with exception (undefined method `[]' for nil:NilClass (NoMethodError)), However virt-who -od completed successfully without exception.

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

satellite-6.6.0-5.beta.el7sat.noarch
virt-who-0.24.7-1.el7.noarch

How reproducible:

100%

Steps to Reproduce:
1. Restarted the virt-who service on the satellite server.
2. The execution completed successfully on the satellite server. 
3. The task ended with exception.
4. However In the Satellite web-UI-> Infrastructure ->  Virt-who Configurations-> Status got updated.

Actual results:

The Hypervisors task failed with the exception undefined method `[]' for nil:NilClass

Expected results:
The Hypervisors task should completed successfully.

Additional info:

Attached the task export and the forman-tail logs for analysis.

Comment 16 jcallaha 2019-09-30 16:12:05 UTC
Verified in Satellite 6.6 Snap 22.

Followed the reproducer steps, registering the hypervisor to the Satellite, setting up virt-who, then kicking off the report with --one-shot.

The report was sent, received, and processed correctly.

See below and attached screenshot for verification.

[root@infra-satellite-test-02 ~]# virt-who --one-shot
2019-09-30 11:54:13,960 [virtwho.rhsm_log INFO] MainProcess(3994):MainThread @config.py:init_config:1499 - [virt-who-config-1]: The original server URL was incomplete. It has been enhanced to https://infra-rhvm-02.infra.sat.rdu2.redhat.com:443/ovirt-engine/
2019-09-30 11:54:13,960 [virtwho.rhsm_log WARNING] MainProcess(3994):MainThread @config.py:init_config:1499 - [virt-who-config-1]: Ignoring unknown configuration option "env"
2019-09-30 11:54:13,960 [virtwho.rhsm_log INFO] MainProcess(3994):MainThread @executor.py:__init__:54 - Using config named 'virt-who-config-1'
2019-09-30 11:54:13,960 [virtwho.rhsm_log INFO] MainProcess(3994):MainThread @main.py:main:162 - Using configuration "virt-who-config-1" ("rhevm" mode)
2019-09-30 11:54:13,960 [virtwho.rhsm_log INFO] MainProcess(3994):MainThread @main.py:main:164 - Using reporter_id='<my.sat.host>-836ceb3aa4a290c11d28cb294429e2b3'
2019-09-30 11:54:14,469 [virtwho.main INFO] MainProcess(3994):Thread-2 @virt.py:_send_data:969 - Report for config "virt-who-config-1" gathered, placing in datastore
2019-09-30 11:54:14,975 [virtwho.destination_7104292601389126570 INFO] MainProcess(3994):Thread-3 @virt.py:_send_data:639 - Hosts-to-guests mapping for config "virt-who-config-1": 2 hypervisors and 5 guests found
2019-09-30 11:54:14,976 [virtwho.destination_7104292601389126570 INFO] MainProcess(3994):Thread-3 @virt.py:_send_data:670 - Sending updated Host-to-guest mapping to "Default_Organization" including 2 hypervisors and 5 guests
2019-09-30 11:54:14,976 [virtwho.destination_7104292601389126570 INFO] MainProcess(3994):Thread-3 @subscriptionmanager.py:_connect:155 - X-Correlation-ID: a06c935df3d04dfa9646f3b18bae0542

Comment 17 jcallaha 2019-09-30 16:12:34 UTC
Created attachment 1621235 [details]
verification screenshot

Comment 19 errata-xmlrpc 2019-10-22 12:47:55 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