api error on running command : nova baremetal-node-list

Bug #1569242 reported by Apoorv
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
python-ironicclient
Invalid
Undecided
Unassigned

Bug Description

 nova baremetal-node-list
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'ironicclient.exc.AmbiguousAuthSystem'> (HTTP 500) (Request-ID: req-bebb641d-18e6-4016-8939-860216fcc754)

This is the nova-api log

2016-04-12 14:55:36.671 ERROR nova.api.openstack.extensions [req-f6b69035-d1ee-487a-9380-b5c715cbb368 admin admin] Unexpected exception in API method
2016-04-12 14:55:36.671 TRACE nova.api.openstack.extensions Traceback (most recent call last):
2016-04-12 14:55:36.671 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/extensions.py", line 478, in wrapped
2016-04-12 14:55:36.671 TRACE nova.api.openstack.extensions return f(*args, **kwargs)
2016-04-12 14:55:36.671 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/baremetal_nodes.py", line 90, in index
2016-04-12 14:55:36.671 TRACE nova.api.openstack.extensions icli = _get_ironic_client()
2016-04-12 14:55:36.671 TRACE nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/baremetal_nodes.py", line 61, in _get_ironic_client
2016-04-12 14:55:36.671 TRACE nova.api.openstack.extensions icli = ironic_client.get_client(CONF.ironic.api_version, **kwargs)
2016-04-12 14:55:36.671 TRACE nova.api.openstack.extensions File "/usr/local/lib/python2.7/dist-packages/ironicclient/client.py", line 137, in get_client
2016-04-12 14:55:36.671 TRACE nova.api.openstack.extensions raise exc.AmbiguousAuthSystem(exception_msg)
2016-04-12 14:55:36.671 TRACE nova.api.openstack.extensions AmbiguousAuthSystem: Must provide Keystone credentials or user-defined endpoint and token
2016-04-12 14:55:36.671 TRACE nova.api.openstack.extensions
2016-04-12 14:55:36.746 INFO nova.api.openstack.wsgi [req-f6b69035-d1ee-487a-9380-b5c715cbb368 admin admin] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'ironicclient.exc.AmbiguousAuthSystem'>
2016-04-12 14:55:36.750 DEBUG nova.api.openstack.wsgi [req-f6b69035-d1ee-487a-9380-b5c715cbb368 admin admin] Returning 500 to user: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'ironicclient.exc.AmbiguousAuthSystem'> from (pid=3874) __call__ /opt/stack/nova/nova/api/openstack/wsgi.py:1070
2016-04-12 14:55:36.766 INFO nova.osapi_compute.wsgi.server [req-f6b69035-d1ee-487a-9380-b5c715cbb368 admin admin] 192.168.122.72 "GET /v2.1/os-baremetal-nodes HTTP/1.1" status: 500 len: 513 time: 1.7956100

Tags: nova openstack
tags: added: openstack
tags: added: nova
zhaolihui (zhaolh)
Changed in nova:
assignee: nobody → zhaolihui (zhaolh)
Revision history for this message
Sylvain Bauza (sylvain-bauza) wrote :

The stack shows an issue with the ironicclient. That can possibly be a configuration problem, but either way it's not related to Nova.

Changed in nova:
status: New → Invalid
Revision history for this message
Sylvain Bauza (sylvain-bauza) wrote :

As explained in IRC, that looks like a configuration problem :

- https://github.com/openstack/python-ironicclient/blob/master/ironicclient/client.py#L78 takes the endpoint value from ironic_url in parameters
- whose value is taken from a config opt https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/baremetal_nodes.py#L60
- where https://github.com/openstack/nova/blob/master/nova/conf/ironic.py#L29-L31 is default to None (meaning you have to set it)

Changed in python-ironicclient:
status: New → Invalid
Revision history for this message
zhaolihui (zhaolh) wrote :

The Unexpected API Error was raised when ironic.admin_username, ironic.admin_password, ironic.admin_url and ironic.admin_tenant_name in the configure file was not setted.
It is a configuration problem.

Changed in nova:
assignee: zhaolihui (zhaolh) → nobody
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.