ListEndpoint queries internal/admin endpoint

Bug #1522445 reported by Bjoern
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Won't Fix
Undecided
Unassigned

Bug Description

The openstack client 1.9.0 is used to lookup endpoint services over the publicURL endpoint type and throughout the requests I do see a GET to /v3 to either the internal or admin endpoint type (look for >>>>>>>>) and I have not been able to locate the reasoning for this. IMHO it is not necessary to do that. Please let me know if this is intentional or a bug.
The endpoint selection should fixed inside 1.6.0 with honoring the OS_ENDPOINT_TYPE.

root@test:~# openstack endpoint list --service identity --insecure --debug 2>&1 |tee ~/x
START with options: ['endpoint', 'list', '--service', 'identity', '--insecure', '--debug']
options: Namespace(access_token_endpoint='', auth_type='', auth_url='https://public_ip:5000/v3', cacert='', client_id='', client_secret='***', cloud='', debug=True, default_domain='default', deferred_help=False, domain_id='', domain_name='', endpoint='', identity_provider='', insecure=True, interface='', log_file=None, os_compute_api_version='', os_identity_api_version='3', os_image_api_version='', os_network_api_version='', os_object_api_version='', os_project_id=None, os_project_name=None, os_volume_api_version='', password='***', project_domain_id='', project_domain_name='Default', project_id='', project_name='admin', protocol='', region_name='', scope='', timing=False, token='***', trust_id='', url='', user_domain_id='', user_domain_name='Default', user_id='', username='admin', verbose_level=3, verify=None)
defaults: {u'auth_type': 'password', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'api_timeout': None, u'baremetal_api_version': u'1', 'cacert': None, u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', u'interface': None, u'network_api_version': u'2', u'image_format': u'qcow2', u'image_api_version': u'2', 'verify': True, u'identity_api_version': u'2.0', u'volume_api_version': u'1', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'dns_api_version': u'2', u'object_store_api_version': u'1', u'disable_vendor_agent': {}}
cloud cfg: {'auth_type': 'password', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', u'interface': None, u'network_api_version': u'2', u'image_format': u'qcow2', u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', u'object_store_api_version': u'1', 'verbose_level': 3, 'region_name': '', 'insecure': True, 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'username': 'admin', 'project_name': 'admin', 'user_domain_name': 'Default', 'auth_url': 'https://public_ip:5000/v3', 'password': '***', 'project_domain_name': 'Default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'timing': False, 'cacert': None, 'deferred_help': False, u'identity_api_version': '3', u'volume_api_version': u'1', 'cert': None, u'secgroup_source': u'neutron', 'debug': True, u'disable_vendor_agent': {}}
compute API version 2, cmd group openstack.compute.v2
network API version 2, cmd group openstack.network.v2
image API version 2, cmd group openstack.image.v2
volume API version 1, cmd group openstack.volume.v1
identity API version 3, cmd group openstack.identity.v3
object_store API version 1, cmd group openstack.object_store.v1
command: endpoint list -> openstackclient.identity.v3.endpoint.ListEndpoint
Auth plugin password selected
auth_type: password
Using auth plugin: password
Using parameters {'username': 'admin', 'project_name': 'admin', 'auth_url': 'https://public_ip:5000/v3', 'user_domain_name': 'Default', 'password': '***', 'project_domain_name': 'Default'}
Get auth_ref
REQ: curl -g -i --insecure -X GET https://public_ip:5000/v3 -H "Accept: application/json" -H "User-Agent: python-openstackclient"
Starting new HTTPS connection (1): public_ip
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:100: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:789: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
"GET /v3 HTTP/1.1" 200 253
RESP: [200] Content-Length: 253 Vary: X-Auth-Token Keep-Alive: timeout=5, max=100 Server: Apache Connection: Keep-Alive Date: Thu, 03 Dec 2015 14:43:39 GMT Content-Type: application/json x-openstack-request-id: req-03fb61b1-6763-45e4-aed4-5ee3aabc1193
RESP BODY: {"version": {"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.4", "links": [{"href": "https://public_ip:5000/v3/", "rel": "self"}]}}

Making authentication request to https://public_ip:5000/v3/auth/tokens
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:789: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
"POST /v3/auth/tokens HTTP/1.1" 201 6728
take_action(Namespace(columns=[], formatter='table', interface=None, max_width=0, noindent=False, quote_mode='nonnumeric', region=None, service='identity'))
Instantiating identity client: <class 'keystoneclient.v3.client.Client'>
Making authentication request to https://public_ip:5000/v3/auth/tokens
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:789: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
"POST /v3/auth/tokens HTTP/1.1" 201 6728
>>>>>>>> Sudden GET /v3 requests with no further payload <<<<<<<<<<<<<<<<
REQ: curl -g -i --insecure -X GET http://172.29.236.10:35357/v3 -H "Accept: application/json" -H "User-Agent: python-openstackclient"
Starting new HTTP connection (1): 172.29.236.10
"GET /v3 HTTP/1.1" 200 253
RESP: [200] Content-Length: 253 Vary: X-Auth-Token Keep-Alive: timeout=5, max=100 Server: Apache Connection: Keep-Alive Date: Thu, 03 Dec 2015 14:43:39 GMT Content-Type: application/json x-openstack-request-id: req-117066e8-7404-4cc1-9b98-29fc4dbe367a
RESP BODY: {"version": {"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.4", "links": [{"href": "https://public_ip:5000/v3/", "rel": "self"}]}}

REQ: curl -g -i --insecure -X GET https://public_ip:5000/v3/services/identity -H "User-Agent: python-keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5b96dda6caf72b1ba9cad07c47617a86b04bbdbe"
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:789: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
"GET /v3/services/identity HTTP/1.1" 404 93
RESP: [404] Content-Length: 93 Vary: X-Auth-Token Keep-Alive: timeout=5, max=97 Server: Apache Connection: Keep-Alive Date: Thu, 03 Dec 2015 14:43:39 GMT Content-Type: application/json x-openstack-request-id: req-b15ff912-fda1-4890-b3d7-3bd642f8f58a
RESP BODY: {"error": {"message": "Could not find service: identity", "code": 404, "title": "Not Found"}}

Request returned failure status: 404
REQ: curl -g -i --insecure -X GET https://public_ip:5000/v3/services?name=identity -H "User-Agent: python-keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5b96dda6caf72b1ba9cad07c47617a86b04bbdbe"
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:789: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
"GET /v3/services?name=identity HTTP/1.1" 200 123
RESP: [200] Content-Length: 123 Vary: X-Auth-Token Keep-Alive: timeout=5, max=96 Server: Apache Connection: Keep-Alive Date: Thu, 03 Dec 2015 14:43:39 GMT Content-Type: application/json x-openstack-request-id: req-f82b8611-9e93-42b5-a83f-2e1c3c0f1352
RESP BODY: {"services": [], "links": {"self": "https://public_ip:5000/v3/services?name=identity", "previous": null, "next": null}}

REQ: curl -g -i --insecure -X GET https://public_ip:5000/v3/services?type=identity -H "User-Agent: python-keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5b96dda6caf72b1ba9cad07c47617a86b04bbdbe"
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:789: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
"GET /v3/services?type=identity HTTP/1.1" 200 360
RESP: [200] Content-Length: 360 Vary: X-Auth-Token Keep-Alive: timeout=5, max=95 Server: Apache Connection: Keep-Alive Date: Thu, 03 Dec 2015 14:43:39 GMT Content-Type: application/json x-openstack-request-id: req-34f11196-2638-4c81-9b9d-d045fa7743fe
RESP BODY: {"services": [{"description": "Keystone Identity Service", "links": {"self": "https://public_ip:5000/v3/services/06cc8e91a728487b901454303403a5c1"}, "enabled": true, "type": "identity", "id": "06cc8e91a728487b901454303403a5c1", "name": "keystone"}], "links": {"self": "https://public_ip:5000/v3/services?type=identity", "previous": null, "next": null}}

REQ: curl -g -i --insecure -X GET https://public_ip:5000/v3/endpoints?service_id=06cc8e91a728487b901454303403a5c1 -H "User-Agent: python-keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5b96dda6caf72b1ba9cad07c47617a86b04bbdbe"
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:789: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
"GET /v3/endpoints?service_id=06cc8e91a728487b901454303403a5c1 HTTP/1.1" 200 1109
RESP: [200] Content-Length: 1109 Vary: X-Auth-Token Keep-Alive: timeout=5, max=94 Server: Apache Connection: Keep-Alive Date: Thu, 03 Dec 2015 14:43:39 GMT Content-Type: application/json x-openstack-request-id: req-95df3da8-4268-482b-b57b-3b603c363a5c
RESP BODY: {"endpoints": [{"region_id": "RegionOne", "links": {"self": "https://public_ip:5000/v3/endpoints/3195850baed644b4afe6e1cc9051409c"}, "url": "http://172.29.236.10:5000/v2.0", "region": "RegionOne", "enabled": true, "interface": "internal", "service_id": "06cc8e91a728487b901454303403a5c1", "id": "3195850baed644b4afe6e1cc9051409c"}, {"region_id": "RegionOne", "links": {"self": "https://public_ip:5000/v3/endpoints/b1dac393337e49988f44aadb38efd46b"}, "url": "http://172.29.236.10:35357/v3", "region": "RegionOne", "enabled": true, "interface": "admin", "service_id": "06cc8e91a728487b901454303403a5c1", "id": "b1dac393337e49988f44aadb38efd46b"}, {"region_id": "RegionOne", "links": {"self": "https://public_ip:5000/v3/endpoints/e2da736e9edf43ec838b7e317d7008c8"}, "url": "https://public_ip:5000/v3", "region": "RegionOne", "enabled": true, "interface": "public", "service_id": "06cc8e91a728487b901454303403a5c1", "id": "e2da736e9edf43ec838b7e317d7008c8"}], "links": {"self": "https://public_ip:5000/v3/endpoints?service_id=06cc8e91a728487b901454303403a5c1", "previous": null, "next": null}}

REQ: curl -g -i --insecure -X GET https://public_ip:5000/v3/services/06cc8e91a728487b901454303403a5c1 -H "User-Agent: python-keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5b96dda6caf72b1ba9cad07c47617a86b04bbdbe"
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:789: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
"GET /v3/services/06cc8e91a728487b901454303403a5c1 HTTP/1.1" 200 250
RESP: [200] Content-Length: 250 Vary: X-Auth-Token Keep-Alive: timeout=5, max=93 Server: Apache Connection: Keep-Alive Date: Thu, 03 Dec 2015 14:43:39 GMT Content-Type: application/json x-openstack-request-id: req-4e3c67a8-2716-48ca-8668-a404a7346aa2
RESP BODY: {"service": {"description": "Keystone Identity Service", "links": {"self": "https://public_ip:5000/v3/services/06cc8e91a728487b901454303403a5c1"}, "enabled": true, "type": "identity", "id": "06cc8e91a728487b901454303403a5c1", "name": "keystone"}}

REQ: curl -g -i --insecure -X GET https://public_ip:5000/v3/services/06cc8e91a728487b901454303403a5c1 -H "User-Agent: python-keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5b96dda6caf72b1ba9cad07c47617a86b04bbdbe"
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:789: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
"GET /v3/services/06cc8e91a728487b901454303403a5c1 HTTP/1.1" 200 250
RESP: [200] Content-Length: 250 Vary: X-Auth-Token Keep-Alive: timeout=5, max=92 Server: Apache Connection: Keep-Alive Date: Thu, 03 Dec 2015 14:43:39 GMT Content-Type: application/json x-openstack-request-id: req-9e349cfb-4c03-4493-986d-591c7ad04b32
RESP BODY: {"service": {"description": "Keystone Identity Service", "links": {"self": "https://public_ip:5000/v3/services/06cc8e91a728487b901454303403a5c1"}, "enabled": true, "type": "identity", "id": "06cc8e91a728487b901454303403a5c1", "name": "keystone"}}

REQ: curl -g -i --insecure -X GET https://public_ip:5000/v3/services/06cc8e91a728487b901454303403a5c1 -H "User-Agent: python-keystoneclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5b96dda6caf72b1ba9cad07c47617a86b04bbdbe"
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:789: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
"GET /v3/services/06cc8e91a728487b901454303403a5c1 HTTP/1.1" 200 250
RESP: [200] Content-Length: 250 Vary: X-Auth-Token Keep-Alive: timeout=5, max=91 Server: Apache Connection: Keep-Alive Date: Thu, 03 Dec 2015 14:43:39 GMT Content-Type: application/json x-openstack-request-id: req-a617ae47-eefa-41f6-8a2f-9fac7e54d92e
RESP BODY: {"service": {"description": "Keystone Identity Service", "links": {"self": "https://public_ip:5000/v3/services/06cc8e91a728487b901454303403a5c1"}, "enabled": true, "type": "identity", "id": "06cc8e91a728487b901454303403a5c1", "name": "keystone"}}

clean_up ListEndpoint:
END return value: 0
+----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------------+
| ID | Region | Service Name | Service Type | Enabled | Interface | URL |
+----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------------+
| 3195850baed644b4afe6e1cc9051409c | RegionOne | keystone | identity | True | internal | http://172.29.236.10:5000/v2.0 |
| b1dac393337e49988f44aadb38efd46b | RegionOne | keystone | identity | True | admin | http://172.29.236.10:35357/v3 |
| e2da736e9edf43ec838b7e317d7008c8 | RegionOne | keystone | identity | True | public | https://public_ip:5000/v3 |
+----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------------+

Artem Goncharov (gtema)
Changed in python-openstackclient:
status: New → Won't Fix
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.