Bug 1293491 - --os-endpoint-type is broken for OSP 6 glance client
Summary: --os-endpoint-type is broken for OSP 6 glance client
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-glanceclient
Version: 6.0 (Juno)
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: 6.0 (Juno)
Assignee: Flavio Percoco
QA Contact: Avi Avraham
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-21 22:27 UTC by Matt Flusche
Modified: 2023-02-22 23:02 UTC (History)
7 users (show)

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.
Clone Of:
Environment:
Last Closed: 2016-06-08 12:10:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1213 0 normal SHIPPED_LIVE openstack-glance bug fix advisory 2016-06-08 16:09:18 UTC

Description Matt Flusche 2015-12-21 22:27:22 UTC
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 14:34:22 UTC
Fixed in python-glanceclient-0.14.2-4.el7ost

Comment 6 Avi Avraham 2016-06-07 13:42:50 UTC
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 14:23:49 UTC
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 14:30:56 UTC
According to comment 7 the fix was verified by Matt

Comment 10 errata-xmlrpc 2016-06-08 12:10:56 UTC
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.