users context fails when trying to connect to Neutron through public endpoint type even when internal was set

Bug #1655728 reported by Carlos L. Torres
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Undecided
Unassigned

Bug Description

Using the following deployment configuration with Rally 0.7.0

  {
    "type": "ExistingCloud",
    "auth_url": "http://172.29.236.40:5000/v3",
    "region_name": "RegionOne",
    "endpoint_type": "internal",
    "https_insecure": true,
    "https_cacert": "",
    "admin": {
      "username": "admin",
      "password": "pass",
      "project_name": "admin",
      "project_domain_name": "Default",
      "user_domain_name": "Default"
     }
}

Regardless of the task, it fails with the following error message:

  Task config is invalid: `Unable to establish connection to
  http://10.17.137.64:9696/v2.0/extensions.json:
  ('Connection aborted.', BadStatusLine("''",))`

The endpoint URL used here is for the public endpoint url for Neutron.
This is not expected since endpoint_type: "internal" was specified in the configuration.

Revision history for this message
Carlos L. Torres (carlos-torres) wrote :

I narrowed it down.

It seems that Rally does indeed get the right endpoint_url from Keystone catalog.

I instrumented the code and log the endpoint_url being passed to the Neutron client:

  Correct --> 2017-01-11 00:38:23.513 8727 WARNING rally.osclients [-] http://172.29.236.40:9696

  2017-01-11 00:38:23.519 8727 DEBUG requests.packages.urllib3.connectionpool
    [-] Starting new HTTP connection (1): 10.17.137.64 _new_conn
     /opt/rally/venv/local/lib/python2.7/site/packages/requests/packages/urllib3/connectionpool.py:212
    Task config is invalid: `Unable to establish connection to

  Incorrect- -> http://10.17.137.64:9696/v2.0/extensions.json: ('Connection aborted.',
                                                                 BadStatusLine("''",))`

Based on this Neutron client seems to be grabbing the endpoint_url and assuming it's a public endpoint.

Revision history for this message
Carlos L. Torres (carlos-torres) wrote :

The following patch which explicitly passes the endpoint type to Neutron client works correctly

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

Reviewed: https://review.openstack.org/419084
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=ba97c9b172fb8f6fe5493165627e08324dc306c3
Submitter: Jenkins
Branch: master

commit ba97c9b172fb8f6fe5493165627e08324dc306c3
Author: Carlos L. Torres <email address hidden>
Date: Wed Jan 11 12:52:17 2017 -0600

    Explicitly pass endpoint type to Neutron client

    Adds unit test to exercise branch.

    Change-Id: I2c5fb7c58031916497e8eedd9eef5d8866e52393
    Closes-Bug: 1655728

Changed in rally:
status: New → Fix Released
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.