Bug 728423

Summary: [virt-manager]Error dialog pop-up when change Disk bus on Customize configuration window
Product: Red Hat Enterprise Linux 6 Reporter: zhe peng <zpeng>
Component: python-virtinstAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.2CC: dyuan, mzhan, rwu
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
No description necessary
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 16:17:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description zhe peng 2011-08-05 05:25:59 UTC
Description of problem:
before install,in customize configuration window, change storage disk bus will pop-up error msg.

Version-Release number of selected component (if applicable):
virt-manager-0.9.0-5.el6
libvirt-0.9.4-1.el6

How reproducible:
always

Steps to Reproduce:
1.create a new virtual machine,
create a disk image on hard drive in Step 4.
2.in Step 5 ,click "Customize configuration before install",then click finish
3.in new window,select a storage in left panel
4.in Advanced options,change Disk bus to "Virtio" or "IDE"
5.click "apply" button
  
Actual results:
a dialog pop-up with error msg.
Details msg:
Error changing VM configuration: 'NoneType' object has no attribute 'xpathEval'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 2317, in _change_config_helper
    func(*args)
  File "/usr/share/virt-manager/virtManager/domain.py", line 574, in define_disk_bus
    return self._redefine_device(change, devobj)
  File "/usr/share/virt-manager/virtManager/domain.py", line 307, in _redefine_device
    return cb(dev)
  File "/usr/share/virt-manager/virtManager/domain.py", line 570, in change
    editdev.address.clear()
  File "/usr/lib/python2.6/site-packages/virtinst/VirtualDevice.py", line 173, in clear
    self._remove_child_xpath("./address")
  File "/usr/lib/python2.6/site-packages/virtinst/XMLBuilderDomain.py", line 458, in _remove_child_xpath
    _remove_xpath_node(self._xml_ctx, xpath, dofree=False)
  File "/usr/lib/python2.6/site-packages/virtinst/XMLBuilderDomain.py", line 186, in _remove_xpath_node
    node = _get_xpath_node(ctx, curxpath)
  File "/usr/lib/python2.6/site-packages/virtinst/XMLBuilderDomain.py", line 71, in _get_xpath_node
    node = ctx.xpathEval(xpath)
AttributeError: 'NoneType' object has no attribute 'xpathEval'


Expected results:
can set disk bus w/o error

Additional info:
this issue not occur on virt-manager-0.8.6-4.el6,so it's a regression bug.

Comment 3 Cole Robinson 2011-08-29 17:13:11 UTC
Actually a virtinst bug, fixed upstream:

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

Comment 4 Cole Robinson 2011-08-30 19:08:58 UTC
Fixed in python-virtinst-0.600.0-3.el6

Comment 7 zhe peng 2011-09-02 05:58:59 UTC
verify with:
ibvirt-0.9.4-7.el6
qemu-kvm-0.12.1.2-2.184.el6
kernel-2.6.32-191.el6
virt-manager-0.9.0-6.el6
python-virtinst-0.600.0-3.el6

1.create a new virtual machine,
create a disk image on hard drive in Step 4.
2.in Step 5 ,click "Customize configuration before install",then click finish
3.in new window,select a storage in left panel
4.in Advanced options,change Disk bus to "Virtio" or "IDE"
5.click "apply" button

the Disk bus can be set without error. the bug fixed.
verification passed.

Comment 8 Cole Robinson 2011-11-07 16:54:07 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description necessary

Comment 9 errata-xmlrpc 2011-12-06 16:17:08 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-2011-1643.html