RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 733806 - libvirt should reject snapshots of autodestroy domains
Summary: libvirt should reject snapshots of autodestroy domains
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 638510 735011
TreeView+ depends on / blocked
 
Reported: 2011-08-26 23:12 UTC by Eric Blake
Modified: 2011-12-06 11:27 UTC (History)
6 users (show)

Fixed In Version: libvirt-0.9.4-7.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 11:27:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Eric Blake 2011-08-26 23:12:19 UTC
Description of problem:
When auto-destroy domains were introduced in upstream 0.9.3, they were documented as not working on migrate (makes sense, because migrate would change which connection owns the domain and autodestroy kicks in) or save/restore (a bit weaker, but makes sense when thinking of save/restore as migration to file).  However, it left out snapshots (another form of save/restore), and as implemented, the qemu driver actually ended up forbidding pause rather than save actions on autodestroy domains.

Version-Release number of selected component (if applicable):
libvirt-0.9.4-6.el6

How reproducible:
100%

Steps to Reproduce:
1. create a domain marked autodestroy (for example, 'virsh create xml --autodestroy)
2. 'virsh pause dom'
3. 'virsh snapshot-create dom'
4. 'virsh save dom file'
  
Actual results:
1. created and running
2. rejected
3. succeeds
4. succeeds

Expected results:
1. created and running
2. succeeds
3. rejected
4. rejected


Additional info:

Comment 1 Eric Blake 2011-08-26 23:14:45 UTC
(In reply to comment #0)
> Steps to Reproduce:
> 1. create a domain marked autodestroy (for example, 'virsh create xml
> --autodestroy)
> 2. 'virsh pause dom'
> 3. 'virsh snapshot-create dom'
> 4. 'virsh save dom file'

Correction - for an autodestroy domain to be tested, it has to be done within a single connection - you have to use batch commands or the virsh shell:

0. virsh # start the shell
1. create xml
2. pause dom
3. snapshot-create dom
4. save dom file
5. quit

Comment 2 Eric Blake 2011-08-26 23:15:49 UTC
Getting this fixed is a prereq to bug 638510 support for live snapshots via the
snapshot_blkdev qemu monitor command.

Comment 3 Eric Blake 2011-08-26 23:37:47 UTC
Upstream patch proposed:
https://www.redhat.com/archives/libvir-list/2011-August/msg01381.html

Comment 6 Nan Zhang 2011-09-01 06:34:31 UTC
Test with libvirt-0.9.4-7.el6.x86_64. As expected results, move it to VERIFIED.


[root@localhost ~]# virsh
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # create foo.xml --autodestroy
Domain foo created from foo.xml

virsh # suspend foo
Domain foo suspended

virsh # snapshot-create foo
error: Requested operation is not valid: domain is marked for auto destroy

virsh # save foo /tmp/foo
error: Failed to save domain foo to /tmp/foo
error: Requested operation is not valid: domain is marked for auto destroy

virsh # quit

Comment 7 Eric Blake 2011-09-01 13:46:35 UTC
Unfortunately, this caused a regression, tracked in bug 735011

Comment 8 errata-xmlrpc 2011-12-06 11:27:36 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-1513.html


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