Can't create volume from non-raw image

Bug #1406784 reported by Yang Luo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Undecided
Unassigned
openstack-manuals
Fix Released
Medium
Harry Sutton

Bug Description

1. Create an image using a non-raw image (qcow2 or vmdk is ok)
2. Copy the image to a volume, and failed.

Log:
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 133, in _dispatch_and_reply
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 176, in _dispatch
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 122, in _do_dispatch
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 363, in create_volume
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher _run_flow()
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 356, in _run_flow
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher flow_engine.run()
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/taskflow/utils/lock_utils.py", line 53, in wrapper
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher return f(*args, **kwargs)
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/taskflow/engines/action_engine/engine.py", line 111, in run
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher self._run()
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/taskflow/engines/action_engine/engine.py", line 121, in _run
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher self._revert(misc.Failure())
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/taskflow/engines/action_engine/engine.py", line 78, in _revert
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher misc.Failure.reraise_if_any(failures.values())
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/taskflow/utils/misc.py", line 558, in reraise_if_any
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher failures[0].reraise()
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/taskflow/utils/misc.py", line 565, in reraise
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher six.reraise(*self._exc_info)
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/taskflow/engines/action_engine/executor.py", line 36, in _execute_task
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher result = task.execute(**arguments)
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/flows/manager/create_volume.py", line 594, in execute
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher **volume_spec)
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/flows/manager/create_volume.py", line 556, in _create_from_image
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher image_id, image_location, image_service)
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/flows/manager/create_volume.py", line 463, in _copy_image_to_volume
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher raise exception.ImageUnacceptable(ex)
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher ImageUnacceptable: Image 92fad7ae-6439-4c69-bdf4-4c6cc5759225 is unacceptable: qemu-img is not installed and image is of type vmdk. Only RAW images can be used if qemu-img is not installed.
2014-12-31 07:06:09.299 2159 TRACE oslo.messaging.rpc.dispatcher
2014-12-31 07:06:09.307 2159 ERROR oslo.messaging._drivers.common [req-2e2ded9a-e9ac-4996-b5e6-5c52ce41a05b 8481fe632326487db70e308ae070040f eaca1af2b7b74cdfaf1e61c081d6d255 - - -] Returning exception Image 92fad7ae-6439-4c69-bdf4-4c6cc5759225 is unacceptable: qemu-img is not installed and image is of type vmdk. Only RAW images can be used if qemu-img is not installed. to caller

Cause:
cinder-volume node should install qemu-img before volume creation. Using follow:
apt-get install qemu

Yang Luo (hsluoyz)
affects: nova → cinder
Yang Luo (hsluoyz)
Changed in cinder:
status: New → Confirmed
Revision history for this message
John Griffith (john-griffith) wrote :

I think this is up to your install or distribution that you're using. In other words, Cinder does not install packages, that's deployment. What you're reporting here is not a bug, if there's no info in the docs about installing qemu tools that is possibly something we could add.

What OpenStack distribution are you using?

Changed in cinder:
status: Confirmed → Invalid
Revision history for this message
Yang Luo (hsluoyz) wrote :

@John

I'm using 1:2014.1.3-0ubuntu1~cloud0 distribution. Followed official icehouse docs, this guide didn't give a shot about qemu install thing:
http://docs.openstack.org/icehouse/install-guide/install/apt/content/

tags: added: documentation
Revision history for this message
John Griffith (john-griffith) wrote :

@Yang Lou

Thanks a lot for the quick follow up, unfortunately I just took a look at the current docs and it's missing there as well. Let's get something logged against docs and see if we can get something submitted to clear this up.

Thanks a lot for bringing this up and logging the issue.

Changed in nova:
assignee: nobody → Anusha rayani (anusha-rayani)
Yang Luo (hsluoyz)
tags: added: low-hanging-fruit
Changed in nova:
status: New → Confirmed
affects: nova → openstack-manuals
Changed in openstack-manuals:
assignee: Anusha rayani (anusha-rayani) → nobody
importance: Undecided → Medium
Revision history for this message
Harry Sutton (harry-sutton) wrote :

Picked up this bug to work as part of the OpenStack Upstream Training in Vancouver.

Changed in openstack-manuals:
assignee: nobody → Harry Sutton (harry-sutton)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-manuals (master)

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

Changed in openstack-manuals:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-manuals (master)

Reviewed: https://review.openstack.org/187072
Committed: https://git.openstack.org/cgit/openstack/openstack-manuals/commit/?id=c3087f921f5be2fd0c271156068ae94d0540e8e8
Submitter: Jenkins
Branch: master

commit c3087f921f5be2fd0c271156068ae94d0540e8e8
Author: Harry Sutton <email address hidden>
Date: Sun May 31 15:23:59 2015 -0400

    Instructions to add a required dependency package

    Adds the qemu package to allow creation or importing of QCOW or VMDK
    (non-raw) images. Amended to correct style and verbiage errors.

    Change-Id: I2919fee543e714a85042d37400c6a6d7faae62e0
    Closes-bug: #1406784

Changed in openstack-manuals:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-manuals 15.0.0

This issue was fixed in the openstack/openstack-manuals 15.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.