Bug 786672 - Previous guests can not display in virt-manager after updating to virt-manager-0.9.0-8.el6
Summary: Previous guests can not display in virt-manager after updating to virt-manage...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst
Version: 6.3
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Cole Robinson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 788132 788947 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-02 06:11 UTC by Daisy Wu
Modified: 2012-06-20 12:52 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 12:52:40 UTC
Target Upstream Version:


Attachments (Terms of Use)
create new guest log (12.29 KB, text/plain)
2012-02-02 06:14 UTC, Daisy Wu
no flags Details
Attach a patch to fix the issue. (862 bytes, patch)
2012-02-02 07:57 UTC, Alex Jia
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0784 normal SHIPPED_LIVE python-virtinst bug fix update 2012-06-19 20:34:49 UTC

Description Daisy Wu 2012-02-02 06:11:01 UTC
Description of problem:
After updateing virt-manager-0.9.0-8.el6 from virt-manager-0.9.0-7.el6, the previous guest were not displayed in virt-manager.Get the error "AttributeError: 'NoneType' object has no attribute 'replace'".

Version-Release number of selected component (if applicable):
virt-manager-0.9.0-8.el6
libvirt-0.9.9-2.el6.x86_64
python-virtinst-0.600.0-6.el6.noarch
qemu-kvm-0.12.1.2-2.222.el6.x86_64

# uname -a
Linux wjw.redhat.com 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:
always

Steps to Reproduce:
1). Check the version of virt-manager:
# rpm -qa | grep virt-manager
virt-manager-0.9.0-7.el6.x86_64

2). There are some guests runing and work well.
# virsh list --all
 Id Name                 State
----------------------------------
  1 t6                   running
  2 win7                 running
  4 t5                   running
  5 t7                   running

3). Update the virt-manager successfully:
# rpm -Uvh virt-manager-0.9.0-8.el6.x86_64.rpm 
Preparing...                ########################################### [100%]
   1:virt-manager           ########################################### [100%]

4). Launch the virt-manager in terminal:
# virt-manager --debug


Actual results:
Previous guests can not display in virt-manager and get the error from terminal:
2012-02-02 00:28:41,319 (cli:85): Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/manager.py", line 683, in vm_added
    self._append_vm(model, vm, conn)
  File "/usr/share/virt-manager/virtManager/manager.py", line 754, in _append_vm
    row = self._build_vm_row(vm)
  File "/usr/share/virt-manager/virtManager/manager.py", line 736, in _build_vm_row
    row.insert(ROW_HINT, util.xml_escape(vm.get_description()))
  File "/usr/lib/python2.6/site-packages/virtinst/util.py", line 278, in xml_escape
    str = str.replace("&", "&")
AttributeError: 'NoneType' object has no attribute 'replace'
None


Expected results:
There is no error and previous guest can display in virt-manager successfully.

Additional info:
If new install a guest, the virt-manager still can not display it with the same error. This will bloke our testing.

Comment 2 Daisy Wu 2012-02-02 06:14:40 UTC
Created attachment 558977 [details]
create new guest log

Comment 3 Alex Jia 2012-02-02 07:57:15 UTC
Created attachment 559003 [details]
Attach a patch to fix the issue.

Recently, libvirt add some new APIs to modify guest titles and description, but old guest hasn't any description information, so vm.get_description() will return None, the virt-manager change previous codes to use util.xml_escap() method to covert return result, however, return value is None type not string, obviously, virt-manager or virtinst need to add some judgement for input argument especially the string is None.

BTW, I don't know how to commit a virt-manager patch, so just attach the patch as a attachment.

Alex

Comment 4 Alex Jia 2012-02-02 09:35:09 UTC
(In reply to comment #3)
> BTW, I don't know how to commit a virt-manager patch, so just attach the patch
> as a attachment.
I think I know this now :)
> 
> Alex

Comment 5 Alex Jia 2012-02-02 09:56:43 UTC
Patch for upstream:
https://www.redhat.com/archives/virt-tools-list/2012-February/msg00007.html

Comment 6 Cole Robinson 2012-02-02 13:47:54 UTC
Alex, thanks for the patch. But as I mentioned on the mailing list, it's probably better if we just pull in the upstream virtinst change:

http://git.fedorahosted.org/git?p=python-virtinst.git;a=commit;h=8f803765367dce3c9fe6da0d35d66fbbf6760c64

Reassigning to virtinst

Comment 7 Alex Jia 2012-02-02 14:06:08 UTC
(In reply to comment #6)
> Alex, thanks for the patch. But as I mentioned on the mailing list, it's
> probably better if we just pull in the upstream virtinst change:
Hi Cole, welcome, it's a little weird, I remember I have ever done the same change in virtinst, however, virt-manager doesn't work, I still can't see old guest, so I change this in virt-manager sides, I will check it again.

Alex

Comment 8 Alex Jia 2012-02-03 02:40:32 UTC
(In reply to comment #7)
> Hi Cole, welcome, it's a little weird, I remember I have ever done the same
> change in virtinst, however, virt-manager doesn't work, I still can't see old
It indeed works well for me.

Comment 9 Cole Robinson 2012-02-07 15:18:24 UTC
*** Bug 788132 has been marked as a duplicate of this bug. ***

Comment 10 Cole Robinson 2012-02-09 16:13:43 UTC
*** Bug 788947 has been marked as a duplicate of this bug. ***

Comment 11 Cole Robinson 2012-02-09 18:40:02 UTC
Fixed in python-virtinst-0.600.0-7.el6

Comment 13 Daisy Wu 2012-02-10 03:57:59 UTC
Verified this bug on python-virtinst-0.600.0-7.el6 and passed.

Verify with
kernel-2.6.32-220.el6.x86_64
python-virtinst-0.600.0-7.el6.noarch
libvirt-0.9.10-0rc2.el6.x86_64
virt-manager-0.9.0-9.el6.x86_64

Steps:
1. Updated the python-virtinst and virt-manager.
2. Launch the virt-manager in terminal, no error message.
3. Check the previous guests displayed in virt-manager and works well.

Change the status to Verified.

Comment 14 Daisy Wu 2012-02-10 07:52:55 UTC
Create new guest by virt-manager still works well.

Comment 17 errata-xmlrpc 2012-06-20 12:52:40 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/RHBA-2012-0784.html


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