climate host-create fails with Keystone authentication error

Bug #1660564 reported by Pierre Riteau
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Blazar
Fix Released
Critical
Pierre Riteau

Bug Description

When using DevStack master to install Blazar, `climate host-create` fails with ERROR: Internal Server Error.

In blazar-manager, the traceback shown is:

[-] Exception during message handling
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 155, in _process_incoming
    res = self.dispatcher.dispatch(message)
  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 222, in dispatch
    return self._do_dispatch(endpoint, method, ctxt, args)
  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 192, in _do_dispatch
    result = func(ctxt, **new_args)
  File "/opt/stack/blazar/climate/utils/service.py", line 77, in run_method
    return method(**kwargs)
  File "/opt/stack/blazar/climate/plugins/oshosts/host_plugin.py", line 236, in create_computehost
    servers = inventory.get_servers_per_host(host_ref)
  File "/opt/stack/blazar/climate/plugins/oshosts/nova_inventory.py", line 66, in get_servers_per_host
    hypervisors_list = self.nova.hypervisors.search(host, servers=True)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/hypervisors.py", line 78, in search
    return self._list(url, 'hypervisors')
  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 254, in _list
    resp, body = self.api.client.get(url)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 217, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/site-packages/novaclient/client.py", line 74, in request
    **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 374, in request
    resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 142, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner
    return wrapped(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 491, in request
    auth_headers = self.get_auth_headers(auth)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 818, in get_auth_headers
    return auth.get_headers(self, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/plugin.py", line 90, in get_headers
    token = self.get_token(session)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 90, in get_token
    return self.get_access(session).auth_token
  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 136, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/generic/base.py", line 198, in get_auth_ref
    return self._plugin.get_auth_ref(session, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/v3/base.py", line 167, in get_auth_ref
    authenticated=False, log=False, **rkwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 766, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner
    return wrapped(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 655, in request
    raise exceptions.from_response(resp, method, url)
BadRequest: Invalid input for field 'identity/password/user/password': None is not of type 'string' (HTTP 400)

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

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

Changed in blazar:
status: New → In Progress
Changed in blazar:
milestone: none → 0.2.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to blazar (master)

Reviewed: https://review.openstack.org/429408
Committed: https://git.openstack.org/cgit/openstack/blazar/commit/?id=81b85a11affd6faad994650080444ad5ed503055
Submitter: Jenkins
Branch: master

commit 81b85a11affd6faad994650080444ad5ed503055
Author: Pierre Riteau <email address hidden>
Date: Sun Feb 5 19:23:58 2017 +0000

    Fix authentication of Nova client

    Blazar authenticates Nova requests with trust-scoped tokens. Sometime
    during the Ocata cycle these requests started failing (possibly due to
    stricter validation in Keystone) with the error:

        BadRequest: Invalid input for field 'identity/password/user/password': None is not of type 'string' (HTTP 400)

    This commit changes how the Nova client is configured to use the
    token_endpoint authentication plugin combined with endpoint_override,
    which allows to communicate with the Nova endpoint without extra
    requests to Keystone. This is necessary between trust-scoped tokens
    cannot re-authenticate with Keystone, which happens with other
    authentication plugins.

    Change-Id: Ibb6782140f41aea5e539e11f2618b3af2628fc4c
    Closes-Bug: #1660564

Changed in blazar:
status: In Progress → 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.