[Bug 1104584] [NEW] cinderclient fails when there are more than one volume endpoint
Andrew Glen-Young
1104584 at bugs.launchpad.net
Fri Jan 25 00:07:03 UTC 2013
Public bug reported:
After upgrading my installation from Folsom to Grizzly I received the
below error message when attempting to create a volume using the EC2 API
(I did not verify with the Nova API).
I have configured two regions; one each with a cinder endpoint. This
works for all other services except for cinder currently. The endpoints
are seen to be ambiguous because the cinder client (or nova's use of the
client) does not take region into consideration. The client uses a
servicetype:servicename:endpointtype tuple to determine whether an
endpoint is unique.
/var/log/nova/nova-api.log:
2013-01-24 22:48:26 23673 TRACE nova.api.ec2 Traceback (most recent call last):
2013-01-24 22:48:26 23673 TRACE nova.api.ec2 File "/usr/lib/python2.7/dist-packages/nova/api/ec2/__init__.py", line
486, in __call__
2013-01-24 22:48:26 23673 TRACE nova.api.ec2 result = api_request.invoke(context)
2013-01-24 22:48:26 23673 TRACE nova.api.ec2 File "/usr/lib/python2.7/dist-packages/nova/api/ec2/apirequest.py", li
ne 79, in invoke
2013-01-24 22:48:26 23673 TRACE nova.api.ec2 result = method(context, **args)
2013-01-24 22:48:26 23673 TRACE nova.api.ec2 File "/usr/lib/python2.7/dist-packages/nova/api/ec2/cloud.py", line 79
0, in create_volume
2013-01-24 22:48:26 23673 TRACE nova.api.ec2 **create_kwargs)
2013-01-24 22:48:26 23673 TRACE nova.api.ec2 File "/usr/lib/python2.7/dist-packages/nova/volume/cinder.py", line 21
7, in create
2013-01-24 22:48:26 23673 TRACE nova.api.ec2 item = cinderclient(context).volumes.create(size, **kwargs)
2013-01-24 22:48:26 23673 TRACE nova.api.ec2 File "/usr/lib/python2.7/dist-packages/nova/volume/cinder.py", line 65
, in cinderclient
2013-01-24 22:48:26 23673 TRACE nova.api.ec2 endpoint_type=endpoint_type)
2013-01-24 22:48:26 23673 TRACE nova.api.ec2 File "/usr/lib/python2.7/dist-packages/cinderclient/service_catalog.py
", line 75, in url_for
2013-01-24 22:48:26 23673 TRACE nova.api.ec2 endpoints=matching_endpoints)
2013-01-24 22:48:26 23673 TRACE nova.api.ec2 AmbiguousEndpoints: AmbiguousEndpoints: [{u'adminURL': u'http://10.55.58.1:8776/v1/df473f958e4f47949282696966e58f49', u'region': u'lcy01', u'id': u'a60223bd41df4cdf8fb28dcdffe5adad', 'serviceName': u'cinder', u'internalURL': u'http://10.55.58.1:8776/v1/df473f958e4f47949282696966e58f49', u'publicURL': u'https://cinder-lcy01.internal/v1/df473f958e4f47949282696966e58f49'}, {u'adminURL': u'http://10.55.62.1:8776/v1/df473f958e4f47949282696966e58f49', u'region': u'lcy02', u'id': u'14de3dace2284d4eaf95576ae7e2e40d', 'serviceName': u'cinder', u'internalURL': u'http://10.55.62.1:8776/v1/df473f958e4f47949282696966e58f49', u'publicURL': u'https://cinder-lcy02.internal/v1/df473f958e4f47949282696966e58f49'}]
The endpoints prettyprinted:
[
{'adminURL': 'http://10.55.58.1:8776/v1/df473f958e4f47949282696966e58f49',
'region': 'lcy01',
'id': 'a60223bd41df4cdf8fb28dcdffe5adad',
'serviceName': 'cinder',
'internalURL': 'http://10.55.58.1:8776/v1/df473f958e4f47949282696966e58f49',
'publicURL': 'https://cinder-lcy01.internal/v1/df473f958e4f47949282696966e58f49'},
{'adminURL': 'http://10.55.62.1:8776/v1/df473f958e4f47949282696966e58f49',
'region': 'lcy02',
'id': '14de3dace2284d4eaf95576ae7e2e40d',
'serviceName': 'cinder',
'internalURL': 'http://10.55.62.1:8776/v1/df473f958e4f47949282696966e58f49',
'publicURL': 'https://cinder-lcy02.internal/v1/df473f958e4f47949282696966e58f49'}
]
Workaround:
1. I created another service name and service type named 'fakecinder' in keystone.
2. I removed the second region's 'volume' endpoint.
3. I then added the following to the second region's nova.conf: 'cinder_catalog_info=fakecinder:fakecinder:publicURL'
4. Restarted nova-api.
System Information:
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS"
# dpkg-query --show nova-api
nova-api 2013.1~g1-0ubuntu1~cloud0
** Affects: nova (Ubuntu)
Importance: Undecided
Status: New
** Tags: canonistack
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to nova in Ubuntu.
https://bugs.launchpad.net/bugs/1104584
Title:
cinderclient fails when there are more than one volume endpoint
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nova/+bug/1104584/+subscriptions
More information about the Ubuntu-server-bugs
mailing list