API for baremetal nodes fails if node has no interfaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
aeva black |
Bug Description
If a baremetal node is created, but has no interfaces associated with it, API calls to list all nodes, show that node, or delete that node will fail until an interface is associated with it.
These API calls should work regardless of whether the node has any interfaces associated.
Errors from python-novaclient:
$ nova baremetal-node-list
ERROR: The resource could not be found. (HTTP 404) (Request-ID: req-11cc3b25-
$ nova baremetal-
ERROR: No baremetalnode with a name or ID of '1' exists.
Error in nova-api:
2013-02-21 21:52:26.215 TRACE nova.api.openstack File "/opt/stack/
2013-02-21 21:52:26.215 TRACE nova.api.openstack context, node_from_db['id'])
2013-02-21 21:52:26.215 TRACE nova.api.openstack File "/opt/stack/
2013-02-21 21:52:26.215 TRACE nova.api.openstack return IMPL.bm_
2013-02-21 21:52:26.215 TRACE nova.api.openstack File "/opt/stack/
2013-02-21 21:52:26.215 TRACE nova.api.openstack return f(*args, **kwargs)
2013-02-21 21:52:26.215 TRACE nova.api.openstack File "/opt/stack/
2013-02-21 21:52:26.215 TRACE nova.api.openstack raise exception.
2013-02-21 21:52:26.215 TRACE nova.api.openstack NodeNotFound: Node 1 could not be found.
The fix is simple: don't raise an exception in bm_interface_
Changed in nova: | |
assignee: | nobody → Devananda van der Veen (devananda) |
tags: | added: baremetal |
Changed in nova: | |
importance: | Undecided → Medium |
milestone: | none → grizzly-rc1 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | grizzly-rc1 → 2013.1 |
Actually, better solution - change the exception handling in nova/api/ openstack/ compute/ contrib/ baremetal_ nodes.py to catch the right exceptions.