Bug 671152

Summary: Snapshots are not deleted when a domain is undefined
Product: [Fedora] Fedora Reporter: Matthew Booth <mbooth>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: aquini, berrange, clalance, crobinso, eblake, itamar, jforbes, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-01 19:23:49 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Matthew Booth 2011-01-20 10:37:50 EST
Description of problem:
I accidentally clicked 'Save' in virt-manager rather than 'Force Off' when shutting down a domain prior to deleting it and its storage. I deleted it anyway, and selected the checkbox to remove its storage volumes. I then imported a new domain with the same name using virt-v2v. After import, virt-manager only gave me the option to 'Restore', not 'Run'. This restored the state of the old guest, which inevitably caused storage corruption.

Version-Release number of selected component (if applicable):
libvirt-0.8.3-2.fc14.x86_64
virt-manager-0.8.5-1.fc14.noarch
Comment 1 Fedora Admin XMLRPC Client 2011-09-22 13:55:25 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 2 Fedora Admin XMLRPC Client 2011-09-22 13:58:45 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 3 Fedora Admin XMLRPC Client 2011-11-30 14:54:09 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 4 Fedora Admin XMLRPC Client 2011-11-30 14:56:25 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 5 Fedora Admin XMLRPC Client 2011-11-30 14:59:44 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 6 Fedora Admin XMLRPC Client 2011-11-30 15:01:22 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 7 Eric Blake 2011-12-01 19:23:49 EST
This has been fixed upstream in 0.9.4 with

commit b26a9fa9c226447e5f1153fb59eea4b92b848178
Author: Osier Yang <jyang@redhat.com>
Date:   Wed Jul 20 10:59:54 2011 +0800

    undefine: Define the new API
    
    This introduces a new API virDomainUndefineFlags to control the
    domain undefine process, as the existing API virDomainUndefine
    doesn't support flags.
    
    Currently only flag VIR_DOMAIN_UNDEFINE_MANAGED_SAVE is supported.
    If the domain has a managed save image, including
    VIR_DOMAIN_UNDEFINE_MANAGED_SAVE in @flags will also remove that
    file, and omitting the flag will cause undefine process to fail.
    
    This patch also changes the behavior of virDomainUndefine, if the
    domain has a managed save image, the undefine will be refused.

Backporting that to F14 is impossible without a rebase due to API constraints, and F14 is nearly end-of-life anyway; at this point, the best I can suggest is upgrading to F16 where the fix is already present.  I'm marking this as wontfix for F14.