Compute region selection broken

Bug #1405416 reported by Terry Howe
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
Terry Howe

Bug Description

Region selection for compute is not working from environment variables or command line options. The region is not passed to the get_endpoint call to select the endpoint.

Terry Howe (thowe-g)
Changed in python-openstackclient:
assignee: nobody → Terry Howe (thowe-g)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

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

Reviewed: https://review.openstack.org/143835
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=1927b03cc740378fcc1d146803cee988ec93e6a2
Submitter: Jenkins
Branch: master

commit 1927b03cc740378fcc1d146803cee988ec93e6a2
Author: Terry Howe <email address hidden>
Date: Wed Dec 24 06:08:19 2014 -0700

    Compute calls ignore region selection

    Calls to compute commands ignore region selection. The region is
    not passed to the get_endpoint call.

    Change-Id: I1ccfc56d7cb27a00b8982232a40ace21f2c0e9a2
    Closes-Bug: 1405416

Changed in python-openstackclient:
status: In Progress → Fix Committed
Dean Troyer (dtroyer)
Changed in python-openstackclient:
milestone: none → m7
Revision history for this message
Andrey Larionov (anlarionov) wrote :

When we can expect a release with this fix? It's show stopper for adoption, because our installation have 7 regions, and this bug made client usesless.

Revision history for this message
Terry Howe (thowe-g) wrote :

I can't answer your question, but this is the patch I've been using as a work-around (in a virtualenv):

patch ~/.venv/lib/python2.7/site-packages/openstackclient/compute/client.py <<!
diff --git a/openstackclient/compute/client.py b/openstackclient/compute/client.py
index 3725350..166747d 100644
--- a/openstackclient/compute/client.py
+++ b/openstackclient/compute/client.py
@@ -50,6 +50,7 @@ def make_client(instance):
         extensions=extensions,
         http_log_debug=http_log_debug,
         timings=instance.timing,
+ region_name=instance._region_name,
     )

     return client
!

Revision history for this message
Steve Martinelli (stevemar) wrote :

we should be releasing 1.0.2 (m7) fairly soon, the fix is already in the code base.

Revision history for this message
Andrey Larionov (anlarionov) wrote :

Thanks. Steve.

Dean Troyer (dtroyer)
Changed in python-openstackclient:
status: Fix Committed → Fix Released
Revision history for this message
Eric (erichelgeson) wrote :

This was not fixed for volumes region selection, same bug, same fix. I made a PR on github, but since you don't use that and it's a one line change I'll let you fix it :) You can add a CONTRIBUTING.md file to your repo to show a warning when people create pull requests on github.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-openstackclient (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/148811

Revision history for this message
Steve Martinelli (stevemar) wrote :

Thanks Eric, I put up this patch: https://review.openstack.org/#/c/148811/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/148811
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=5e43120d43d6b12d76f759473eaf6e8e82a4ca27
Submitter: Jenkins
Branch: master

commit 5e43120d43d6b12d76f759473eaf6e8e82a4ca27
Author: Steve Martinelli <email address hidden>
Date: Wed Jan 21 01:52:20 2015 -0500

    Add region name for identity and volume clients

    We do not take into account region names for identity and volume
    clients.

    Change-Id: I4263e9013226b0adc6b9ad7540d6ad3efb42e809
    Co-Authored-By: Eric Helgeson <email address hidden>
    Related-Bug: #1405416

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.