EmptyCatalog not treated during cinderclient creation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Opinion
|
Wishlist
|
Unassigned |
Bug Description
Steps to reproduce
==================
1 - Get a keystone v3 token using the ?nocatalog param. Example:
export TOKEN=`curl -i -k -v -H "Content-type: application/json" -d '{"auth": {"identity": {"methods": ["password"], "password": {"user": {"domain": {"name": "Default"}, "name": "test", "password": "password"}}}, "scope": {"project": {"name": "test-project", "domain": {"name": "Default"}}}}}' http://
2 - Try to create a server using a cinder volume. Example:
curl -k -v -H "X-Auth-
Actual result
=============
{"badRequest": {"message": "Block Device Mapping is Invalid: failed to get volume 85397498-
Expected result
===============
A meaningful error message is displayed.
Details
=======
- During cinderclient creation, nova tries to get cinder's endpoint using the auth object obtained from the token without the catalog [1]. keystoneauth will raise an EmptyCatalog exception [2] that is not treated and will result in the error seen above.
[1] https:/
[2] https:/
- This issue might happen in other areas of code, is not necessarily exclusive to the cinderclient creation.
EmptyCatalog means that the session you were using tried to find the URL for the endpoint and the catalog was empty - which makes sense because you used ?nocatalog.
My question would be why ?nocatalog? If you opt out of receiving a catalog then you are going to have to specify the full URL to the endpoint in the request.