OpenStack Compute (Nova)

on qemu, create image fails when volume is attached to vm instance

Reported by Koji Iida on 2012-03-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
High
Vish Ishaya

Bug Description

I'm using Essex-4 with qemu.

When volume is attached to instance, create server (snapshot) fails like followings.

command:

openstack@usv095:~/devstack$ nova volume-list
+----+--------+--------------+------+-------------+--------------------------------------+
| ID | Status | Display Name | Size | Volume Type | Attached to |
+----+--------+--------------+------+-------------+--------------------------------------+
| 1 | in-use | vol1 | 1 | None | 0a66f533-f7a3-47d9-942a-3367abfb7a9d |
+----+--------+--------------+------+-------------+--------------------------------------+
openstack@usv095:~/devstack$ nova image-create 0a66f533-f7a3-47d9-942a-3367abfb7a9d snapshot1

nova-compute says:

2012-03-05 12:22:07 AUDIT nova.compute.manager [req-75e03716-39a3-4650-9127-8d343285efff af25f8740c4f40ad8a0f89b79858eba7 1916f24c97a34753b07da1e52b56dcb7] instance 0a66f533-f7a3-47d9-942a-3367abfb7a9d: snapshotting
libvir: QEMU error : Requested operation is not valid: Disk '/dev/disk/by-path/ip-192.168.6.95:3260-iscsi-iqn.2010-10.org.openstack:volume-00000001-lun-1' does not support snapshotting
2012-03-05 12:22:08 ERROR nova.rpc.common [-] Exception during message handling
(nova.rpc.common): TRACE: Traceback (most recent call last):
(nova.rpc.common): TRACE: File "/opt/openstack/nova/nova/rpc/amqp.py", line 250, in _process_data
(nova.rpc.common): TRACE: rval = node_func(context=ctxt, **node_args)
(nova.rpc.common): TRACE: File "/opt/openstack/nova/nova/exception.py", line 112, in wrapped
(nova.rpc.common): TRACE: return f(*args, **kw)
(nova.rpc.common): TRACE: File "/opt/openstack/nova/nova/compute/manager.py", line 180, in decorated_function
(nova.rpc.common): TRACE: sys.exc_info())
(nova.rpc.common): TRACE: File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
(nova.rpc.common): TRACE: self.gen.next()
(nova.rpc.common): TRACE: File "/opt/openstack/nova/nova/compute/manager.py", line 174, in decorated_function
(nova.rpc.common): TRACE: return function(self, context, instance_uuid, *args, **kwargs)
(nova.rpc.common): TRACE: File "/opt/openstack/nova/nova/compute/manager.py", line 936, in snapshot_instance
(nova.rpc.common): TRACE: self.driver.snapshot(context, instance_ref, image_id)
(nova.rpc.common): TRACE: File "/opt/openstack/nova/nova/exception.py", line 112, in wrapped
(nova.rpc.common): TRACE: return f(*args, **kw)
(nova.rpc.common): TRACE: File "/opt/openstack/nova/nova/virt/libvirt/connection.py", line 626, in snapshot
(nova.rpc.common): TRACE: snapshot_ptr = virt_dom.snapshotCreateXML(snapshot_xml, 0)
(nova.rpc.common): TRACE: File "/usr/lib/python2.7/dist-packages/libvirt.py", line 938, in snapshotCreateXML
(nova.rpc.common): TRACE: if ret is None:raise libvirtError('virDomainSnapshotCreateXML() failed', dom=self)
(nova.rpc.common): TRACE: libvirtError: Requested operation is not valid: Disk '/dev/disk/by-path/ip-192.168.6.95:3260-iscsi-iqn.2010-10.org.openstack:volume-00000001-lun-1' does not support snapshotting
(nova.rpc.common): TRACE:

Changed in nova:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Vish Ishaya (vishvananda)
milestone: none → essex-rc1

Fix proposed to branch: master
Review: https://review.openstack.org/5172

Changed in nova:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/5172
Committed: http://github.com/openstack/nova/commit/7dbf9c7de23623223ef60c0566d9330797c5f87e
Submitter: Jenkins
Branch: master

commit 7dbf9c7de23623223ef60c0566d9330797c5f87e
Author: Vishvananda Ishaya <email address hidden>
Date: Thu Mar 8 16:26:13 2012 -0800

    Make snapshots with qemu-img instead of libvirt

     * snapshot is only supposed to snapshot the root drive, whereas
       libvirt snapshots snapshot the memory and all attached disks
     * removes silly qemu_img flag
     * fixes bug 946830

    Change-Id: I6afc9dbaa855f06864cd5a37f89ad63555e35d23

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-03-20
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers