Instance with NUMA topology causes exception in the scheduler

Bug #1369508 reported by Nikola Đipanov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Nikola Đipanov

Bug Description

This was reported by Michael Turek as he was testing this while the patches were still in flight See: https://review.openstack.org/#/c/114938/26/nova/virt/hardware.py

As described on there - the code there makes a bad assumption about the format in which it will get the data in the scheduler, which results in:

2014-09-15 10:45:44.906 ERROR oslo.messaging.rpc.dispatcher [req-f29a469e-268d-49bf-abfa-0ccb228d768c admin admin] Exception during message handling: An object of type InstanceNUMACell is required here
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/server.py", line 139, in inner
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher return func(*args, **kwargs)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/scheduler/manager.py", line 175, in select_destinations
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher filter_properties)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 147, in select_destinations
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher filter_properties)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 300, in _schedule
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher chosen_host.obj.consume_from_instance(context, instance_properties)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/scheduler/host_manager.py", line 252, in consume_from_instance
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher self, instance)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/virt/hardware.py", line 978, in get_host_numa_usage_from_instance
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher instance_numa_topology = instance_topology_from_instance(instance)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/virt/hardware.py", line 949, in instance_topology_from_instance
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher cells=cells)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/objects/base.py", line 242, in __init__
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher self[key] = kwargs[key]
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/objects/base.py", line 474, in __setitem__
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher setattr(self, name, value)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/objects/base.py", line 75, in setter
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher field_value = field.coerce(self, name, value)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/objects/fields.py", line 189, in coerce
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher return self._type.coerce(obj, attr, value)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/objects/fields.py", line 388, in coerce
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher obj, '%s[%i]' % (attr, index), element)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/objects/fields.py", line 189, in coerce
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher return self._type.coerce(obj, attr, value)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher File "/opt/stack/nova/nova/objects/fields.py", line 474, in coerce
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher self._obj_name)
2014-09-15 10:45:44.906 TRACE oslo.messaging.rpc.dispatcher ValueError: An object of type InstanceNUMACell is required here

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/121558

Changed in nova:
assignee: nobody → Nikola Đipanov (ndipanov)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/121558
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=12b8b56807af7ce3bbe330d73864abc87cdadbf1
Submitter: Jenkins
Branch: master

commit 12b8b56807af7ce3bbe330d73864abc87cdadbf1
Author: Nikola Dipanov <email address hidden>
Date: Mon Sep 15 15:32:56 2014 +0200

    instance_topology_from_instance handles request_spec properly

    We special-case how we handle the instance that we extract from the
    request_spec data blob in virt.hardware.instance_topology_from_instance,
    however, we were making wrong assumptions about the data we get from it
    in the scheduler.

    This patch fixes how it is handled and also updates the tests and
    comments in the code to reflect it.

    Change-Id: I38d7078d670bc37ddb40fba82fd0f9cb74045047
    Closes-bug: #1369508

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-rc1 → 2014.2
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.