[SRU] CLI endpoint type handling broken

Bug #1579768 reported by Stuart McLaren
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Undecided
Niall Bunting
Liberty
Fix Committed
Undecided
Unassigned
Mitaka
Fix Committed
Critical
Unassigned
python-glanceclient (Ubuntu)
Fix Released
Undecided
Corey Bryant
Xenial
Fix Released
Undecided
Corey Bryant

Bug Description

[Impact]
If you have multiple endpoints configured as follows:

 $ openstack endpoint list|grep glance
 | 3ee11ce39098457d9dbf788fcdffbb5e | region1 | glance | image | True | internal | https://192.168.245.9:9292 |
 | bba9cb25c0fc46f38ad41bc2944f952f | region1 | glance | image | True | public | https://myhelion.test:9292 |
 | db38baa73a8542f39df4de424e407014 | region1 | glance | image | True | admin | https://192.168.245.9:9292

It should be possible to run:

 $ glance --os-cacert /tmp/ca-certificates.crt --os-tenant-name admin --os-username admin --os-password xxx --os-auth-url https://192.168.245.9:35357 --os-endpoint-type internalURL image-list

This command used to work successfully on the liberty stable branch.

For example if you check out this commit from the liberty stable branch:

 $ git checkout c077858dd6e0cd827af2418e1a05ca1f27937764

it works ok.

If you check out the head of the liberty stable branch though it fails with:

 Error finding address for https://myhelion.test:9292/versions: Unable to establish connection to https://myhelion.test:9292/versions

If you checkout the master branch it fails with the same error.

If you revert this patch:

 commit c11c8c432bde60e6ef652119186aa205c3bf3076
 Author: Darja Shakhray <email address hidden>
 Date: Tue Dec 29 16:41:38 2015 +0300

    Use session when not specified token or endpoint

    When no token or endpoint, it creates a session and from there
    taken the necessary values.
    This commit proposes to transfer a session in such cases.
    This will avoid unnecessary actions and some of the problems.

    Change-Id: Idc874b6c01e915e52904604d59e8e0b460e71621
    Partial-bug: #1519546
    (cherry picked from commit bda34034eb74023ffb1edf4a0c26aa574da0926d)

On stable/liberty, then the command starts working again.

Similarly, if you revert that change on master the command starts working again.

(The equivalent openstack client command works ok.)

[Test Case]

See Impact section.

[Regression Potential]

The fixes are cherry-picked and unchanged from upstream master and stable/mitaka branches, helping to limit the regression potential.

Changed in python-glanceclient:
assignee: nobody → Niall Bunting (niall-bunting)
summary: - CLI endpoint handling broken
+ CLI endpoint type handling broken
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/314216

Changed in python-glanceclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/314216
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=a862196cfb7f7323b1864b4c1660c39850487a64
Submitter: Jenkins
Branch: master

commit a862196cfb7f7323b1864b4c1660c39850487a64
Author: Niall Bunting <email address hidden>
Date: Mon May 9 16:23:33 2016 +0000

    Get endpoint if os_image_url is not set

    If env['OS_IMAGE_URL'] is not set then None is returned. This is then
    used ignoring the endpoint_type, service_type and region_name. This
    patch will use those values if the endpoint is None.

    Change-Id: I76cc527b05d2be75d3dbc33123a0d71be97fe25c
    Closes-bug: #1579768

Changed in python-glanceclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/320446

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/320449

Revision history for this message
Niall Bunting (niall-bunting) wrote : Re: CLI endpoint type handling broken

This bug also affects both of these releases as well as the patch was back ported to liberty.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (stable/mitaka)

Reviewed: https://review.openstack.org/320449
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=f6b9e791c35a085cd6d9fd5e5a87aa5cc5fadb00
Submitter: Jenkins
Branch: stable/mitaka

commit f6b9e791c35a085cd6d9fd5e5a87aa5cc5fadb00
Author: Niall Bunting <email address hidden>
Date: Mon May 9 16:23:33 2016 +0000

    Get endpoint if os_image_url is not set

    If env['OS_IMAGE_URL'] is not set then None is returned. This is then
    used ignoring the endpoint_type, service_type and region_name. This
    patch will use those values if the endpoint is None.

    Change-Id: I76cc527b05d2be75d3dbc33123a0d71be97fe25c
    Closes-bug: #1579768
    (cherry picked from commit a862196cfb7f7323b1864b4c1660c39850487a64)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (stable/liberty)

Reviewed: https://review.openstack.org/320446
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=8af249fcc9c5d1fe92f010eb19c6276cb5167bf6
Submitter: Jenkins
Branch: stable/liberty

commit 8af249fcc9c5d1fe92f010eb19c6276cb5167bf6
Author: Niall Bunting <email address hidden>
Date: Mon May 9 16:23:33 2016 +0000

    Get endpoint if os_image_url is not set

    If env['OS_IMAGE_URL'] is not set then None is returned. This is then
    used ignoring the endpoint_type, service_type and region_name. This
    patch will use those values if the endpoint is None.

    Change-Id: I76cc527b05d2be75d3dbc33123a0d71be97fe25c
    Closes-bug: #1579768
    (cherry picked from commit a862196cfb7f7323b1864b4c1660c39850487a64)

summary: - CLI endpoint type handling broken
+ [SRU] CLI endpoint type handling broken
Changed in python-glanceclient (Ubuntu):
status: New → Fix Released
assignee: nobody → Corey Bryant (corey.bryant)
Changed in python-glanceclient (Ubuntu Xenial):
assignee: nobody → Corey Bryant (corey.bryant)
Changed in python-glanceclient (Ubuntu Xenial):
status: New → In Progress
description: updated
Changed in python-glanceclient (Ubuntu Xenial):
status: In Progress → Fix Committed
status: Fix Committed → In Progress
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Stuart, or anyone else affected,

Accepted python-glanceclient into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/python-glanceclient/1:2.0.0-2ubuntu0.16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in python-glanceclient (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-glanceclient 2.1.0

This issue was fixed in the openstack/python-glanceclient 2.1.0 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-glanceclient 2.0.1

This issue was fixed in the openstack/python-glanceclient 2.0.1 release.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hi Chris,

python-glanceclient 1:2.0.0-2ubuntu0.16.04.1 has been tested successfully.

Thanks,
Corey

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-glanceclient - 1:2.0.0-2ubuntu0.16.04.1

---------------
python-glanceclient (1:2.0.0-2ubuntu0.16.04.1) xenial; urgency=medium

  * d/p/get-endpoint.patch: Cherry-pick patch from upstream stable/mitaka
    branch to get endpoint if os_image_url is not set (LP: #1579768).

 -- Corey Bryant <email address hidden> Tue, 14 Jun 2016 16:25:01 -0400

Changed in python-glanceclient (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Update Released

The verification of the Stable Release Update for python-glanceclient has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-glanceclient 2.0.1

This issue was fixed in the openstack/python-glanceclient 2.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-glanceclient 1.1.2

This issue was fixed in the openstack/python-glanceclient 1.1.2 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.