Bug 786694

Summary: 'XML error: bond interface misses the bond element' and virt-manager's UI interface disabled when try to stop a bond through virt-manager.
Product: Red Hat Enterprise Linux 6 Reporter: Geyang Kong <gkong>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: jwu, mjenner, mzhan, rwu, zpeng
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
No documentation needed
Story Points: ---
Clone Of:
: 1057964 (view as bug list) Environment:
Last Closed: 2012-06-20 12:39:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1057964    
Attachments:
Description Flags
This is screenshot, virt-manager's UI issue
none
This is libvirtd's log
none
This is virt-manager's log none

Description Geyang Kong 2012-02-02 07:32:04 UTC
Version-Release number of selected component (if applicable):
libvirt-0.9.9-2.el6.x86_64
python-virtinst-0.600.0-5.el6.noarch
qemu-kvm-0.12.1.2-2.218.el6.x86_64
virt-manager-0.9.0-7.el6.x86_64
Linux version 2.6.32-220.el6.x86_64
netcf-0.1.9-2.el6.x86_64

How reproducible:
100%

Steps to Reproduce:

1. Stop NetworkManager service.

2. Start virt-manager.

3. Click Edit->Connection Details->Network Interfaces

4. Click '+' button and choose bond then click 'Forward'

5. Choose an eth device(mine is eth1), Set 'Start mode'=none, and check 'Activate now'.

6. Click 'Configure' button besides 'Bond mode'

7. Choose Bond mode as 'active-backup', Bond monitor mode as 'arpmon', interval=100, Validate mode=active
   Target address: 192.168.50.1, then press OK and finish the wizard

7. Click 'Stop Interface' button to stop the newly created bond.

Actual results:

1. There is an error appeared says 'XML error: bond interface misses the bond element', please refer to attachments for more information:

2. virt-manager UI interface catch this error making the whole Network interface UI disabled.
   Following is a part of virt-manager.log
--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 44, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/interface.py", line 80, in stop
    self.refresh_xml()
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 105, in refresh_xml
    self._xml = self._XMLDesc(self._active_xml_flags)
  File "/usr/share/virt-manager/virtManager/interface.py", line 45, in _XMLDesc
    return self.interface.XMLDesc(flags)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1763, in XMLDesc
    if ret is None: raise libvirtError ('virInterfaceGetXMLDesc() failed', net=self)
libvirtError: XML error: bond interface misses the bond element
--------------------------------------------------------------------------------
   Following is a part of libvirtd.log
--------------------------------------------------------------------------------
2012-02-02 19:55:25.415+0000: 2445: error : virInterfaceDefParseXML:793 : XML error: bond interface misses the bond element
--------------------------------------------------------------------------------

Expected results:

1. Bond could be stopped normally without error.

2. virt-manager UI interface stayed normally.


Additional info:
None

Comment 1 Geyang Kong 2012-02-02 07:36:53 UTC
Created attachment 558997 [details]
This is screenshot, virt-manager's UI issue

Comment 2 Geyang Kong 2012-02-02 07:37:33 UTC
Created attachment 558998 [details]
This is libvirtd's log

Comment 3 Geyang Kong 2012-02-02 07:38:11 UTC
Created attachment 558999 [details]
This is virt-manager's log

Comment 4 Min Zhan 2012-02-03 03:46:10 UTC
We have reported a libvirt bug 786696 to track the error message. For virt-manager this bug we would like to track the whole UI is blocked when catching this error message, such as delete and stop buttons are disabled in network interface UI.

Comment 5 Cole Robinson 2012-02-07 18:15:46 UTC
I don't think this is a virt-manager bug. Basically something went wrong that the libvirt + netcf level, so every time we try to fetch the interface XML, libvirt throws an exception. In a case like that, it is acceptable to show an error message like the screenshot shows. The other interface can still be viewed correctly, right?

If you look at the virt-manager log, every time we fetch the XML we are getting an error, so it isn't just a one off fluke, libvirt/netcf are just busted in that case and there is nothing we can do.

Closing as NOTABUG, please reopen if I'm mistaken.

Comment 6 Min Zhan 2012-02-08 07:21:54 UTC
As Comment 4 described, this error message may be libvirt+netcf bug which we has 786696 to track. For this bug, we would like to highlight some kind of unfriendly user experience for virt-manager:)

Yeah, virt-manager works well and catch the error. But the whole network interface UI are all blocked after catching this error. 

For example, at first network interface list has bond0 and lo (lo is working well for sure), then destroy bond0, the error message display both in bond0 and lo pages. that's not much acceptable for lo at least. 
Also buttons are not displayed well: only add interface button can display well. But the start/stop/delete buttons are all disabled with grey. 

What do you think, Cole?

Comment 7 Cole Robinson 2012-02-08 12:27:26 UTC
Min, sorry! I didn't understand that part. I've reproduced and fixed upstream:

http://git.fedorahosted.org/git?p=virt-manager.git;a=commit;h=fa6870869e5d2ad90251027f23901825a34c971b

Reopening

Comment 8 Cole Robinson 2012-02-09 18:48:31 UTC
Fixed in virt-manager-0.9.0-9.el6

Comment 11 Daisy Wu 2012-02-13 07:17:18 UTC
This bug can be reproduced with:
kernel-2.6.32-220.el6.x86_64
libvirt-0.9.9-2.el6.x86_64
python-virtinst-0.600.0-5.el6.noarch
virt-manager-0.9.0-7.el6.x86_64

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

Steps:
1. Stop NetworkManager service.
2. Start virt-manager.
3. Click Edit->Connection Details->Network Interfaces
4. Click '+' button and choose bond then click 'Forward'
5. Choose an eth device(mine is eth0), Set 'Start mode'=none, and check
'Activate now'.
6. Click 'Configure' button besides 'Bond mode'
7. Choose Bond mode as 'active-backup', Bond monitor mode as 'arpmon',
interval=100, Validate mode=active
   Target address: 192.168.50.1, then press OK and finish the wizard
7. Click 'Stop Interface' button to stop the newly created bond.
8. There is an error appeared says 'XML error: bond interface misses the bond
element', according to comment 5, that is libvirt + netcf level bug.
9. Click the close button of error message.
10.Select the "lo" network interface.
11.Check the start/stop/delete buttons are all available and work well.

Changed the status to VERIFIED.

Comment 12 Cole Robinson 2012-06-12 15:27:04 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 documentation needed

Comment 14 errata-xmlrpc 2012-06-20 12:39:27 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-0785.html