diff options
author | Fei Long Wang <flwang@cn.ibm.com> | 2013-03-10 22:57:13 +0800 |
---|---|---|
committer | Fei Long Wang <flwang@cn.ibm.com> | 2013-03-12 08:16:58 +0800 |
commit | 5f46f6acf3a000c8e65ee6f2574aff518b036d29 (patch) | |
tree | b096de6406ef8344883b5adf469e0e29061b956c /nova/scheduler/manager.py | |
parent | 67069a3d1a4174fae987c8e3a7091b6fd37ff606 (diff) | |
download | nova-5f46f6acf3a000c8e65ee6f2574aff518b036d29.tar.gz nova-5f46f6acf3a000c8e65ee6f2574aff518b036d29.tar.xz nova-5f46f6acf3a000c8e65ee6f2574aff518b036d29.zip |
Fixes instance task_state being left as migrating
In a cross-hypervisor environment, such as KVM + Hyper-v. After negative test
which live migrate a KVM instance to Hyper-v host, there will be an exception
InvalidHypervisorType. As a result, the instance task_state is being
left as migrating. That leaves the instance in a broken state and most of the
requests on the instance will fail.
Actually, there are some other exceptions will cause this issue as well, such
as UnableToMigrateToSelf, DestinationHypervisorTooOld. All of them are thrown
from the driver of scheduler during live migration. But obviously, if the live
migration fails at the schedule stage, the task_state of the target instance
should be updated to None.
Fixes Bug: 1153283
Change-Id: Ide4b48653268c8dbe31de6964814830d2e82a5ba
Diffstat (limited to 'nova/scheduler/manager.py')
-rw-r--r-- | nova/scheduler/manager.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/scheduler/manager.py b/nova/scheduler/manager.py index 11798ca04..c3022fdea 100644 --- a/nova/scheduler/manager.py +++ b/nova/scheduler/manager.py @@ -95,7 +95,10 @@ class SchedulerManager(manager.Manager): return self.driver.schedule_live_migration( context, instance, dest, block_migration, disk_over_commit) - except exception.ComputeServiceUnavailable as ex: + except (exception.ComputeServiceUnavailable, + exception.InvalidHypervisorType, + exception.UnableToMigrateToSelf, + exception.DestinationHypervisorTooOld) as ex: request_spec = {'instance_properties': { 'uuid': instance['uuid'], }, } |