Hide Forgot
Description of problem: In RHEL6.5 beta, the qemu-img convert command does not support "-s" option to appoint the snapshot name. And this issue let the openstack raise error when use "nova image-create" to create a snapshot. However, it does work in RHEL6.4 though it does not list the -s option in the command help messages. And this is the following error messages the openstack rasie: Errors in compute.log 2013-10-30 04:08:55.506 28687 ERROR nova.openstack.common.rpc.amqp [req-b5101294-0fb5-4d9c-8204-614cfd8ee90a f11e176b4176492a9a8f085c0862ff8b abe1be261329442b8b49efca0fb61320] Exception during message handling 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp Traceback (most recent call last): 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/amqp.py", line 461, in _process_data 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp **args) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/dispatcher.py", line 172, in dispatch 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp result = getattr(proxyobj, method)(ctxt, **kwargs) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 358, in decorated_function 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp return function(self, context, *args, **kwargs) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/exception.py", line 90, in wrapped 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp payload) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/exception.py", line 73, in wrapped 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp return f(self, context, *args, **kw) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 248, in decorated_function 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp pass 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 234, in decorated_function 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp return function(self, context, *args, **kwargs) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 276, in decorated_function 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp e, sys.exc_info()) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 263, in decorated_function 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp return function(self, context, *args, **kwargs) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 324, in decorated_function 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp % image_id, instance=instance) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 314, in decorated_function 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp *args, **kwargs) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 2327, in snapshot_instance 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp task_states.IMAGE_SNAPSHOT) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 2362, in _snapshot_instance 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp update_task_state) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 1401, in snapshot 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp snapshot_backend.snapshot_extract(out_path, image_format) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/imagebackend.py", line 323, in snapshot_extract 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp out_format) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/utils.py", line 552, in extract_snapshot 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp execute(*qemu_img_cmd) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/utils.py", line 50, in execute 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp return utils.execute(*args, **kwargs) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/utils.py", line 177, in execute 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp return processutils.execute(*cmd, **kwargs) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/openstack/common/processutils.py", line 178, in execute 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp cmd=' '.join(cmd)) 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp ProcessExecutionError: Unexpected error while running command. 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp Command: qemu-img convert -f qcow2 -O qcow2 -s 83a8045668f040eea5892b09f87ad7ea /var/lib/nova/instances/19f276f6-96d4-41ed-a024-d28c80c1f84d/disk /var/lib/nova/instances/snapshots/tmptXz1F6/83a8045668f040eea5892b09f87ad7ea 2013-10-30 04:08:55.506 28687 TRACE nova.openstack.common.rpc.amqp Exit code: 1 2013-10-30 04:20:09.996 28687 TRACE nova.openstack.common.rpc.amqp Stdout: "qemu-img version 0.12.1, Copyright (c) 2004-2008 Fabrice Bellard\nusage: qemu-img command [command op tions]\nQEMU disk image utility\n\nCommand syntax:\n check [-f fmt] [--output=ofmt] [-r [leaks | all]] filename\n create [-f fmt] [-o options] filename [size]\n commit [-f fm t] [-t cache] filename\n convert [-c] [-p] [-f fmt] [-t cache] [-O output_fmt] [-o options] [-S sparse_size] filename [filename2 [...]] output_filename\n info [-f fmt] [--output=ofmt] filename\n map [-f fmt] [--output=ofmt] filename\n snapshot [-l | -a snapshot | -c snapshot | -d snapshot] filename\n rebase [-f fmt] [-t cache] [-p] [-u] -b backing_file [-F backing_fmt] filename\n resize filename [+ | -]size\n\nCommand parameters:\n 'filename' is a disk image filename\n 'fmt' is the disk image format. It is guessed automatically in most cases\n 'cache' is the cache mode used to write the output disk image, the valid\n options are: 'none', 'writeback' (default), 'writethrough' and 'unsafe'\n 'size' is the disk image size in bytes. Optional suffixes\n 'k' or 'K' (kilobyte, 1024), 'M' (megabyte, 1024k), 'G' (gigabyte, 1024M)\n and T (terabyte, 1024G) are supported. 'b' is ignored.\n 'output_filename' is the destination disk image filename\n 'output_fmt' is the destination format\n 'options' is a comma separated list of format specific options in a\n name=value format. Use -o ? for an overview of the options supported by the\n used format\n '-c' indicates that target image must be compressed (qcow format only)\n '-u' enables unsafe rebasing. It is assumed that old and new backing file\n match exactly. The image doesn't need a working backing file before\n rebasing in this case (useful for renaming the backing file)\n '-h' with or without a command shows this help and lists the supported formats\n '-p' show progress of command (only certain commands)\n '-S' indicates the consecutive number of bytes that must contain only zeros\n for qemu-img to create a sparse image during conversion\n '--output' takes the format in which the output must be done (human or json)\n\nParameters to check subcommand:\n '-r' tries to repair any inconsistencies that are found during the check.\n '-r leaks' repairs only cluster leaks, whereas '-r all' fixes all\n kinds of errors, with a higher risk of choosing the wrong fix or\n hiding corruption that has already occurred.\n\nParameters to snapshot subcommand:\n 'snapshot' is the name of the snapshot to create, apply or delete\n '-a' applies a snapshot (revert disk to saved state)\n '-c' creates a snapshot\n '-d' deletes a snapshot\n '-l' lists all snapshots in the given image\n\nSupported formats: raw cow qcow vdi vmdk cloop dmg bochs vpc vvfat qcow2 qed vhdx parallels nbd blkdebug host_cdrom host_floppy host_device file gluster gluster gluster gluster\n" 2013-10-30 04:20:09.996 28687 TRACE nova.openstack.common.rpc.amqp Stderr: "convert: invalid option -- 's'\n" 2013-10-30 04:20:09.996 28687 TRACE nova.openstack.common.rpc.amqp Version-Release number of selected component (if applicable): qemu-kvm-0.12.1.2-2.402.el6.x86_64 qemu-img-0.12.1.2-2.402.el6.x86_64 How reproducible: Use -s option to appoint the snapshot name when use qemu-img convert command. Just like this one: qemu-img convert -f qcow2 -O qcow2 -s 83a8045668f040eea5892b09f87ad7ea /var/lib/nova/instances/19f276f6-96d4-41ed-a024-d28c80c1f84d/disk /var/lib/nova/instances/snapshots/tmptXz1F6/83a8045668f040eea5892b09f87ad7ea. Or use "nova imge-create instance_name snapshotname" in openstack to make a snapshot. Actual results: convert: invalid option -- 's' Expected results: This command should support '-s' option like qemu-img-0.12.1.2-2.355.el6.x86_64 does or give some help message to show why it does not support in this verion. Additional info:
Hi, hu wei FYI: Bug 1018243 - Removal of qemu-img -s option (unused) causing regression in RHOS The "-s" option is removed as expected. Thanks.
Got it. Thanks, it seems that we have to report a bug in OpenStack community.
Is this bug a suitable one to track the issue? Bug 1016896 - Impossible to create an snapshot with latest qemu-img-rhev
I'm sorry, but I can not access the bug you provided(Access denied). And there already a bug about this issue reported in openstack community. https://bugs.launchpad.net/nova/+bug/1247185
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux.
The removal of this feature also breaks Apache Cloudstack volume snapshot functionality. Clouds currently running EL6 must stay with 6.4 qemu-img, compile their own or change hypervisor altogether.
Hu Wei and Nux: this was an intentional change, as -s, even though accepted silently, was not taking the desired effect and it could actually harm users. It has been fixed in RHOS4 and apparently Apache Cloudstack should be fixed as well. If this issue is still affecting you, please raise a ticket through your regular Red Hat support channels to make certain it receives the proper attention and prioritization. They should be able to assist you in solving this problem. For information on how to contact the Red Hat production support team, please visit: https://www.redhat.com/support/process/production/#howto *** This bug has been marked as a duplicate of bug 1018243 ***
Hello, I am not authorized to see the duplicate bug. Currently the Cloudstack snapshot still fails with the following: Name : qemu-img Version : 0.12.1.2 Release : 2.415.el6_5.7 I see the latest in RHOS is even slightly older: qemu-kvm-rhev-0.12.1.2-2.415.el6_5.6.src.rpm I'm still stuck with qemu-img-0.12.1.2-2.355.el6_4_4.1
Hi. I too, as Nux, I'm not authorized to see bug #1018243. Moreover, I use a backup script which uses the command line option "-s": https://bitbucket.org/guilhemfr/virt-back/src/25d4d87747f5fda7118ff03e317d4df56dadf0e1/virt-back?at=default#cl-159 While I do understand there's something not ok with "-s", I don't understand exactly what is not ok ("was not taking the desired effect and it could actually harm users" is vague) and I don't understand if there's another command line switch to use instead of "-s". Is qemu-img still supposed to do snapshots? If not, how can a command line script perform a snapshot? Can someone please give indications on that? Thanks.