Setting OS_ENDPOINT_TYPE environment option does not work for all cinder client commands

Bug #1568121 reported by Kam Nasim
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
New
Undecided
Kam Nasim

Bug Description

As per the fix for Bug #1453901 in python-cinderclient, support was adding for OS_ENDPOINT_TYPE to bring cinderclient inline with other OS clients. Before that the only environment option available in cinder client, to configure Keystone endpoint type was CINDER_ENDPOINT_TYPE. However despite this fix, CINDER_ENDPOINT_TYPE is still need for some operations such as cinder quota-update

=== By default Cinder client uses "publicURL" as the Keystone endpoint type ===

=== Setting OS_ENDPOINT_TYPE to "internalURL" should expect cinder client to use the internal endpoint returned from Keystone service catalog; this is specially useful if publicURL is over HTTPS ===
$ OS_ENDPOINT_TYPE="internalURL"

$ cinder --debug quota-update 74448d87b1d5472da73dc398ec3e4bf6 --volumes 2 --snapshots 2
DEBUG:keystoneclient.session:REQ: curl -g -i -X GET http://192.168.204.2:5000/v2.0/ -H "Accept: application/json" -H "User-Agent: python-keystonecli ent"
DEBUG:keystoneclient.session:RESP: [200] content-length: 339 vary: X-Auth-Token connection: keep-alive date: Fri, 08 Apr 2016 15:59:17 GMT content-t ype: application/json x-openstack-request-id: req-94a9272d-4aba-4345-a7ef-e877f061b153
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd .openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://192.168.204.2:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstac k.org/", "type": "text/html", "rel": "describedby"}]}}

DEBUG:keystoneclient.auth.identity.v2:Making authentication request to http://192.168.204.2:5000/v2.0/tokens
DEBUG:keystoneclient.session:REQ: curl -g -i -X PUT https://10.10.10.2:8776/v1/0713dca80afe4e018ebebb1196178de6/os-quota-sets/74448d87b1d5472da73dc3 98ec3e4bf6 -H "User-Agent: python-cinderclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}e45828e0b3 a20bb258d867f62938044e957abfc3" -d '{"quota_set": {"tenant_id": "74448d87b1d5472da73dc398ec3e4bf6", "snapshots": 2, "volumes": 2}}'
ERROR: SSL exception connecting to https://10.10.10.2:8776/v1/0713dca80afe4e018ebebb1196178de6/os-quota-sets/74448d87b1d5472da73dc398ec3e4bf6: [Errn o bad handshake] [('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')]

==== cinder client got the publicURL despite setting OS_ENDPOINT_TYPE to "internalURL" ====

=== setting CINDER_ENDPOINT_TYPE to internalURL gives the proper endpoint and command goes through ===

$ export CINDER_ENDPOINT_TYPE=internalURL
$ cinder quota-update 74448d87b1d5472da73dc398ec3e4bf6 --volumes 2 --snapshots 2
+-----------------+-------+
| Property | Value |
+-----------------+-------+
| gigabytes | 1000 |
| gigabytes_iscsi | -1 |
| snapshots | 2 |
| snapshots_iscsi | -1 |
| volumes | 2 |
| volumes_iscsi | -1 |
+-----------------+-------+

wuyuting (wytdahu)
Changed in python-cinderclient:
assignee: nobody → wuyuting (wytdahu)
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Owner Expired

Unassigning due to no activity.

Changed in python-cinderclient:
assignee: wuyuting (wytdahu) → nobody
Kam Nasim (knasim-wrs)
Changed in python-cinderclient:
assignee: nobody → Kam Nasim (knasim-wrs)
Revision history for this message
HCLTech-SSW (hcltech-ssw) wrote :

We have tried to replicate this issue, but not able to replicate it.

It is working fine with the commands as provided in the bug description.

We have checked in Mitaka Release.

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.