test_volume_create_get_update_delete_from_image fails because of: Unknown driver 'ami'

Bug #1693926 reported by Ihar Hrachyshka
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
In Progress
Undecided
Gorka Eguileor

Bug Description

http://logs.openstack.org/56/468056/3/check/gate-grenade-dsvm-neutron-multinode-ubuntu-xenial/92ec016/console.html

2017-05-26 18:55:17.746508 | Traceback (most recent call last):
2017-05-26 18:55:17.746524 | File "tempest/test.py", line 96, in wrapper
2017-05-26 18:55:17.746539 | return f(self, *func_args, **func_kwargs)
2017-05-26 18:55:17.746567 | File "tempest/api/volume/test_volumes_get.py", line 131, in test_volume_create_get_update_delete_from_image
2017-05-26 18:55:17.746585 | imageRef=CONF.compute.image_ref, size=disk_size)
2017-05-26 18:55:17.746609 | File "tempest/api/volume/test_volumes_get.py", line 42, in _volume_create_get_update_delete
2017-05-26 18:55:17.746623 | volume['id'], 'available')
2017-05-26 18:55:17.746644 | File "tempest/common/waiters.py", line 201, in wait_for_volume_resource_status
2017-05-26 18:55:17.746663 | resource_name=resource_name, resource_id=resource_id)
2017-05-26 18:55:17.746696 | tempest.exceptions.VolumeResourceBuildErrorException: volume e2671fb4-623a-4f0d-a7d4-4867cb7f954a failed to build and is in ERROR status

http://logs.openstack.org/56/468056/3/check/gate-grenade-dsvm-neutron-multinode-ubuntu-xenial/92ec016/logs/new/screen-c-vol.txt.gz#_2017-05-26_18_53_34_252

2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server [req-29b3dd39-599c-46a8-8f36-f6228c7d4383 - -] Exception during message handling
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 157, in _process_incoming
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 213, in dispatch
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 183, in _do_dispatch
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "<decorator-gen-237>", line 2, in create_volume
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/opt/stack/new/cinder/cinder/objects/cleanable.py", line 207, in wrapper
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server result = f(*args, **kwargs)
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/opt/stack/new/cinder/cinder/volume/manager.py", line 663, in create_volume
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server _run_flow()
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/opt/stack/new/cinder/cinder/volume/manager.py", line 655, in _run_flow
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server flow_engine.run()
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/taskflow/engines/action_engine/engine.py", line 247, in run
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server for _state in self.run_iter(timeout=timeout):
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/taskflow/engines/action_engine/engine.py", line 340, in run_iter
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server failure.Failure.reraise_if_any(er_failures)
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/taskflow/types/failure.py", line 336, in reraise_if_any
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server failures[0].reraise()
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/taskflow/types/failure.py", line 343, in reraise
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server six.reraise(*self._exc_info)
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/taskflow/engines/action_engine/executor.py", line 53, in _execute_task
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server result = task.execute(**arguments)
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/opt/stack/new/cinder/cinder/volume/flows/manager/create_volume.py", line 900, in execute
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server **volume_spec)
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/opt/stack/new/cinder/cinder/volume/flows/manager/create_volume.py", line 847, in _create_from_image
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server image_service)
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "<decorator-gen-236>", line 2, in _create_from_image_cache_or_download
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/opt/stack/new/cinder/cinder/coordination.py", line 298, in _synchronized
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server return f(*a, **k)
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/opt/stack/new/cinder/cinder/volume/flows/manager/create_volume.py", line 766, in _create_from_image_cache_or_download
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server image_service
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/opt/stack/new/cinder/cinder/volume/flows/manager/create_volume.py", line 673, in _create_from_image_download
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server image_service)
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server File "/opt/stack/new/cinder/cinder/volume/flows/manager/create_volume.py", line 541, in _copy_image_to_volume
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server raise exception.ImageCopyFailure(reason=ex.stderr)
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server ImageCopyFailure: Failed to copy image to volume: qemu-img: Could not open '/opt/stack/data/cinder/conversion/tmp7kA3apubuntu-xenial-2-node-osic-cloud1-s3700-9012281@lvmdriver-1': Unknown driver 'ami'
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server
2017-05-26 18:53:34.252 1566 ERROR oslo_messaging.rpc.server

Tags: gate-failure
tags: added: gate-failure
Revision history for this message
Javier Peña (jpena-c) wrote :

This seems to be related to https://review.openstack.org/#/c/453341/7/cinder/image/image_utils.py . This change is adding "-f src_format" to the qemu-img convert command-line, and that fails when the image type is "ami", because this is not a supported image type for qemu-img.

An easy way to reproduce this error is:

1- Upload an ami image (+kernel/ramdisk) to Glance.
2- Try to create an instance, booting from volume, using that image.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
assignee: nobody → Gorka Eguileor (gorka)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/470314
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=91f20a6ef5240fcd16cb14fdd6b53913de1940c2
Submitter: Jenkins
Branch: master

commit 91f20a6ef5240fcd16cb14fdd6b53913de1940c2
Author: Gorka Eguileor <email address hidden>
Date: Fri Jun 2 16:32:23 2017 +0200

    Fix support for AMI image conversion

    On commit b1ebfa4f5dcdef7f979f5ddf3209f551429dce47 we disabled qemu-img
    autodetection when converting an image, unfortunately this broke AMI
    images since qemu-img does not recognize "ami" as a valid format.

    This patch makes AMI images use autodetection again, which is a partial
    fix, since they will have problems with encrypted images.

    TrivialFix

    Change-Id: Icde4c0f936ce88892cb54e8e10d4852ebfc7b87e
    Partial-Bug: #1693926

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to cinder (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/487584

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to cinder (master)

Reviewed: https://review.openstack.org/487584
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=a27465512c74678c498680c844e7e9d091785ca0
Submitter: Jenkins
Branch: master

commit a27465512c74678c498680c844e7e9d091785ca0
Author: Eric Harney <email address hidden>
Date: Wed Jul 26 16:13:58 2017 -0400

    Fix image download to volume for iso images

    After changes made in
      b1ebfa4f qemu_img_info: Don't autodetect source format

    ISO image downloads from Glance fail because Cinder
    calls "qemu-img convert -f iso" and "iso" is not a supported
    image format in qemu-img. These should be treated as raw
    images during the download process.

    This would also be true for any other image formats
    supported by Glance that qemu-img cannot convert, but that
    list does not seem to include anything that we previously
    supported with Cinder downloads. (aki/ari, ovf/ova, docker)

    Change-Id: Ifa427b6d9894febd80142f7fb9e2c5ba8bc72e4c
    Closes-Bug: #1705407
    Related-Bug: #1693926

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.