Bug 507537 - Transient domains is still defined after destroy
Transient domains is still defined after destroy
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Veillard
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-23 04:40 EDT by Federico Simoncelli
Modified: 2010-03-16 13:21 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 507304
Environment:
Last Closed: 2009-06-27 09:48:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
libvirt-0.6.5-fix-destroy-after-restart.patch (520 bytes, patch)
2009-06-23 05:06 EDT, Federico Simoncelli
no flags Details | Diff

  None (edit)
Description Federico Simoncelli 2009-06-23 04:40:58 EDT
+++ This bug was initially created as a clone of Bug #507304 +++

Description of problem:
Destroying a transient domain after libvirt restart leaves the domain defined.

Version-Release number of selected component (if applicable):
libvirt-0.6.4 + "Fix re-detection of transient VMs after libvirtd restart" patch.

Ref:
http://git.et.redhat.com/?p=libvirt.git;a=commit;h=524188b221f5e8dc66a7f203e1633dab3aa8dcf2

(I searched for other related fix which might affect my tests but I didn't find any).

Steps to Reproduce:
1. Start a transient vm.
2. Restart libvirtd.
3. List all the domains (virsh list --all).
  
Actual results:
The transient vm is still defined.

Expected results:
The transient vm should be completely removed.

Additional info:

[root@node1 ~]# virsh list --all
 Id Name                 State
----------------------------------

[root@node1 ~]# virsh create test1.xml
Domain test1 created from test1.xml

[root@node1 ~]# virsh list --all
 Id Name                 State
----------------------------------
  1 test1                running

[root@node1 ~]# service libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon:                                  [  OK  ]
[root@node1 ~]# virsh list --all
 Id Name                 State
----------------------------------
  1 test1                running

[root@node1 ~]# virsh destroy test1
Domain test1 destroyed

[root@node1 ~]# virsh list --all
 Id Name                 State
----------------------------------
  - test1                shut off

[root@node1 ~]# service libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon:                                  [  OK  ]
[root@node1 ~]# virsh list --all
 Id Name                 State
----------------------------------
Comment 1 Daniel Berrange 2009-06-23 05:05:56 EDT
Reminder to myself of where the problem is....

(09:52:11 AM) danpb: simon3z: i think that that is a bug in 
(09:52:17 AM) danpb: virDomainLoadAllConfigs
(09:52:34 AM) danpb: it is always setting
(09:52:35 AM) danpb:             dom->persistent = 1;
(09:52:46 AM) danpb: when it should be actually doing that conditionally
(09:53:06 AM) danpb:         if (!liveStatus)
(09:53:06 AM) danpb:              dom->persistent = 1;
Comment 2 Federico Simoncelli 2009-06-23 05:06:17 EDT
Created attachment 349065 [details]
libvirt-0.6.5-fix-destroy-after-restart.patch

Proposed patch. (Thanks to Daniel P. Berrange)
Comment 3 Daniel Veillard 2009-06-27 09:48:28 EDT
That was commited upstream, so that will be in 0.6.5 next week,

  thanks !

Daniel

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