Install guide and error message in logs is not clear that [neutron] auth must be configured in nova.conf

Bug #1761487 reported by Sasa Baksa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Matt Riedemann
Pike
Confirmed
Medium
Unassigned
Queens
Confirmed
Medium
Unassigned

Bug Description

While trying to launch new instance on newly installed test OpenStack I get this error:

Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. <class 'neutronclient.common.exceptions.Unauthorized'> (HTTP 500) (Request-ID: req-70a6cb07-72d9-41f3-80aa-ae6c230c62da)

The same error from command line:

openstack server create --flavor Basic --image cirros \
> --nic net-id=f5f0b96c-ab0d-4025-aca3-d2de8f0e6139 --security-group default \
> --key-name demo selfservice-instance
Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'neutronclient.common.exceptions.Unauthorized'> (HTTP 500) (Request-ID: req-3050043e-0baa-471b-8c64-3015b38cef56)

Openstack: Queens

root@controller:~# dpkg -l | grep nova
ii nova-api 2:17.0.1-0ubuntu1~cloud0 all OpenStack Compute - API frontend
ii nova-common 2:17.0.1-0ubuntu1~cloud0 all OpenStack Compute - common files
ii nova-conductor 2:17.0.1-0ubuntu1~cloud0 all OpenStack Compute - conductor service
ii nova-consoleauth 2:17.0.1-0ubuntu1~cloud0 all OpenStack Compute - Console Authenticator
ii nova-novncproxy 2:17.0.1-0ubuntu1~cloud0 all OpenStack Compute - NoVNC proxy
ii nova-placement-api 2:17.0.1-0ubuntu1~cloud0 all OpenStack Compute - placement API frontend
ii nova-scheduler 2:17.0.1-0ubuntu1~cloud0 all OpenStack Compute - virtual machine scheduler
ii python-nova 2:17.0.1-0ubuntu1~cloud0 all OpenStack Compute Python libraries
ii python-novaclient 2:9.1.1-0ubuntu1~cloud0 all client library for OpenStack Compute API - Python 2.7

Libvirt + KVM

Revision history for this message
Sasa Baksa (ssbaksa) wrote :
Revision history for this message
Matt Riedemann (mriedem) wrote :
Download full text (4.7 KiB)

You don't have the [neutron] user credentials section of nova.conf configured:

2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi [req-70a6cb07-72d9-41f3-80aa-ae6c230c62da 04d3da9cc34a42dcbae24a380d04bffd fc6d09cb92104842b7e7f843a953fec8 - default default] Unexpected exception in API method: Unauthorized: Unknown auth type: None
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi Traceback (most recent call last):
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 788, in wrapped
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi return f(*args, **kwargs)
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 108, in wrapper
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi return func(*args, **kwargs)
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 108, in wrapper
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi return func(*args, **kwargs)
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 108, in wrapper
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi return func(*args, **kwargs)
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 108, in wrapper
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi return func(*args, **kwargs)
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 108, in wrapper
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi return func(*args, **kwargs)
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 108, in wrapper
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi return func(*args, **kwargs)
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 108, in wrapper
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi return func(*args, **kwargs)
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/validation/__init__.py", line 108, in wrapper
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi return func(*args, **kwargs)
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/servers.py", line 553, in create
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi **create_kwargs)
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dist-packages/nova/hooks.py", line 154, in inner
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi rv = f(*args, **kwargs)
2018-04-05 11:27:05.821 4205 ERROR nova.api.openstack.wsgi File "/usr/lib/python2.7/dis...

Read more...

Changed in nova:
status: New → Invalid
Revision history for this message
Matt Riedemann (mriedem) wrote :

This could be an opportunity to put something more instructive in the logs when [neutron]auth_type is not set:

http://git.openstack.org/cgit/openstack/nova/tree/nova/network/neutronv2/api.py#n75

Revision history for this message
Matt Riedemann (mriedem) wrote :

I also noticed that the install guide isn't very clear on configuring nova.conf to set credentials for talking to neutron:

https://docs.openstack.org/nova/latest/install/controller-install-ubuntu.html

Revision history for this message
Matt Riedemann (mriedem) wrote :

I've re-opened and changed this to be a docs bug.

summary: - Nova, Unexpected API Error while creating VM
+ Install guide and error message in logs is not clear that [neutron] auth
+ must be configured in nova.conf
Changed in nova:
status: Invalid → Confirmed
importance: Undecided → Medium
tags: added: docs logging serviceability
removed: nova
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
Sasa Baksa (ssbaksa) wrote :

During installation I have followed documentation from this point:
https://docs.openstack.org/install-guide/environment-packages-ubuntu.html
I have found some errors in documentation or better to say wrong steps.
How and where can I report them?

Sasa-Stjepan Baksa
ATOS CVC

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/559399

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

Reviewed: https://review.openstack.org/559111
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=587eb4303be65810133e88114106ee9019940118
Submitter: Zuul
Branch: master

commit 587eb4303be65810133e88114106ee9019940118
Author: Matt Riedemann <email address hidden>
Date: Thu Apr 5 11:25:49 2018 -0400

    Log a more useful error when neutron isn't configured

    When the [neutron] section of nova.conf isn't configured for
    auth with the networking service, end users of the compute
    REST API get a 500 error and the logs contain this mostly
    unhelpful error message:

      Unauthorized: Unknown auth type: None

    This change adds a more useful error log message indicating
    the root problem and provides a link to the networking service
    install guide for how to resolve it.

    Change-Id: I18f162c4f8d1964cb4d0c184ff2149c76e1e86b4
    Partial-Bug: #1761487

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/559115
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a6d9655d7806bade90cffcd107cd1e9ca1861f0f
Submitter: Zuul
Branch: master

commit a6d9655d7806bade90cffcd107cd1e9ca1861f0f
Author: Matt Riedemann <email address hidden>
Date: Thu Apr 5 11:50:25 2018 -0400

    doc: add a link in the install guides about configuring neutron

    It is not uncommon to triage bugs on a weekly basis where the
    [neutron] auth credentials are not configured in nova.conf, which
    generally leads to a 500 response in the compute API because of
    the auth error.

    With respect to neutron, the compute install guides really only
    say to set use_neutron=True, but don't mention that configuring
    the [neutron] section for auth is required. The networking service
    install guide does, so it's a bit confusing why people make this
    mistake in the first place, but as a reminder, this change adds
    links from the compute install guide to the relevant sections
    in the networking service install guides.

    Change-Id: Id17457bd2770fcbebd6231919ba4002e75410089
    Closes-Bug: #1761487

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.openstack.org/559399
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=b752717f253f0c3eb45cc7ae5530bc8f295b4c22
Submitter: Zuul
Branch: master

commit b752717f253f0c3eb45cc7ae5530bc8f295b4c22
Author: Matt Riedemann <email address hidden>
Date: Fri Apr 6 14:52:13 2018 -0400

    Log a more useful error when cinder auth isn't configured

    This is similar to I18f162c4f8d1964cb4d0c184ff2149c76e1e86b4,
    except all REST API interactions that hit the Cinder API use
    the request user token, so configuring auth for [cinder] was
    only recently added (in Queens) and is not required. However,
    it is needed for certain scenarios where there is no user token,
    like with periodic tasks to shutdown an instance and detach its
    volumes. As such, we need to provide a more useful error message
    to help an operator debug the problem if this don't have the
    configuration needed for some operations.

    Change-Id: I7adaa003a86503b711e87be671e9ef9c0e52b152
    Related-Bug: #1761487

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b1

This issue was fixed in the openstack/nova 18.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.