Bug 985291

Summary: Delete a lxc guest will pop error dialog
Product: Red Hat Enterprise Linux 7 Reporter: tingting zheng <tzheng>
Component: virt-managerAssignee: Giuseppe Scrivano <gscrivan>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: codong, dallan, dyuan, lcui, mkletzan, mzhan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-0.10.0-3.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 10:54:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
proposed fix none

Description tingting zheng 2013-07-17 09:12:19 UTC
Description
Delete a lxc guest will pop error dialog

Version:
virt-manager-0.10.0-1.el7.noarch
libvirt-1.1.0-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Add a lxc connection.
2.Install a lxc guest.
3.Destroy the guest installed and delete the guest,a dialog pop:
Error refreshing hardware page: Domain not found: No domain with matching uuid '7d5f06ba-e131-d44a-33bd-07849e170ffe'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 1301, in hw_selected
    self.refresh_overview_page()
  File "/usr/share/virt-manager/virtManager/details.py", line 2635, in refresh_overview_page
    desc = self.vm.get_description() or ""
  File "/usr/share/virt-manager/virtManager/domain.py", line 985, in get_description
    return self._get_guest(inactive=True).description
  File "/usr/share/virt-manager/virtManager/domain.py", line 392, in _get_guest
    xml = self._get_domain_xml(inactive, refresh_if_necc)
  File "/usr/share/virt-manager/virtManager/domain.py", line 384, in _get_domain_xml
    refresh_if_necc=refresh_if_necc)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 100, in get_xml
    return self._XMLDesc(self._inactive_xml_flags)
  File "/usr/share/virt-manager/virtManager/domain.py", line 924, in _XMLDesc
    return self._backend.XMLDesc(flags)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 401, in XMLDesc
    if ret is None: raise libvirtError ('virDomainGetXMLDesc() failed', dom=self)
libvirtError: Domain not found: No domain with matching uuid '7d5f06ba-e131-d44a-33bd-07849e170ffe'

4.After step3,the guest has been deleted.

Actual results:
Error dialog pop.

Expected results:
No error dialog pop and guest can be deleted successfully.

Additional info:

Comment 2 luxin 2013-07-30 06:22:18 UTC
I can reproduce this bug

Version:
virt-manager-0.10.0-1.el7.noarch
libvirt-1.1.0-2.el7.x86_64

Step: 
1.  #virt-manager
2. In file,choose "Add connection" and add a lxc connection
3. New a lxc guest
4. Destroy the guest installed and delete the guest

Actual results:
After step4, a dialog pop:
Error refreshing hardware page: Domain not found: No domain with matching uuid '47ab6865-f7cd-744e-9db5-014c1542a26f'
Error refreshing hardware page: Domain not found: No domain with matching uuid '47ab6865-f7cd-744e-9db5-014c1542a26f'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 1301, in hw_selected
    self.refresh_overview_page()
  File "/usr/share/virt-manager/virtManager/details.py", line 2635, in refresh_overview_page
    desc = self.vm.get_description() or ""
  File "/usr/share/virt-manager/virtManager/domain.py", line 985, in get_description
    return self._get_guest(inactive=True).description
  File "/usr/share/virt-manager/virtManager/domain.py", line 392, in _get_guest
    xml = self._get_domain_xml(inactive, refresh_if_necc)
  File "/usr/share/virt-manager/virtManager/domain.py", line 384, in _get_domain_xml
    refresh_if_necc=refresh_if_necc)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 100, in get_xml
    return self._XMLDesc(self._inactive_xml_flags)
  File "/usr/share/virt-manager/virtManager/domain.py", line 924, in _XMLDesc
    return self._backend.XMLDesc(flags)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 401, in XMLDesc
    if ret is None: raise libvirtError ('virDomainGetXMLDesc() failed', dom=self)
libvirtError: Domain not found: No domain with matching uuid '47ab6865-f7cd-744e-9db5-014c1542a26f'

And then the guest has been deleted.

Expected results:
No error dialog pop and guest can be deleted successfully.

Additional info:

Comment 3 Giuseppe Scrivano 2013-08-08 00:21:29 UTC
Created attachment 784169 [details]
proposed fix

Comment 4 Giuseppe Scrivano 2013-08-08 00:23:58 UTC
it seems to be a race condition, when the VM is destroyed before the details window is closed.

Could you please check if the attached patch fixes the problem for you?

Comment 5 tingting zheng 2013-08-08 02:26:36 UTC
(In reply to Giuseppe Scrivano from comment #4)
> it seems to be a race condition, when the VM is destroyed before the details
> window is closed.
> 
> Could you please check if the attached patch fixes the problem for you?

I've tried the new patch,and it fixes the problem.

Comment 8 tingting zheng 2013-09-04 05:53:25 UTC
Tested pass with:
virt-manager-0.10.0-3.el7.noarch

When delete a lxc guest,no error shows,so move the bug to VERIFIED.

Comment 9 Ludek Smid 2014-06-13 10:54:51 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.