Bug 1030088 - packstack should deploy Cinder v2 API
packstack should deploy Cinder v2 API
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-packstack (Show other bugs)
Unspecified Unspecified
high Severity high
: rc
: 4.0
Assigned To: Ivan Chavero
Lon Hohberger
: OtherQA, Reopened, Triaged
Depends On:
  Show dependency treegraph
Reported: 2013-11-13 16:52 EST by Eric Harney
Modified: 2016-04-26 17:24 EDT (History)
7 users (show)

See Also:
Fixed In Version: openstack-packstack-2013.2.1-0.15.dev924.el6ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-19 19:35:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 60864 None None None Never
Red Hat Product Errata RHEA-2013:1859 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Enhancement Advisory 2013-12-20 19:01:48 EST

  None (edit)
Description Eric Harney 2013-11-13 16:52:32 EST
Description of problem:
Packstack currently only deploys the v1 Cinder API.  It should also deploy the v2 API as a keystone endpoint.

Version-Release number of selected component (if applicable):

Steps to Reproduce:
1.  Deploy Cinder w/ packstack
2.  $ OS_VOLUME_API_VERSION=2 cinder --debug list

Actual results:
InvalidAPIVersion error

Expected results:
Hits http://192.168.xxx.yyy:8776/v2/ and returns volume information.
Comment 1 Alvaro Lopez Ortega 2013-11-15 08:32:16 EST
We'll have to investigate how this should be implemented.
Comment 2 Eric Harney 2013-11-15 11:16:39 EST
FWIW devstack does this:

Comment 3 Ivan Chavero 2013-11-29 03:00:09 EST
The v2 api is enabled by default in RHOS 4.0, tested in a installed openstack using packstack 0.15.dev847.el6

checking out /etc/cinder/cinder.conf

i see:

# Deploy v2 of the Cinder API.  (boolean value)

OS_VOLUME_API_VERSION=2 cinder --debug list

REQ: curl -i -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-cinderclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "a7467386308f43f8"}}}'

REQ: curl -i -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-cinderclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "a7467386308f43f8"}}}'

RESP: [200] {'date': 'Fri, 29 Nov 2013 07:57:48 GMT', 'content-type': 'application/json', 'content-length': '8372', 'vary': 'X-Auth-Token'}
RESP BODY: {"access": {"token": {"issued_at": "2013-11-29T07:57:47.883986", "expires": "2013-11-30T07:57:47Z", "id": "MIIOxAYJKoZIhvcNAQcCoIIOtTCCDrECAQExCTAHBgUrDgMCGjCCDRoGCSqGSIb3DQEHAaCCDQsEgg0HeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0xMS0yOVQwNzo1Nzo0Ny44ODM5ODYiLCAiZXhwaXJlcyI6ICIyMDEzLTExLTMwVDA3OjU3OjQ3WiIsICJpZCI6ICJwbGFjZWhvbGRlc


<last lines ommited>
Comment 4 Alvaro Lopez Ortega 2013-11-29 16:22:52 EST
It doesn't seem to be a valid bug, and so I'm closing it.
Eric, please, do not hesitate to reopen it if we missed anything.
Comment 5 Eric Harney 2013-12-02 19:35:48 EST
(In reply to Alvaro Lopez Ortega from comment #4)
Something doesn't seem right here.  I don't see a v2 endpoint, at least running packstack in an upgrade scenario.  (Build is 847.)  I haven't tried a new deployment lately, but it needs to create one when upgrading anyway.

Ivan's output only shows that it hit Keystone v2 for auth... the test here should be that
a) "keystone endpoint-list" has something pointing to :8776/v2/
and b
b) "cinder --debug list"  actually uses that endpoint when OS_VOLUME_API_VERSION=2 is set.

(a) doesn't happen on my machine, and in my test today, (b) fails with "Could not find any suitable endpoint. Correct region?" which makes sense based on the endpoint-list.

"enable_v2_api=True" in cinder.conf just enables it on the server, but that doesn't help anything access it, since it's not in the keystone catalog.
Comment 6 Alvaro Lopez Ortega 2013-12-04 12:21:38 EST
Eric, thanks for the feedback.
Ivan is checking it out again.
Comment 7 Ivan Chavero 2013-12-05 18:47:59 EST
Cinder has the api v2 enabled by default, it's keystone the one that does not have the endpoint configured.

I'm making the proper changes to the packstack templates so the v2 endpoint is added to keystone
Comment 8 Lon Hohberger 2013-12-11 15:18:17 EST
With: openstack-packstack-2013.2.1-0.14.dev919.el6ost.noarch

# Deploy v2 of the Cinder API.  (boolean value)

# keystone endpoint-list | grep 8776

| 64c1c7e3d0534a339712889c6ee7ed0e | RegionOne |    |    | | 9ae44956eee94c0b8a19d4d339c5d51b |

# OS_VOLUME_API_VERSION=2 cinder --debug list


Could not find any suitable endpoint. Correct region?

Will retest with .17
Comment 9 Lon Hohberger 2013-12-11 16:15:34 EST
With .18:

[root@localhost ~(keystone_admin)]# keystone endpoint-list | grep 8776
| cdca6984077c443c95241ef54f74798d | RegionOne |   |   | | ed499b7c7d224170b35d6265be803909 |
| e84145d9fc78434089cccfec3e724b85 | RegionOne |   |   | | 1e2d620b70af4136b1f005aa764c595e |

[root@localhost ~(keystone_admin)]# OS_VOLUME_API_VERSION=2 cinder --debug list

RESP: [200] {'date': 'Wed, 11 Dec 2013 21:14:02 GMT', 'x-compute-request-id': 'req-776e8b1e-c6f1-4b58-a083-08060eb60f3a', 'content-type': 'application/json', 'content-length': '15'}
RESP BODY: {"volumes": []}

DEBUG:cinderclient.client:RESP: [200] {'date': 'Wed, 11 Dec 2013 21:14:02 GMT', 'x-compute-request-id': 'req-776e8b1e-c6f1-4b58-a083-08060eb60f3a', 'content-type': 'application/json', 'content-length': '15'}
RESP BODY: {"volumes": []}

[root@localhost ~(keystone_admin)]# echo $?
Comment 12 errata-xmlrpc 2013-12-19 19:35:40 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.