Bug 1292312 - Unknown error out when doing external memory only snapshot
Unknown error out when doing external memory only snapshot
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.8
x86_64 Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Peter Krempa
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-16 20:36 EST by yangyang
Modified: 2016-05-10 15:25 EDT (History)
6 users (show)

See Also:
Fixed In Version: libvirt-0.10.2-56.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-10 15:25:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description yangyang 2015-12-16 20:36:46 EST
Description of problem:
When doing external memory only snapshot, following error out
error: An error occurred, but the cause is unknown

Version-Release number of selected component (if applicable):
libvirt-0.10.2-55.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.481.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. prepare a running domain

2. do external memory only snapshot
# virsh snapshot-create-as vm1 --no-metadata --memspec /tmp/vm1-mem.img --diskspec hda,snapshot=no
error: An error occurred, but the cause is unknown

Actual results:


Expected results:
External memory only snapshot should be created without error

Additional info:
Comment 2 Peter Krempa 2016-01-06 08:03:07 EST
Fixed upstream by:

commit cb6681ff1de3d02e8d88ce3b391ba03f8dd612f4
Author: Peter Krempa <pkrempa@redhat.com>
Date:   Tue May 20 15:22:14 2014 +0200

    qemu: snapshot: Fix return value of external checkpoint with no disks
    
    When doing an external checkpoint of a VM with no disk selected we'd
    return failure but not set error code. This was a result of ret not
    being set to 0 during walking of the disk array.
    
    Rework early failure checking and set the error code to success before
    iterating the array of disks so that we return success if no disks are
    snapshotted.
    
    Fixes the following symptom (or without --diskspec for diskless VMs)
    
     $ virsh snapshot-create-as snapshot-test  --memspec /tmp/asdf --diskspec hda,snapshot=no
     error: An error occurred, but the cause is unknown
Comment 5 Han Han 2016-02-01 05:01:27 EST
I can reproduce it on libvirt-0.10.2-55.el6.x86_64:
Verify it on libvirt-0.10.2-56.el6.x86_64:
1. Preparing a running guest:
# virsh list     
 Id    Name                           State
----------------------------------------------------
 11    n5                             running

2. Do external memory only snapshot
# virsh snapshot-create-as n5 --no-metadata --memspec /tmp/n5.img --diskspec vda,snapshot=no
Domain snapshot 1454320680 created

# ll /tmp/n5.img
-rw-------. 1 root root 282M Feb  1 17:58 /tmp/n5.img
Comment 7 errata-xmlrpc 2016-05-10 15:25:44 EDT
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.

https://rhn.redhat.com/errata/RHBA-2016-0738.html

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