keystone v3 doesn't work if OS_xxxx_DOMAIN_ID are not set

Bug #1543502 reported by Mehdi Abaakouk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ceilometerclient
Fix Released
Low
Prateek khushalani

Bug Description

Other openstack client works if OS_PROJECT_DOMAIN_ID and OS_USER_DOMAIN_ID are not set.

ceilometer --debug sample-list
DEBUG (session) REQ: curl -g -i -X GET http://192.168.3.51:5000/v3 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO (connectionpool) Starting new HTTP connection (1): 192.168.3.51
DEBUG (connectionpool) "GET /v3 HTTP/1.1" 200 251
DEBUG (session) RESP: [200] Content-Length: 251 Vary: X-Auth-Token Keep-Alive: timeout=5, max=100 Server: Apache/2.4.7 (Ubuntu) Connection: Keep-Alive Date: Tue, 09 Feb 2016 09:49:59 GMT Content-Type: application/json x-openstack-request-id: req-166240b3-b64a-4d32-b884-9279305e846c
RESP BODY: {"version": {"status": "stable", "updated": "2015-09-15T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.5", "links": [{"href": "http://192.168.3.51:5000/v3/", "rel": "self"}]}}

DEBUG (base) Making authentication request to http://192.168.3.51:5000/v3/auth/tokens
DEBUG (connectionpool) "POST /v3/auth/tokens HTTP/1.1" 400 236
DEBUG (session) Request returned failure status: 400
Traceback (most recent call last):
  File "/usr/local/bin/ceilometer", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/ceilometerclient/shell.py", line 292, in main
    CeilometerShell().main(args)
  File "/usr/local/lib/python2.7/dist-packages/ceilometerclient/shell.py", line 238, in main
    client = ceiloclient.get_client(api_version, **client_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ceilometerclient/client.py", line 366, in get_client
    return Client(version, endpoint, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ceilometerclient/client.py", line 313, in Client
    return client_class(*args, **client_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ceilometerclient/v2/client.py", line 67, in __init__
    self.alarm_client = self._get_alarm_client(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ceilometerclient/v2/client.py", line 122, in _get_alarm_client
    c.get("/")
  File "/usr/local/lib/python2.7/dist-packages/ceilometerclient/openstack/common/apiclient/client.py", line 355, in get
    return self.client_request("GET", url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ceilometerclient/openstack/common/apiclient/client.py", line 345, in client_request
    self, method, url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ceilometerclient/openstack/common/apiclient/client.py", line 244, in client_request
    self.authenticate()
  File "/usr/local/lib/python2.7/dist-packages/ceilometerclient/openstack/common/apiclient/client.py", line 315, in authenticate
    self.auth_plugin.authenticate(self)
  File "/usr/local/lib/python2.7/dist-packages/ceilometerclient/openstack/common/apiclient/auth.py", line 203, in authenticate
    self._do_authenticate(http_client)
  File "/usr/local/lib/python2.7/dist-packages/ceilometerclient/client.py", line 192, in _do_authenticate
    endpoint = _get_endpoint(ks_session, **ks_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/ceilometerclient/client.py", line 162, in _get_endpoint
    region_name=kwargs.get('region_name'))
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py", line 664, in get_endpoint
    return auth.get_endpoint(self, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/auth/identity/base.py", line 324, in get_endpoint
    service_catalog = self.get_access(session).service_catalog
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/auth/identity/base.py", line 249, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/auth/identity/v3/base.py", line 190, in get_auth_ref
    authenticated=False, log=False, **rkwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py", line 505, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/utils.py", line 337, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py", line 405, in request
    raise exceptions.from_response(resp, method, url)
keystoneauth1.exceptions.http.BadRequest: Expecting to find domain in project - the server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-9bae9be4-e420-475b-b41b-d623bdc5a97c)

Mehdi Abaakouk (sileht)
Changed in python-ceilometerclient:
importance: Undecided → Low
Changed in python-ceilometerclient:
assignee: nobody → Himanshu Kumar (singh5himanshu)
Changed in python-ceilometerclient:
assignee: Himanshu Kumar (singh5himanshu) → nobody
Ekaterina (ekaterian)
Changed in python-ceilometerclient:
assignee: nobody → Ekaterina (ekaterian)
Ekaterina (ekaterian)
Changed in python-ceilometerclient:
assignee: Ekaterina (ekaterian) → nobody
Changed in python-ceilometerclient:
assignee: nobody → Prateek khushalani (prateek-khushalani)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ceilometerclient (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-ceilometerclient (master)

Change abandoned by Prateek khushalani (<email address hidden>) on branch: master
Review: https://review.openstack.org/408185
Reason: Duplicate

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Prateek khushalani (<email address hidden>) on branch: master
Review: https://review.openstack.org/408054
Reason: Aborting as Wrong file as Not able to upload patchset

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ceilometerclient (master)

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

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

Reviewed: https://review.openstack.org/408421
Committed: https://git.openstack.org/cgit/openstack/python-ceilometerclient/commit/?id=7256c4b5bf44a4da31c1f526fc0d5ea02de68011
Submitter: Jenkins
Branch: master

commit 7256c4b5bf44a4da31c1f526fc0d5ea02de68011
Author: Prateek Khushalani <email address hidden>
Date: Thu Dec 8 11:43:20 2016 +0530

    Adding default project and domain if nothing is specified

    Closes-Bug: 1543502

    Change-Id: Iea57a6ed757bfa28eb09324378b5376667b0c120

Changed in python-ceilometerclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-ceilometerclient 2.8.0

This issue was fixed in the openstack/python-ceilometerclient 2.8.0 release.

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.