From 49c8979ce3575b5c6d7fcc6e8d5e7c378858318b Mon Sep 17 00:00:00 2001 From: Nikola Dipanov Date: Tue, 25 Aug 2015 12:40:35 +0100 Subject: [PATCH] db: Add the migration_context to the instance_extra table We will save data that needs to be persisted for the duration of an instance migration in this column, as described in more detail in the linked BP. Follow-on patches will introduce the objects plumbing for this. Change-Id: I6faaa843b6587ad972a8df187e50a5b4e91540c8 Related-blueprint: migration-fix-resource-tracking --- nova/db/sqlalchemy/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 85dd127a7..27dc2bb29 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -2721,7 +2721,8 @@ def instance_extra_get_by_instance_uuid(context, instance_uuid, query = model_query(context, models.InstanceExtra).\ filter_by(instance_uuid=instance_uuid) if columns is None: - columns = ['numa_topology', 'pci_requests', 'flavor', 'vcpu_model'] + columns = ['numa_topology', 'pci_requests', 'flavor', 'vcpu_model', + 'migration_context'] for column in columns: query = query.options(undefer(column)) instance_extra = query.first()