tempest baremetal client is creating node with wrong property keys
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned | ||
Juno |
Fix Released
|
High
|
Adam Gandelman | ||
tempest |
Fix Released
|
High
|
Matt Riedemann |
Bug Description
A new test has been added to tempest to stress the os-baremetal-nodes API extension. The test periodically fails in the gate with traceback in n-api log:
[req-01dcd35b-
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack Traceback (most recent call last):
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack File "/opt/stack/
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack return req.get_
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack File "/usr/lib/
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack application, catch_exc_
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack File "/usr/lib/
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack app_iter = application(
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack File "/usr/lib/
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack return resp(environ, start_response)
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack File "/usr/local/
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack return self._call_app(env, start_response)
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack File "/usr/local/
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack return self._app(env, _fake_start_
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack File "/usr/local/
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack response = self.app(environ, start_response)
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack File "/usr/lib/
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs)
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack File "/usr/lib/
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack return self.func(req, *args, **kwargs)
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack File "/opt/stack/
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack content_type, body, accept)
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack File "/opt/stack/
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack action_result = self.dispatch(meth, request, action_args)
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack File "/opt/stack/
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack return method(req=request, **action_args)
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack File "/opt/stack/
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack 'cpus': inode.propertie
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack KeyError: 'cpus'
2015-02-19 01:37:41.910 2521 TRACE nova.api.openstack
This hits only periodically and only when another tempest baremetal test is running in parallel to the new test. The other tests (tempest.
for inode in ironic_nodes:
The other tempest test is creating nodes with a different set of properties:
{u'cpu_arch': u'x86', u'cpu_num': 8, u'memory': 4096, u'storage': 1024}
Ironic node properties are meant to be an arbitrary json dict, so the nova code needs to account for this in one way or another.
Changed in nova: | |
status: | New → Invalid |
We should probably just do something like this:
'cpus': inode.propertie s.get(' cpus') or inode.propertie s.get(' cpu_num' ),