Bug 1293491 - --os-endpoint-type is broken for OSP 6 glance client
--os-endpoint-type is broken for OSP 6 glance client
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-glanceclient (Show other bugs)
6.0 (Juno)
x86_64 Linux
medium Severity medium
: ---
: 6.0 (Juno)
Assigned To: Flavio Percoco
Avi Avraham
: Triaged, ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-21 17:27 EST by Matt Flusche
Modified: 2016-06-08 08:10 EDT (History)
8 users (show)

See Also:
Fixed In Version: python-glanceclient-0.14.2-4.el7ost
Doc Type: Bug Fix
Doc Text:
Previously, an incompatibility with keystoneclient v3 caused some parameters to be ignored. Now, the keyword argument `endpoint_type` has been replaced with `interface`, resolving this issue.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-08 08:10:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matt Flusche 2015-12-21 17:27:22 EST
Description of problem:

We seem to be hitting this upstream bug in OSP 6 and would like it reviewed for backported if possible.

https://bugs.launchpad.net/python-glanceclient/+bug/1367782

fixed by:

https://review.openstack.org/#/c/120442/


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

python-glanceclient-0.14.2-2.el7ost.noarch


How reproducible:
100%

Steps to Reproduce:
1. glance --os-endpoint-type internalURL --debug image-list  (where internalURL is different from publicURL)
2.
3.

Actual results:
glance uses publicURL

Expected results:
glance should use internalURL



Additional info:
I've verified this fix resolves the issue with OSP 6.
Comment 4 Sergey Gotliv 2016-01-03 09:34:22 EST
Fixed in python-glanceclient-0.14.2-4.el7ost
Comment 6 Avi Avraham 2016-06-07 09:42:50 EDT
According to the bug description this fix was already verified 
Is this the case ? We have some difficulty to reproduce rhos6 environment with public and internal url that are in different networks
Comment 7 Matt Flusche 2016-06-07 10:23:49 EDT
Hi Avi,

Yes, python-glanceclient-0.14.2-4.el7ost resolves this issue.  Here is my verification:


## Different URLs for public and internal glance endpoints.

# keystone catalog
...
Service: image
+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
|   adminURL  |      http://127.0.0.1:9292       |
|      id     | 1425adffa7f149b2b78c4d33dec6b45d |
| internalURL |    http://10.13.214.222:9292     |
|  publicURL  |      http://127.0.0.1:9292       |
|    region   |            RegionOne             |
+-------------+----------------------------------+


# rpm -q python-glanceclient
python-glanceclient-0.14.2-2.el7ost.noarch

# Here both requests use publicURL

# glance --os-endpoint-type publicURL --debug image-list
curl -i -X GET -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: {SHA1}5bdb6900efcac4ce7624c673a04233d57e7dd1ad' -H 'Content-Type: application/octet-stream' http://127.0.0.1:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20

# glance --os-endpoint-type internalURL --debug image-list
curl -i -X GET -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: {SHA1}4445a37b703242a62629042d5d6200232885ae2e' -H 'Content-Type: application/octet-stream' http://127.0.0.1:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20


# rpm -Uvh http://download.eng.bos.redhat.com/brewroot/packages/python-glanceclient/0.14.2/4.el7ost/noarch/python-glanceclient-0.14.2-4.el7ost.noarch.rpm
Retrieving http://download.eng.bos.redhat.com/brewroot/packages/python-glanceclient/0.14.2/4.el7ost/noarch/python-glanceclient-0.14.2-4.el7ost.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:python-glanceclient-1:0.14.2-4.el################################# [ 50%]
Cleaning up / removing...
   2:python-glanceclient-1:0.14.2-2.el################################# [100%]


# Now internalURL works as expected

# glance --os-endpoint-type publicURL --debug image-list
curl -i -X GET -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: {SHA1}756906b2c94b4d46229cc9e4c81579f377b6ae24' -H 'Content-Type: application/octet-stream' http://127.0.0.1:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20

# glance --os-endpoint-type internalURL --debug image-list
curl -i -X GET -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-glanceclient' -H 'Connection: keep-alive' -H 'X-Auth-Token: {SHA1}83eaadb9ca53a2f3eaf3e0b7e760778411f04be8' -H 'Content-Type: application/octet-stream' http://10.13.214.222:9292/v1/images/detail?sort_key=name&sort_dir=asc&limit=20
Comment 8 Avi Avraham 2016-06-07 10:30:56 EDT
According to comment 7 the fix was verified by Matt
Comment 10 errata-xmlrpc 2016-06-08 08:10:56 EDT
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.

https://access.redhat.com/errata/RHBA-2016:1213

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