python-nova: not region aware when used with quantum

Bug #1081037 reported by Stephen Gran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Davanum Srinivas (DIMS)

Bug Description

Hi,

When used with quantum, python-nova does not pass in any region information when constructing a quantum-client, making the compute services on my multi-region setup fail when multiple endpoints are returned by keystone.

The problem is that in network/quantumv2/__init__.py, _get_auth_token() a quantumclient.client.HTTPClient is created without a region_name argument.

In order to make this work, I had to edit nova/network/quantumv2/api.py and add a new parameter to quantum_opts:

    cfg.StrOpt('quantum_region_name',
               help='region name for connecting to quantum in admin context'),

and then pass that to the httpclient constructor in nova/network/quantumv2/__init__.py with:

            timeout=FLAGS.quantum_url_timeout,
            region_name=FLAGS.quantum_region_name,
            auth_strategy=FLAGS.quantum_auth_strategy)

and finally set quantum_region_name in nova.conf.

There may be a more elegant way of achieving all this.

Stephen Gran (sgran)
affects: nova (Ubuntu) → nova
Revision history for this message
Stephen Gran (sgran) wrote :
Changed in nova:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Davanum Srinivas (DIMS) (dims-v)
status: Confirmed → In Progress
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Stephen, I can help with this bug, next time, can you please submit via gerritt? [1]

[1] http://wiki.openstack.org/HowToContribute#If_you.27re_a_developer.2C_start_here:

thanks,
dims

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/20573
Committed: http://github.com/openstack/nova/commit/30c68f47e9afb323761c24cb2417e11a404f64ce
Submitter: Jenkins
Branch: master

commit 30c68f47e9afb323761c24cb2417e11a404f64ce
Author: Davanum Srinivas <email address hidden>
Date: Sun Jan 27 21:41:10 2013 -0500

    Add Region name to quantum client

    Looks like multi-region setups need the region name

    Fixes LP# 1081037

    DocImpact

    Change-Id: Id8d5b1e1adef75a93df9a3527fd6da463fed0d09

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-3 → 2013.1
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.