summaryrefslogtreecommitdiff
path: root/nova/api/openstack/compute/server_external_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/api/openstack/compute/server_external_events.py')
-rw-r--r--nova/api/openstack/compute/server_external_events.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/api/openstack/compute/server_external_events.py b/nova/api/openstack/compute/server_external_events.py
index fddb624156..28075d3f62 100644
--- a/nova/api/openstack/compute/server_external_events.py
+++ b/nova/api/openstack/compute/server_external_events.py
@@ -73,9 +73,10 @@ class ServerExternalEventsController(wsgi.Controller):
# Load migration_context and info_cache here in a single DB
# operation because we need them later on
- with nova_context.target_cell(context, cell_mapping):
+ with nova_context.target_cell(context,
+ cell_mapping) as cctxt:
instance = objects.Instance.get_by_uuid(
- context, event.instance_uuid,
+ cctxt, event.instance_uuid,
expected_attrs=['migration_context', 'info_cache'])
instances[event.instance_uuid] = instance
except (exception.InstanceNotFound,