Why ceilometer CLI gets token twice?

asked 2017-02-16 20:33:49 -0500

xiongyw gravatar image

Hi,

When using ceilometer CLI in debug mode, I noticed that before the CLI makes request to ceilometer-api, it gets tokens from keystone service twice, and it seems that it always use the 2nd token...and I don't see too much differences between the two token request/response. Can any one tell me why is that?

A sample debug output as below.

Thanks,

/bruin

# ceilometer -d meter-list
DEBUG (session) REQ: curl -g -i -X GET http://10.0.1.50:35357/v3 -H "Accept: application/json" -H "User-Agent: ceilometer keystoneauth1/2.12.2 python-requests/2.10.0 CPython/2.7.5"
INFO (connectionpool) Starting new HTTP connection (1): 10.0.1.50
DEBUG (connectionpool) "GET /v3 HTTP/1.1" 200 249
DEBUG (session) RESP: [200] Date: Wed, 15 Feb 2017 01:57:38 GMT Server: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 Vary: X-Auth-Token x-openstack-request-id: req-8346cba1-f0f3-422a-ac9a-7bfd38084f05 Content-Length: 249 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json
RESP BODY: {"version": {"status": "stable", "updated": "2016-10-06T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.7", "links": [{"href": "http://10.0.1.50:35357/v3/", "rel": "self"}]}}

DEBUG (base) Making authentication request to http://10.0.1.50:35357/v3/auth/tokens
DEBUG (connectionpool) "POST /v3/auth/tokens HTTP/1.1" 201 1624
DEBUG (base) {"token": {"is_domain": false, "methods": ["password"], "roles": [{"id": "3876eaeffc994b9ca2a860fe8b776e03", "name": "admin"}], "expires_at": "2017-02-15T02:57:38.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "1553dad7f1874007a9befb04c3e5636f", "name": "admin"}, "catalog": [{"endpoints": [{"url": "http://10.0.1.50:35357/v3/", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "14debb1fb4bf4d8295f9a13b99ed9d09"}, {"url": "http://10.2.162.164:5000/v3/", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "547919f3706e4843bda88cce9920a633"}, {"url": "http://10.0.1.50:35357/v3/", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "eb036e45b226404c93f0a6f7f6f57cc2"}], "type": "identity", "id": "99bd7f6cddb644f590f979987a9b07a3", "name": "keystone"}, {"endpoints": [{"url": "http://10.2.162.164:8777", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "88b6bc048a69465c9cae7981e89d68ed"}, {"url": "http://10.2.162.164:8777", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "9ad7bd881166442c98350569382f2544"}, {"url": "http://10.2.162.164:8777", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "faca815e9efd403d8ef94d55a8278d02"}], "type": "metering", "id": "ebb07b92212b46a789a5350b0fb15f65", "name": "ceilometer"}], "user": {"domain": {"id": "default", "name": "Default"}, "id": "2f1a78e99d9147a6afd37bd73edb113a", "name": "admin"}, "audit_ids": ["zkaLOtZIQ9eoLF_qcKa8hg"], "issued_at": "2017-02-15T01:57:38.000000Z"}}

DEBUG (session) REQ: curl -g -i -X GET http://10.0.1.50:35357/v3 -H "Accept: application/json" -H "User-Agent: ceilometer keystoneauth1/2.12.2 python-requests/2.10.0 CPython/2.7.5"
INFO (connectionpool) Starting new HTTP connection (1): 10.0.1.50
DEBUG (connectionpool) "GET /v3 HTTP/1.1" 200 249
DEBUG (session) RESP: [200] Date: Wed, 15 Feb 2017 01:57:38 GMT Server: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 Vary: X-Auth-Token x-openstack-request-id: req-d0b06546-72d7-42de-afba-3fe0160be386 Content-Length: 249 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json
RESP BODY: {"version": {"status": "stable", "updated": "2016-10-06T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.7", "links": [{"href": "http://10.0.1.50 ...
(more)
edit retag flag offensive close merge delete