Havana cinder requires glance API V2

Bug #1252549 reported by Sam Morrison on 2013-11-19
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Cinder
Medium
Sam Morrison
Havana
Medium
Sam Morrison

Bug Description

To create an volume from an image Havana cinder now requires glance api V2.

Glance API V2 wasn't needed in Grizzly and is not deployed in production in many place yet (from my understanding)

It doesn't look like there is an actual need to use V2, the glance wrapper in cinder can handle the case. The problem is in the task flow.

2013-11-19 13:57:20.200 16395 DEBUG cinder.taskflow.utils [-] Calling rollback 3: cinder.volume.flows.base.InjectTask;volume:create==1.0 rollback /usr/lib/python2.7/dist-packages/cinder/taskflow/utils.py:351
2013-11-19 13:57:20.201 16395 DEBUG cinder.volume.flows.utils [req-438b5b54-5aa6-402f-bfe6-1b3d21c18ce2 d9646718471b46aeb5fd94c702336ca9 0bdf024c921848c4b74d9e69af9edf08] LinearFlow: volume_create_manager; f-cb3fa727-fa8c-407f-b89c-aa8ae20c4480; 6; 0; FAILURE has moved into state FAILURE from state REVERTING flow_log_change /usr/lib/python2.7/dist-packages/cinder/volume/flows/utils.py:41
2013-11-19 13:57:20.202 16395 ERROR cinder.openstack.common.rpc.amqp [req-438b5b54-5aa6-402f-bfe6-1b3d21c18ce2 d9646718471b46aeb5fd94c702336ca9 0bdf024c921848c4b74d9e69af9edf08] Exception during message handling
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp Traceback (most recent call last):
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/rpc/amqp.py", line 441, in _process_data
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp **args)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/rpc/dispatcher.py", line 148, in dispatch
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp return getattr(proxyobj, method)(ctxt, **kwargs)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/utils.py", line 819, in wrapper
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp return func(self, *args, **kwargs)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 257, in create_volume
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp flow.run(context.elevated())
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/taskflow/decorators.py", line 105, in wrapper
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp return f(self, *args, **kwargs)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/taskflow/patterns/linear_flow.py", line 232, in run
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp run_it(r)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/taskflow/patterns/linear_flow.py", line 212, in run_it
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp self.rollback(context, cause)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp self.gen.next()
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/taskflow/patterns/linear_flow.py", line 172, in run_it
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp result = runner(context, *args, **kwargs)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/taskflow/utils.py", line 260, in __call__
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp self.result = self.task(*args, **kwargs)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/volume/flows/create_volume/__init__.py", line 1162, in __call__
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp image_id),
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/image/glance.py", line 241, in get_location
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp _reraise_translated_image_exception(image_id)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/image/glance.py", line 239, in get_location
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp image_meta = client.call(context, 'get', image_id)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/image/glance.py", line 157, in call
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp version)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/image/glance.py", line 138, in _create_onetime_client
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp self.use_ssl, version)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/cinder/image/glance.py", line 86, in _create_glance_client
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp return glanceclient.Client(str(version), endpoint, **params)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/glanceclient/client.py", line 22, in Client
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp return client_class(*args, **kwargs)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/glanceclient/v2/client.py", line 38, in __init__
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp image_model = self._get_image_model()
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/glanceclient/v2/client.py", line 46, in _get_image_model
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp schema = self.schemas.get('image')
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/glanceclient/v2/schemas.py", line 53, in get
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp _, raw_schema = self.http_client.json_request('GET', uri)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 249, in json_request
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp resp, body_iter = self._http_request(url, method, **kwargs)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/glanceclient/common/http.py", line 238, in _http_request
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp raise exc.from_response(resp)
2013-11-19 13:57:20.202 16395 TRACE cinder.openstack.common.rpc.amqp HTTPMultipleChoices: HTTPMultipleChoices (HTTP 300) Requested version of OpenStack Images API is notavailable.

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

Changed in cinder:
assignee: nobody → Sam Morrison (sorrison)
status: New → In Progress
Changed in cinder:
milestone: none → icehouse-1
importance: Undecided → Medium

Reviewed: https://review.openstack.org/57094
Committed: http://github.com/openstack/cinder/commit/a5424f700e6cce409763019906acfe293a75ed1a
Submitter: Jenkins
Branch: master

commit a5424f700e6cce409763019906acfe293a75ed1a
Author: Sam Morrison <email address hidden>
Date: Tue Nov 19 15:20:05 2013 +1100

    Don't do glance v2 calls when config is set to v1

    Fixes bug 1252549

    Change-Id: I6d9509bfecd2f73040a0ad27aff8fc5f6fd0a899

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-12-04
Changed in cinder:
status: Fix Committed → Fix Released

Reviewed: https://review.openstack.org/58198
Committed: http://github.com/openstack/cinder/commit/ce76ba93e861b7b8e780414a0904cb412088c7d7
Submitter: Jenkins
Branch: stable/havana

commit ce76ba93e861b7b8e780414a0904cb412088c7d7
Author: Sam Morrison <email address hidden>
Date: Tue Nov 19 15:20:05 2013 +1100

    Don't do glance v2 calls when config is set to v1

    Fixes bug 1252549

    Change-Id: I6d9509bfecd2f73040a0ad27aff8fc5f6fd0a899
    (cherry picked from commit a5424f700e6cce409763019906acfe293a75ed1a)

tags: added: in-stable-havana
Alan Pevec (apevec) on 2013-12-09
tags: removed: in-stable-havana
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers