Bug 769170 - After restarting libvirtd service, uuid of added guest couldn't display in virt-who on Xen(PV)
Summary: After restarting libvirtd service, uuid of added guest couldn't display in vi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: virt-who
Version: 5.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 715031 771700 772019
TreeView+ depends on / blocked
 
Reported: 2011-12-20 06:56 UTC by yu zheng
Modified: 2016-12-01 00:30 UTC (History)
4 users (show)

Fixed In Version: virt-who-0.5-3.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-21 06:07:13 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:0225 0 normal SHIPPED_LIVE new package: virt-who 2012-02-20 15:07:56 UTC

Description yu zheng 2011-12-20 06:56:36 UTC
Description of problem:
After restarting libvirtd service, added guest uuid couldn't display in virt-who on Xen(PV).

Version-Release number of selected component (if applicable):
virt-who-0.5-2.el5
subscription-manager-0.98.8-1.el5
subscription-manager-firstboot-0.98.8-1.el5
subscription-manager-gnome-0.98.8-1.el5   
python-rhsm-0.98.7-1.el5
libvirt-0.8.2-24.el5
libvirt-0.8.2-24.el5
libvirt-python-0.8.2-24.el5

How reproducible:
always

Steps to Reproduce:
1.Install XEN and register to candlepin.
2.Install three paravirtualized guests on xen and run the guests. 
3.Configure virt-who.
# vi /etc/sysconfig/virt-who
VIRTWHO_BACKGROUND=1 (enable debugging)
VIRTWHO_DEBUG=1 (run in background)     
4.Restart the virt-who service in terminal1. 
[root@localhost ~]# service virt-who restart
Stopping virt-who:                                         [  OK  ]
Starting virt-who: Virt-who is running in libvirt mode
Starting infinite loop with 3600 seconds interval and event handling
                                                           [  OK  ]
[root@localhost ~]# Unable to obtain status from server, UEPConnection is likely not usable:
Traceback (most recent call last):
  File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit
    msg = self.format(record)
  File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format
    return fmt.format(record)
  File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.4/logging/__init__.py", line 272, in getMessage
    msg = str(self.msg)
AttributeError: RemoteServerException instance has no attribute 'args'
Traceback (most recent call last):
  File "/usr/lib64/python2.4/logging/handlers.py", line 71, in emit
    if self.shouldRollover(record):
  File "/usr/lib64/python2.4/logging/handlers.py", line 149, in shouldRollover
    msg = "%s\n" % self.format(record)
  File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format
    return fmt.format(record)
  File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.4/logging/__init__.py", line 272, in getMessage
    msg = str(self.msg)
AttributeError: RemoteServerException instance has no attribute 'args'
Virtual machine found: Domain-0: 00000000-0000-0000-0000-000000000000
Virtual machine found: rhel5: 80fa18cc-c480-013a-9dd8-d4af7aab0ab7
Virtual machine found: rhel5-2: c26c4c8d-90a5-ea2b-2c91-354b580f4a78
Virtual machine found: rhel5-1: 271627eb-a009-a64a-f747-c6a36834e8cf
Sending update to updateConsumer: ['00000000-0000-0000-0000-000000000000', '271627eb-a009-a64a-f747-c6a36834e8cf', '80fa18cc-c480-013a-9dd8-d4af7aab0ab7', 'c26c4c8d-90a5-ea2b-2c91-354b580f4a78']
5.Restart libvirtd service and virt-manager, then add another guest(rhel5-3).
6.Check the output info of terminal1.
  
Actual results:
After adding a guest, virt-who display following error:
EVENT: Domain rhel5-3(-1) Defined Added
Traceback (most recent call last):
  File "/usr/lib64/python2.4/site-packages/libvirt.py", line 1941, in dispatchDomainEventCallbacks
    cb(self,dom,event,detail,opaque)
  File "/usr/share/virt-who/virt.py", line 81, in changed
    l.append(d)
UnboundLocalError: local variable 'd' referenced before assignment
EVENT: Domain rhel5-3(-1) Defined Added
Traceback (most recent call last):
  File "/usr/lib64/python2.4/site-packages/libvirt.py", line 1941, in dispatchDomainEventCallbacks
    cb(self,dom,event,detail,opaque)
  File "/usr/share/virt-who/virt.py", line 81, in changed
    l.append(d)
UnboundLocalError: local variable 'd' referenced before assignment 
 
Expected results:
The UUID of newly added guest should display.

Comment 1 Radek Novacek 2011-12-20 10:55:54 UTC
Looking at the traceback, this can be easily fixed by replacing line "l.append(d)" with "l.append(dom)".

Comment 2 Radek Novacek 2011-12-21 14:22:32 UTC
Fixed in virt-who-0.5-3.el5, see brew build:

https://brewweb.devel.redhat.com/taskinfo?taskID=3907069

Comment 4 Hui Wang 2011-12-22 05:48:15 UTC
Result
Pass

Version-Release number of selected component (if applicable):
virt-who-0.5-3.el5
subscription-manager-0.98.8-1.el5
subscription-manager-firstboot-0.98.8-1.el5
subscription-manager-gnome-0.98.8-1.el5   
python-rhsm-0.98.8-1.el5
libvirt-0.8.2-24.el5
libvirt-0.8.2-24.el5
libvirt-python-0.8.2-24.el5

Verified as follow:

1.Install XEN and register to candlepin.
2.Install three paravirtualized guests on xen and run the guests. 
3.Configure virt-who.
# vi /etc/sysconfig/virt-who
VIRTWHO_BACKGROUND=1 (enable debugging)
VIRTWHO_DEBUG=1 (run in background)     
4.Restart the virt-who service in terminal1. 
[root@localhost ~]# service virt-who restart
Stopping virt-who:                                         [  OK  ]
Starting virt-who: Virt-who is running in libvirt mode
Starting infinite loop with 3600 seconds interval and event handling
                                                           [  OK  ]
[root@localhost images]# Unable to obtain status from server, UEPConnection is likely not usable:
Traceback (most recent call last):
  File "/usr/share/virt-who/subscriptionmanager.py", line 60, in connect
    if not self.connection.ping()['result']:
  File "/usr/lib/python2.4/site-packages/rhsm/connection.py", line 411, in ping
    return self.conn.request_get("/status/")
  File "/usr/lib/python2.4/site-packages/rhsm/connection.py", line 267, in request_get
    return self._request("GET", method)
  File "/usr/lib/python2.4/site-packages/rhsm/connection.py", line 234, in _request
    self.validateResponse(result)
  File "/usr/lib/python2.4/site-packages/rhsm/connection.py", line 249, in validateResponse
    raise RemoteServerException(response['status'])
RemoteServerException: <unprintable instance object>
Virtual machine found: rhel5-2: 01d96021-7063-54c0-6f35-639739f8814f
Virtual machine found: rhel5-1: d9527432-8c61-99c5-52a8-7e4694563a3b
Virtual machine found: rhel5-add: eccbf300-8b3c-74ea-4b63-5a6d08a8631d
Virtual machine found: rhel-add2: 3bb9412a-a5eb-81ec-4bb7-2416dcd19623
Sending update to updateConsumer: ['01d96021-7063-54c0-6f35-639739f8814f', '3bb9412a-a5eb-81ec-4bb7-2416dcd19623', 'd9527432-8c61-99c5-52a8-7e4694563a3b', 'eccbf300-8b3c-74ea-4b63-5a6d08a8631d']

5.Restart libvirtd service and virt-manager, then add another guest(rhel5-add3).
6.Check the output info of terminal1.
................
EVENT: Domain rhel5-add3(40) Started Booted
Virtual machine found: rhel5-2: 01d96021-7063-54c0-6f35-639739f8814f
Virtual machine found: rhel5-1: d9527432-8c61-99c5-52a8-7e4694563a3b
Virtual machine found: rhel5-add: eccbf300-8b3c-74ea-4b63-5a6d08a8631d
Virtual machine found: rhel-add2: 3bb9412a-a5eb-81ec-4bb7-2416dcd19623
Virtual machine found: rhel5-add3: 222c52a0-6d4c-55b3-b59a-c1a4d3d9c4a4
Sending update to updateConsumer: ['01d96021-7063-54c0-6f35-639739f8814f', '222c52a0-6d4c-55b3-b59a-c1a4d3d9c4a4', '3bb9412a-a5eb-81ec-4bb7-2416dcd19623', 'd9527432-8c61-99c5-52a8-7e4694563a3b', 'eccbf300-8b3c-74ea-4b63-5a6d08a8631d']
EVENT: Domain rhel5-add3(-1) Defined Added
Virtual machine found: rhel5-2: 01d96021-7063-54c0-6f35-639739f8814f
Virtual machine found: rhel5-1: d9527432-8c61-99c5-52a8-7e4694563a3b
Virtual machine found: rhel5-add: eccbf300-8b3c-74ea-4b63-5a6d08a8631d
Virtual machine found: rhel-add2: 3bb9412a-a5eb-81ec-4bb7-2416dcd19623
Virtual machine found: rhel5-add3: 222c52a0-6d4c-55b3-b59a-c1a4d3d9c4a4
Sending update to updateConsumer: ['01d96021-7063-54c0-6f35-639739f8814f', '222c52a0-6d4c-55b3-b59a-c1a4d3d9c4a4', '3bb9412a-a5eb-81ec-4bb7-2416dcd19623', 'd9527432-8c61-99c5-52a8-7e4694563a3b', 'eccbf300-8b3c-74ea-4b63-5a6d08a8631d']
EVENT: Domain rhel5-add3(-1) Defined Added
Virtual machine found: rhel5-2: 01d96021-7063-54c0-6f35-639739f8814f
Virtual machine found: rhel5-1: d9527432-8c61-99c5-52a8-7e4694563a3b
Virtual machine found: rhel5-add: eccbf300-8b3c-74ea-4b63-5a6d08a8631d
Virtual machine found: rhel-add2: 3bb9412a-a5eb-81ec-4bb7-2416dcd19623
Virtual machine found: rhel5-add3: 222c52a0-6d4c-55b3-b59a-c1a4d3d9c4a4
Sending update to updateConsumer: ['01d96021-7063-54c0-6f35-639739f8814f', '222c52a0-6d4c-55b3-b59a-c1a4d3d9c4a4', '3bb9412a-a5eb-81ec-4bb7-2416dcd19623', 'd9527432-8c61-99c5-52a8-7e4694563a3b', 'eccbf300-8b3c-74ea-4b63-5a6d08a8631d']

Comment 5 errata-xmlrpc 2012-02-21 06:07: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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2012-0225.html


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