Bug 849915 - virt-who can't listen the events and can't send the updates to SAM server after adding/deleting/migrating guests.
virt-who can't listen the events and can't send the updates to SAM server aft...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: virt-who (Show other bugs)
5.9
Unspecified Unspecified
unspecified Severity urgent
: beta
: ---
Assigned To: Radek Novacek
Entitlement Bugs
: Regression, TestBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-21 04:31 EDT by Hui Wang
Modified: 2016-11-30 19:30 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-21 19:07:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hui Wang 2012-08-21 04:31:46 EDT
Description of problem:
When add/delete/migrate guests, the virt-who can't listen the events, and does not send the updates to SAM server. But it can send the current host/guest uuids info to SAM server if restart the virt-who service.

Version-Release number of selected component (if applicable):
virt-who-0.7-2.el5
subscription-manager-firstboot-1.0.13-1.el5
subscription-manager-1.0.13-1.el5
subscription-manager-gui-1.0.13-1.el5
python-rhsm-1.0.5-1.el5
katello-headpin-all-0.2.13-1.el6_2.noarch
candlepin-0.6.5-1.el6_2.noarch
ESX 5.0

How reproducible:

100%

Steps to Reproduce:
1. Config the virt-who config file
   # vi /etc/sysconfig/virt-who
    VIRTWHO_BACKGROUND=1 (enable debugging)
    VIRTWHO_DEBUG=1 (run in background)
    VIRTWHO_ESX=1
    VIRTWHO_ESX_OWNER=$OWNER
    VIRTWHO_ESX_ENV=$ENV
    VIRTWHO_ESX_SERVER=$IP
    VIRTWHO_ESX_USERNAME=Administrator
    VIRTWHO_ESX_PASSWORD=123qweP  
2. Start virt-who service
[root@localhost sysconfig]# service virt-who restart
Stopping virt-who:                                         [  OK  ]
Starting virt-who:                                         [  OK  ]
[root@localhost sysconfig]# /usr/lib64/python2.4/site-packages/rhsm/certificate.py:123: DeprecationWarning: Call to deprecated function: __init__
  category=DeprecationWarning)

3. Check the log in /var/log/rhsm/rhsm.log
# tail -f /var/log/rhsm/rhsm.log
...
2013-01-14 00:50:34,734 [WARNING]  @virt-who.py:413 - Listening for events is not available in VDSM or ESX mode
2013-01-14 00:50:39,528 [DEBUG]  @virt-who.py:428 - Virt-who is running in esx mode
2013-01-14 00:50:39,528 [DEBUG]  @virt-who.py:435 - Starting infinite loop with 3600 seconds interval and event handling
2013-01-14 00:50:40,852 [DEBUG]  @subscriptionmanager.py:89 - Sending update in hosts-to-guests mapping: {44454c4c-4c00-1031-8053-b8c04f4e3258: [422105c6-a599-939a-2c68-e93f3094c4d1], 44454c4c-4200-1034-8039-b8c04f503258: [422100fe-0e0c-477d-2638-a1f114e12ed1, 4221fd54-68f9-52ad-7ab9-0b7a7939ce7d]}
2013-01-14 00:50:41,103 [INFO]  @virt-who.py:197 - Updated host: 44454c4c-4c00-1031-8053-b8c04f4e3258 with guests: [422105c6-a599-939a-2c68-e93f3094c4d1]
2013-01-14 00:50:41,103 [INFO]  @virt-who.py:197 - Updated host: 44454c4c-4200-1034-8039-b8c04f503258 with guests: [422100fe-0e0c-477d-2638-a1f114e12ed1, 4221fd54-68f9-52ad-7ab9-0b7a7939ce7d]

4. Add/delete/migration guests, and check the log in /var/log/rhsm/rhsm.log.

 # tail -f /var/log/rhsm/rhsm.log
...
2013-01-14 00:50:34,734 [WARNING]  @virt-who.py:413 - Listening for events is not available in VDSM or ESX mode
2013-01-14 00:50:39,528 [DEBUG]  @virt-who.py:428 - Virt-who is running in esx mode
2013-01-14 00:50:39,528 [DEBUG]  @virt-who.py:435 - Starting infinite loop with 3600 seconds interval and event handling
2013-01-14 00:50:40,852 [DEBUG]  @subscriptionmanager.py:89 - Sending update in hosts-to-guests mapping: {44454c4c-4c00-1031-8053-b8c04f4e3258: [422105c6-a599-939a-2c68-e93f3094c4d1], 44454c4c-4200-1034-8039-b8c04f503258: [422100fe-0e0c-477d-2638-a1f114e12ed1, 4221fd54-68f9-52ad-7ab9-0b7a7939ce7d]}
2013-01-14 00:50:41,103 [INFO]  @virt-who.py:197 - Updated host: 44454c4c-4c00-1031-8053-b8c04f4e3258 with guests: [422105c6-a599-939a-2c68-e93f3094c4d1]
2013-01-14 00:50:41,103 [INFO]  @virt-who.py:197 - Updated host: 44454c4c-4200-1034-8039-b8c04f503258 with guests: [422100fe-0e0c-477d-2638-a1f114e12ed1, 4221fd54-68f9-52ad-7ab9-0b7a7939ce7d]

 ^^^^^^^^^^There are no changes.

  
Actual results:
When add/delete/migration guests, the virt-who can't listening the events, and does not send the updates to SAM server.

Expected results:
When add/delete/migration guests, the virt-who can send the updates to SAM server.

Additional info:
If restart the virt-who service, virt-who can report the correct host/guest uuids info.
Comment 2 RHEL Product and Program Management 2012-08-21 04:58:33 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 4 Hui Wang 2012-08-21 19:07:02 EDT
I analyzed the bug carefually. This issue should be caused by Bug 849921 - "VIRTWHO_INTERVAL" can't work. We must set the "VIRTWHO_INTERVAL=N" or after 3600s, virt-who will send the host/guest uuids. Actually "Listening for events is not available in VDSM or ESX mode".

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