← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1837943] Re: class 'keystoneauth1.exceptions.http.Unauthorized'

 

It looks like the [neutron] section of your nova.conf used by the nova
API service is not configured properly for nova to communicate with
neutron, see:

https://docs.openstack.org/nova/latest/configuration/config.html#neutron

https://docs.openstack.org/neutron/stein/install/controller-install-
ubuntu.html#configure-the-compute-service-to-use-the-networking-service

** Changed in: nova
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1837943

Title:
  class 'keystoneauth1.exceptions.http.Unauthorized'

Status in OpenStack Compute (nova):
  Invalid

Bug description:
  Running this command to create and instance:

  openstack server create --flavor m0.small --image CentOS7 --security-
  group secgroup01 --nic net-id=$netID --key-name mykey CentOS_7

  This returns the following information/error:

  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-3fcd4a52-f56f-4231-8050-6ac6a006bac3)

  Last few lines of nova-api.log contains the following:

  2019-07-25 20:47:17.893 14237 INFO nova.osapi_compute.wsgi.server [req-b94b302b-2310-47bc-a282-6c1f4a90ec82 2c121dcf583c42cb9cb03fb23d14d872 bde6b090ffca4202829409b8025107e6 - default default] 192.168.1.53 "POST /v2.1/bde6b090ffca4202829409b8025107e6/servers HTTP/1.1" status: 500 len: 649 time: 1.6274502
  2019-07-25 20:53:22.743 14215 INFO nova.api.openstack.wsgi [req-75acb559-bdeb-4b38-8211-c8c71ad6f7f6 2c121dcf583c42cb9cb03fb23d14d872 bde6b090ffca4202829409b8025107e6 - default default] HTTP exception thrown: Flavor m0.small could not be found.
  2019-07-25 20:53:22.744 14215 INFO nova.osapi_compute.wsgi.server [req-75acb559-bdeb-4b38-8211-c8c71ad6f7f6 2c121dcf583c42cb9cb03fb23d14d872 bde6b090ffca4202829409b8025107e6 - default default] 192.168.1.53 "GET /v2.1/bde6b090ffca4202829409b8025107e6/flavors/m0.small HTTP/1.1" status: 404 len: 501 time: 0.0161169
  2019-07-25 20:53:22.762 14215 INFO nova.osapi_compute.wsgi.server [req-1414d51c-de2a-4eb8-ac36-e686c0fb0cd3 2c121dcf583c42cb9cb03fb23d14d872 bde6b090ffca4202829409b8025107e6 - default default] 192.168.1.53 "GET /v2.1/bde6b090ffca4202829409b8025107e6/flavors HTTP/1.1" status: 200 len: 2866 time: 0.0146952
  2019-07-25 20:53:22.776 14215 INFO nova.osapi_compute.wsgi.server [req-c707606a-f499-4069-82d2-8a200be388e0 2c121dcf583c42cb9cb03fb23d14d872 bde6b090ffca4202829409b8025107e6 - default default] 192.168.1.53 "GET /v2.1/bde6b090ffca4202829409b8025107e6/flavors/9 HTTP/1.1" status: 200 len: 826 time: 0.0109811
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi [req-3fcd4a52-f56f-4231-8050-6ac6a006bac3 2c121dcf583c42cb9cb03fb23d14d872 bde6b090ffca4202829409b8025107e6 - default default] Unexpected exception in API method: Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-16b0ed54-4751-4ede-a327-b7bb409f165f)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi Traceback (most recent call last):
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 671, in wrapped
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return f(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 686, in create
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     **create_kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/hooks.py", line 154, in inner
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     rv = f(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1857, in create
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     supports_port_resource_request=supports_port_resource_request)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1277, in _create_instance
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     reservation_id, max_count, supports_port_resource_request)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 903, in _validate_and_build_base_options
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     context, requested_networks, pci_request_info)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 2104, in create_resource_requests
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     context, neutron, network_id)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 1976, in _get_physnet_tunneled_info
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     if self._has_multi_provider_extension(context, neutron=neutron):
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 1273, in _has_multi_provider_extension
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     self._refresh_neutron_extensions_cache(context, neutron=neutron)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 1267, in _refresh_neutron_extensions_cache
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     extensions_list = neutron.list_extensions()['extensions']
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 127, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 785, in list_extensions
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return self.get(self.extensions_path, params=_params)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 127, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 354, in get
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     headers=headers, params=params)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 127, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 331, in retry_request
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     headers=headers, params=params)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 127, in wrapper
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 282, in do_request
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     headers=headers)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/client.py", line 339, in do_request
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     self._check_uri_length(url)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/client.py", line 332, in _check_uri_length
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     uri_len = len(self.endpoint_url) + len(url)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/client.py", line 346, in endpoint_url
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return self.get_endpoint()
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 271, in get_endpoint
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return self.session.get_endpoint(auth or self.auth, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 1139, in get_endpoint
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return auth.get_endpoint(self, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 380, in get_endpoint
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     allow_version_hack=allow_version_hack, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 271, in get_endpoint_data
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     service_catalog = self.get_access(session).service_catalog
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/base.py", line 134, in get_access
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     self.auth_ref = self.get_auth_ref(session)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/generic/base.py", line 208, in get_auth_ref
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return self._plugin.get_auth_ref(session, **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/keystoneauth1/identity/v3/base.py", line 178, in get_auth_ref
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     authenticated=False, log=False, **rkwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 1045, in post
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     return self.request(url, 'POST', **kwargs)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 890, in request
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi     raise exceptions.from_response(resp, method, url)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-16b0ed54-4751-4ede-a327-b7bb409f165f)
  2019-07-25 20:53:24.749 14215 ERROR nova.api.openstack.wsgi
  2019-07-25 20:53:24.751 14215 INFO nova.api.openstack.wsgi [req-3fcd4a52-f56f-4231-8050-6ac6a006bac3 2c121dcf583c42cb9cb03fb23d14d872 bde6b090ffca4202829409b8025107e6 - 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'>
  2019-07-25 20:53:24.752 14215 INFO nova.osapi_compute.wsgi.server [req-3fcd4a52-f56f-4231-8050-6ac6a006bac3 2c121dcf583c42cb9cb03fb23d14d872 bde6b090ffca4202829409b8025107e6 - default default] 192.168.1.53 "POST /v2.1/bde6b090ffca4202829409b8025107e6/servers HTTP/1.1" status: 500 len: 649 time: 1.5494471

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1837943/+subscriptions


References