Bypass-url in client is ignored

Bug #1445086 reported by Ryan Bak
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
High
melanie witt

Bug Description

The novaclient takes a --bypass-url argument, which should be used rather than the endpoint in keystone, but the argument appears to be ignored.

Client version 2.23.0

Steps:
Source openrc with OS_TENANT_NAME, OS_USERNAME, OS_PASSWORD, OS_AUTH_URL, and OS_REGION_NAME
Run 'nova --bypass-url badurl list'

affects: nova → python-novaclient
Revision history for this message
melanie witt (melwitt) wrote :

I suspect this is a problem with the SessionClient not making use of --bypass-url

Changed in python-novaclient:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
melanie witt (melwitt) wrote :

Dug into it and found somehow self.service_catalog is set in novaclient/client.py even when bypass_url is used, which shouldn't be the case.

Changed in python-novaclient:
assignee: nobody → melanie witt (melwitt)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-novaclient (master)

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

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

Reviewed: https://review.openstack.org/175622
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=4f9e65c438c484bffff7a42e9cdad28300d51bdc
Submitter: Jenkins
Branch: master

commit 4f9e65c438c484bffff7a42e9cdad28300d51bdc
Author: melanie witt <email address hidden>
Date: Mon Apr 20 22:00:27 2015 +0000

    Don't lookup service url when bypass_url is given

    Change https://review.openstack.org/#/c/164321 broke the bypass_url
    option. It made the assumption that self.service_catalog won't be set
    in novaclient/client.py when bypass_url is specified, which isn't
    necessarily true. This change adds a check for self.bypass_url and
    looks up service url only if bypass_url hasn't been specified.

    Closes-Bug: #1445086

    Change-Id: I72d2b3e3199aeae7fb2f2c68be259774e07a4501

Changed in python-novaclient:
status: In Progress → Fix Committed
Matt Riedemann (mriedem)
Changed in python-novaclient:
milestone: none → 2.25.0
Matt Riedemann (mriedem)
Changed in python-novaclient:
status: Fix Committed → Fix Released
Revision history for this message
Kanthi Pavuluri (pavuluri-kanthi-w) wrote :

Is this working now, I use python-novaclient==3.2.0, there are two compute endpoints each from two different hosts running nova services

keystone catalog --service compute
Service: compute
+-------------+---------------------------------------------------------------+
| Property | Value |
+-------------+---------------------------------------------------------------+
| adminURL | http://X.X.X.X:8774/v1.1/88fc16ee91624191b669d2923ca16cc1 |
| id | 3ed8916635224670939ce63bcc5eb202 |
| internalURL | http://X.X.X.X:8774/v1.1/88fc16ee91624191b669d2923ca16cc1 |
| publicURL | http://X.X.X.X:8774/v1.1/88fc16ee91624191b669d2923ca16cc1 |
| region | RegionOne |
+-------------+---------------------------------------------------------------+
+-------------+---------------------------------------------------------------+
| Property | Value |
+-------------+---------------------------------------------------------------+
| adminURL | http://Y.Y.Y.Y:8774/v1.1/88fc16ee91624191b669d2923ca16cc1 |
| id | 1414ebb46b154715a89dc19a505b0792 |
| internalURL | http://Y.Y.Y.Y:8774/v1.1/88fc16ee91624191b669d2923ca16cc1 |
| publicURL | http://Y.Y.Y.Y:8774/v1.1/88fc16ee91624191b669d2923ca16cc1 |
| region | RegionTwo |
+-------------+---------------------------------------------------------------+

Can I use bypass url to filter the endpoints and reach to the right one, something like:

 nova --bypass-url "http://X.X.X.X:8774/v1.1/88fc16ee91624191b669d2923ca16cc1" list

Revision history for this message
melanie witt (melwitt) wrote :

Hi Kanthi, yes, bypass url should work in the way you describe. The bypass url means "use this endpoint instead of what is found in the service catalog."

If it's not working, it's a bug and you can report it here.

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.