Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

'openstack endpoint list' fails, equivalent curl command works

Setup information:

  • Openstack version: Mitaka
  • openstack client version: 3.4.1
  • keystoneauth1 version: 2.16.0

I was trying to run a simple rally task, which fails with the following error:

$ sudo rally task start /usr/share/rally/samples/tasks/scenarios/nova/boot-and-delete.json
(...)
2016-12-04 16:43:35.655 13422 INFO rally.plugins.openstack.context.keystone.users [-] Task 2b3168c4-ccb6-4214-865f-c31e5450560c | Starting:  Enter context: `users`
2016-12-04 16:43:35.801 13422 WARNING rally.common.broker [-] Failed to consume a task from the queue: Could not find requested endpoint in Service Catalog.
(...)
Task config is invalid: `Unable to setup context 'users': 'Failed to create the requested number of tenants.'`

After some debugging (running rally with the -vd options), I found the apparent source of the error to be related to the keystoneauth1 package (I get the same error when running sudo openstack endpoint list):

2016-12-04 16:48:32.777 13837 ERROR rally.common.broker     return self.session.request(url, method, **kwargs)
2016-12-04 16:48:32.777 13837 ERROR rally.common.broker   File "/usr/local/lib/python2.7/dist-packages/positional/__init__.py", line 101, in inner
2016-12-04 16:48:32.777 13837 ERROR rally.common.broker     return wrapped(*args, **kwargs)
2016-12-04 16:48:32.777 13837 ERROR rally.common.broker   File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py", line 492, in request
2016-12-04 16:48:32.777 13837 ERROR rally.common.broker     raise exceptions.EndpointNotFound()
2016-12-04 16:48:32.777 13837 ERROR rally.common.broker EndpointNotFound: Could not find requested endpoint in Service Catalog.
2016-12-04 16:48:32.777 13837 ERROR rally.common.broker

If I get a token and directly request the endpoint list with a curl request, I seem to get a successful response (I looked into the headers used by sudo openstack endpoint list and used the same headers):

curl -g -i -X GET http://192.168.8.99:35357/v3/endpoints -H "Accept: application/json" -H "User-Agent: osc-lib keystoneauth1/2.16.0 python-requests/2.12.3 CPython/2.7.6" -H "X-Auth-Token: <token>"

HTTP/1.1 200 OK
Date: Sun, 04 Dec 2016 16:53:45 GMT
Server: Apache/2.4.7 (Ubuntu)
Vary: X-Auth-Token
x-openstack-request-id: req-ae4ad72b-5055-4e72-bde0-b6800fba0833
Content-Length: 7772
Content-Type: application/json

{"endpoints": [{"region_id": "RegionOne", "links": {"self": "http://192.168.8.99:35357/v3/endpoints/0aa9b3cf546c4b7eb0fa20674ac0b3ae"}, "url": "http://192.168.8.99:9696", "region": "RegionOne", "enabled": true, "interface": "public", "service_id": "7438e2504b2e4c1ea9b9b5526c059186",
(...)

Same thing happens if I use the v2.0 API:

curl -g -i -X GET http://192.168.8.99:35357/v2.0/endpoints -H "Accept: application/json" -H "User-Agent: osc-lib keystoneauth1/2.16.0 python-requests/2.12.3 CPython/2.7.6" -H "X-Auth-Token: <token>"

HTTP/1.1 200 OK
Date: Sun, 04 Dec 2016 17:03:59 GMT
Server: Apache/2.4.7 (Ubuntu)
Vary: X-Auth-Token
x-openstack-request-id: req-bc82e230-7901-4b3d-91a0-8c73e94914e8
Content-Length: 2247
Content-Type: application/json

{"endpoints": [{"adminurl": "http://192.168.8.99:8000/v1", "region": "RegionOne", "enabled": true, "internalurl": "http://192.168.8.99:8000/v1", "service_id": "bb2b738498af4778879b20321c17293d", "id": "c5872d8494b24f31840f3c9263714a10", "publicurl": "http://192.168.8.99:8000/v1"}

My questions are:

  • Why is the rally command and/or openstack endpoint list failing when the curl commands are successful?
  • Does the sudo matter? I use it because installing rally in a system-wide fashion was the quickest way to test things...

Thanks!

'openstack endpoint list' fails, equivalent curl command works

Setup information:

  • Openstack version: Mitaka
  • openstack client version: 3.4.1
  • keystoneauth1 version: 2.16.0

I was trying to run a simple rally task, which fails with the following error:

$ sudo rally task start /usr/share/rally/samples/tasks/scenarios/nova/boot-and-delete.json
(...)
2016-12-04 16:43:35.655 13422 INFO rally.plugins.openstack.context.keystone.users [-] Task 2b3168c4-ccb6-4214-865f-c31e5450560c | Starting:  Enter context: `users`
2016-12-04 16:43:35.801 13422 WARNING rally.common.broker [-] Failed to consume a task from the queue: Could not find requested endpoint in Service Catalog.
(...)
Task config is invalid: `Unable to setup context 'users': 'Failed to create the requested number of tenants.'`

After some debugging (running rally with the -vd options), I found the apparent source of the error to be related to the keystoneauth1 package (I get the same error when running sudo openstack endpoint list):

2016-12-04 16:48:32.777 13837 ERROR rally.common.broker     return self.session.request(url, method, **kwargs)
2016-12-04 16:48:32.777 13837 ERROR rally.common.broker   File "/usr/local/lib/python2.7/dist-packages/positional/__init__.py", line 101, in inner
2016-12-04 16:48:32.777 13837 ERROR rally.common.broker     return wrapped(*args, **kwargs)
2016-12-04 16:48:32.777 13837 ERROR rally.common.broker   File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py", line 492, in request
2016-12-04 16:48:32.777 13837 ERROR rally.common.broker     raise exceptions.EndpointNotFound()
2016-12-04 16:48:32.777 13837 ERROR rally.common.broker EndpointNotFound: Could not find requested endpoint in Service Catalog.
2016-12-04 16:48:32.777 13837 ERROR rally.common.broker

If I get a token and directly request the endpoint list with a curl request, I seem to get a successful response (I looked into the headers used by sudo openstack endpoint list and used the same headers):

$ curl -g -i -X GET http://192.168.8.99:35357/v3/endpoints -H "Accept: application/json" -H "User-Agent: osc-lib keystoneauth1/2.16.0 python-requests/2.12.3 CPython/2.7.6" -H "X-Auth-Token: <token>"

HTTP/1.1 200 OK
Date: Sun, 04 Dec 2016 16:53:45 GMT
Server: Apache/2.4.7 (Ubuntu)
Vary: X-Auth-Token
x-openstack-request-id: req-ae4ad72b-5055-4e72-bde0-b6800fba0833
Content-Length: 7772
Content-Type: application/json

{"endpoints": [{"region_id": "RegionOne", "links": {"self": "http://192.168.8.99:35357/v3/endpoints/0aa9b3cf546c4b7eb0fa20674ac0b3ae"}, "url": "http://192.168.8.99:9696", "region": "RegionOne", "enabled": true, "interface": "public", "service_id": "7438e2504b2e4c1ea9b9b5526c059186",
(...)

Same thing happens if I use the v2.0 API:

$ curl -g -i -X GET http://192.168.8.99:35357/v2.0/endpoints -H "Accept: application/json" -H "User-Agent: osc-lib keystoneauth1/2.16.0 python-requests/2.12.3 CPython/2.7.6" -H "X-Auth-Token: <token>"

HTTP/1.1 200 OK
Date: Sun, 04 Dec 2016 17:03:59 GMT
Server: Apache/2.4.7 (Ubuntu)
Vary: X-Auth-Token
x-openstack-request-id: req-bc82e230-7901-4b3d-91a0-8c73e94914e8
Content-Length: 2247
Content-Type: application/json

{"endpoints": [{"adminurl": "http://192.168.8.99:8000/v1", "region": "RegionOne", "enabled": true, "internalurl": "http://192.168.8.99:8000/v1", "service_id": "bb2b738498af4778879b20321c17293d", "id": "c5872d8494b24f31840f3c9263714a10", "publicurl": "http://192.168.8.99:8000/v1"}

My questions are:

  • Why is the rally command and/or openstack endpoint list failing when the curl commands are successful?
  • Does the sudo matter? I use it because installing rally in a system-wide fashion was the quickest way to test things...

Thanks!