Bug 1076290

Summary: virt-who creat a null system in SAM server in esx mode
Product: Red Hat Enterprise Linux 7 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED ERRATA QA Contact: Li Bin Liu <liliu>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.0CC: liliu, ovasik, sgao, shihliu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-who-0.11-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 10:23:06 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 Liushihui 2014-03-14 03:07:17 UTC
Description of problem:
Configure virt-who in esx mode and set VIRTWHO_INTERVAL=2, keep virt-who running, then add an esx host to vCenter, it'll take few minutes for adding esx host finished, during this period, virt-who creat a null system in SAM server.

Version-Release number of selected component (if applicable):
subscription-manager-1.10.14-4.el7.x86_64
python-rhsm-1.10.12-1.el7.x86_64
virt-who-0.8-12.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. Configure virt-who in esx mode and set VIRTWHO_INTERVAL=2, start virt-who service.
2. Add an esx host to vCenter via vClient, it'll take few minutes to finished.
3. Check the log in /var/log/rhsm/rhsm.log and systems in SAM server.

Actual results:
null system has been added to SAM server. Please the the log info:
2014-03-14 10:58:14,035 [WARNING]  @virt-who.py:515 - Listening for events is not available in VDSM, ESX, RHEV-M or Hyper-V mode
2014-03-14 10:58:16,593 [DEBUG]  @virt-who.py:528 - Virt-who is running in esx mode
2014-03-14 10:58:16,593 [DEBUG]  @virt-who.py:535 - Starting infinite loop with 2 seconds interval and event handling
2014-03-14 10:58:21,837 [DEBUG]  @subscriptionmanager.py:109 - Sending update in hosts-to-guests mapping: {}
2014-03-14 10:58:29,450 [DEBUG]  @subscriptionmanager.py:109 - Sending update in hosts-to-guests mapping: {}
2014-03-14 10:58:37,870 [DEBUG]  @subscriptionmanager.py:109 - Sending update in hosts-to-guests mapping: {None: []}
2014-03-14 10:58:38,983 [INFO]  @virt-who.py:217 - Created host: null with guests: []
2014-03-14 10:58:46,530 [DEBUG]  @subscriptionmanager.py:109 - Sending update in hosts-to-guests mapping: {None: []}
2014-03-14 10:58:55,343 [DEBUG]  @subscriptionmanager.py:109 - Sending update in hosts-to-guests mapping: {44454c4c-4200-1034-8039-b8c04f503258: [4200ce86-d3dd-d5f5-dc84-d68f92482ae0, 42002108-4bd6-86da-6253-e10d2e9cdbdf]}
2014-03-14 10:58:56,090 [INFO]  @virt-who.py:217 - Created host: 44454c4c-4200-1034-8039-b8c04f503258 with guests: [4200ce86-d3dd-d5f5-dc84-d68f92482ae0, 42002108-4bd6-86da-6253-e10d2e9cdbdf]

Expected results:
There should be a check when created host in SAM server, null system should not be added.

Additional info:
As this problem has been fixed on the RHEL5.10,please see the detail :(https://bugzilla.redhat.com/show_bug.cgi?id=990957),
According to Radek's comment6 to create this bug to track it in the RHEL7

Comment 2 RHEL Program Management 2014-03-22 05:47:58 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 Radek Novacek 2014-09-11 10:47:55 UTC
This has been fixed by rebase to virt-who-0.11-1.el7, see bug 1122489.

Comment 6 Liushihui 2014-10-30 08:48:03 UTC
Verified it on virt-who-0.11-2.el7.noarch

Version-Release number of selected component (if applicable):
subscription-manager-1.13.5-1.el7.x86_64
python-rhsm-1.13.5-1.el7.x86_64
virt-who-0.11-2.el7.noarch

Verified steps:
1. Configure virt-who in esx mode and set VIRTWHO_INTERVAL=1, start virt-who service.
2. Add an esx host to vCenter via vClient
3. Check the log in /var/log/rhsm/rhsm.log, it hasn't shown any [NONE] system in the log,please see the detail as the following:
2014-10-30 16:42:49,091 [INFO]  @subscriptionmanager.py:116 - Sending update in hosts-to-guests mapping: {aee4ff00-8c33-11e2-994a-6c3be51d959a: []}
2014-10-30 16:42:49,739 [INFO]  @virtwho.py:164 - Created host: d2f8f7a5-e109-4791-85d3-02ce7e001c98 with guests: []
2014-10-30 16:42:56,687 [INFO]  @subscriptionmanager.py:116 - Sending update in hosts-to-guests mapping: {aee4ff00-8c33-11e2-994a-6c3be51d959a: [564d30c2-464f-81ad-1db6-6ec620dd7465]}
4. Open the SAM server web UI, it also hasn't shown a [NONE] system

Comment 8 errata-xmlrpc 2015-03-05 10:23:06 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://rhn.redhat.com/errata/RHSA-2015-0430.html