From 4d1f60df049e11623df7d6174eda19e5e27d004e Mon Sep 17 00:00:00 2001 From: Kei Masumoto Date: Tue, 5 Apr 2011 20:20:32 +0900 Subject: fix bug lp751231 --- nova/compute/manager.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 08b772517..37a904b1e 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -1090,6 +1090,15 @@ class ComputeManager(manager.SchedulerDependentManager): vm_state = vm_instance.state vms_not_found_in_db.remove(name) + if db_instance['state_description'] == 'migrating': + # A situation which db record exists, but no instance" + # sometimes occurs while live-migration at src compute, + # this case should be ignored. + LOG.info(_("the instance '%(name)s' is not found in hypervisor" + ", while db record is found. But not synchronize " + "since it is migrating." % locals())) + continue + if vm_state != db_state: LOG.info(_("DB/VM state mismatch. Changing state from " "'%(db_state)s' to '%(vm_state)s'") % locals()) -- cgit From d7e8d91d6bc4954f2d256f57e34444b5bd170ab0 Mon Sep 17 00:00:00 2001 From: Kei Masumoto Date: Thu, 7 Apr 2011 13:08:14 +0900 Subject: fixed based on reviewer's comment - 'locals() should be off from _() --- nova/compute/manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 37a904b1e..847c3655a 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -1096,7 +1096,7 @@ class ComputeManager(manager.SchedulerDependentManager): # this case should be ignored. LOG.info(_("the instance '%(name)s' is not found in hypervisor" ", while db record is found. But not synchronize " - "since it is migrating." % locals())) + "since it is migrating.") % locals()) continue if vm_state != db_state: -- cgit From 0cf2a52218fbb801a35e5dd73e146c6c37e218e2 Mon Sep 17 00:00:00 2001 From: Kei Masumoto Date: Sat, 9 Apr 2011 02:39:18 +0900 Subject: fixed LOG level and log message phrase --- nova/compute/manager.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 847c3655a..c7d86e27b 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -1094,9 +1094,8 @@ class ComputeManager(manager.SchedulerDependentManager): # A situation which db record exists, but no instance" # sometimes occurs while live-migration at src compute, # this case should be ignored. - LOG.info(_("the instance '%(name)s' is not found in hypervisor" - ", while db record is found. But not synchronize " - "since it is migrating.") % locals()) + LOG.debug(_("Ignoring %(name)s, as it's currently being " + "migrated.") % locals()) continue if vm_state != db_state: -- cgit