Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Minimal rocky installation: creation of instances fails with keystoneauth1.exceptions.http.Unauthorized

On a Debian Testing setup consisting of one controller node and one compute node (set up per https://docs.openstack.org/install-guide/openstack-services.html#minimal-deployment-for-rocky) I have the problem that creation of instances fails with a keystone unauthorized error, no matter if running with admin or demo credentials.

All four installed services (keystone, glance, nova, neutron) pass the respective checks in the "Verify operation" part of their installation guidelines, but a simple openstack server create --flavor 0 --image cirros --nic net-id=xxxxx --debug provider-instance1 (or creating an instance in the horizon UI) fails with:

novaclient.exceptions.ClientException: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'keystoneauth1.exceptions.http.Unauthorized'> (HTTP 500) (Request-ID: req-456d1aff-a3a4-428b-8e0b-b2b14bdefd97)

The call that fails is:

curl -g -i -X POST http://10.161.14.20:8774/v2.1/servers -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Token: {SHA1}32169a085723fd18387e910054fc13850461498c" -d '{"server": {"name": "provider-instance1", "imageRef": "4c2761a0-0d04-4ded-9ba5-8bf58ddcc05c", "flavorRef": "0", "min_count": 1, "max_count": 1, "networks": [{"uuid": "d80a8a4c-16b6-4f7f-ab2e-0720e0b6ab9e"}]}}'

What is broken here?

The nova-api.log:

2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi [req-456d1aff-a3a4-428b-8e0b-b2b14bdefd97 cc77fa29ff2f40aa81cab569859d6f99 ad5fd5c572aa41aea707e9bcc82ce03a - default default] Unexpected exception in API method: keystoneauth1.exceptions.http.Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-d8c2b9d6-41f1-4eed-a65f-2360efa1b831)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi Traceback (most recent call last):
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/api/openstack/wsgi.py", line 801, in wrapped
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     return f(*args, **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/api/validation/__init__.py", line 110, in wrapper
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/api/validation/__init__.py", line 110, in wrapper
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/api/validation/__init__.py", line 110, in wrapper
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   [Previous line repeated 7 more times]
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/api/openstack/compute/servers.py", line 576, in create
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     **create_kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/hooks.py", line 154, in inner
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     rv = f(*args, **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/compute/api.py", line 1714, in create
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     trusted_certs=trusted_certs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/compute/api.py", line 1161, in _create_instance
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     reservation_id, max_count)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/compute/api.py", line 818, in _validate_and_build_base_options
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     context, requested_networks, pci_request_info)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/network/neutronv2/api.py", line 1908, in create_resource_requests
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     context, neutron, network_id)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/network/neutronv2/api.py", line 1804, in _get_physnet_tunneled_info
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     if self._has_multi_provider_extension(context, neutron=neutron):
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/network/neutronv2/api.py", line 1204, in _has_multi_provider_extension
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     self._refresh_neutron_extensions_cache(context, neutron=neutron)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/network/neutronv2/api.py", line 1198, in _refresh_neutron_extensions_cache
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     extensions_list = neutron.list_extensions()['extensions']
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/network/neutronv2/api.py", line 126, in wrapper
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/neutronclient/v2_0/client.py", line 776, in list_extensions
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     return self.get(self.extensions_path, params=_params)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/network/neutronv2/api.py", line 126, in wrapper
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/neutronclient/v2_0/client.py", line 354, in get
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     headers=headers, params=params)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/network/neutronv2/api.py", line 126, in wrapper
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/neutronclient/v2_0/client.py", line 331, in retry_request
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     headers=headers, params=params)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/nova/network/neutronv2/api.py", line 126, in wrapper
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/neutronclient/v2_0/client.py", line 282, in do_request
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     headers=headers)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/neutronclient/client.py", line 343, in do_request
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     return self.request(url, method, **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/neutronclient/client.py", line 331, in request
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     resp = super(SessionClient, self).request(*args, **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/keystoneauth1/adapter.py", line 213, in request
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     return self.session.request(url, method, **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/keystoneauth1/session.py", line 684, in request
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     auth_headers = self.get_auth_headers(auth)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/keystoneauth1/session.py", line 1071, in get_auth_headers
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     return auth.get_headers(self, **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/keystoneauth1/plugin.py", line 95, in get_headers
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     token = self.get_token(session)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/keystoneauth1/identity/base.py", line 88, in get_token
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     return self.get_access(session).auth_token
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/keystoneauth1/identity/base.py", line 134, in get_access
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     self.auth_ref = self.get_auth_ref(session)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/keystoneauth1/identity/generic/base.py", line 208, in get_auth_ref
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     return self._plugin.get_auth_ref(session, **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/keystoneauth1/identity/v3/base.py", line 178, in get_auth_ref
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     authenticated=False, log=False, **rkwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/keystoneauth1/session.py", line 1019, in post
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     return self.request(url, 'POST', **kwargs)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi   File "/usr/lib/python3/dist-packages/keystoneauth1/session.py", line 869, in request
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi     raise exceptions.from_response(resp, method, url)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi keystoneauth1.exceptions.http.Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-d8c2b9d6-41f1-4eed-a65f-2360efa1b831)
2019-02-20 15:08:06.798 15816 ERROR nova.api.openstack.wsgi
2019-02-20 15:08:06.804 15816 INFO nova.api.openstack.wsgi [req-456d1aff-a3a4-428b-8e0b-b2b14bdefd97 cc77fa29ff2f40aa81cab569859d6f99 ad5fd5c572aa41aea707e9bcc82ce03a - default default] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'keystoneauth1.exceptions.http.Unauthorized'>