From 683d13604103102112565fe5f93f064c5e4cb1f7 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Thu, 20 Sep 2012 13:46:27 -0700 Subject: Fix live migration when volumes are attached There was some safety code in live-migration to make sure volumes were exported before trying to live-migrate volumes. This code is broken with cinder as it doesn't expose a way to do this. Since the code was basically just a safety measure, this just deletes it so live migration works again. Fixes bug 1050421 Change-Id: I3ecd58dc2c37eab30ebfa04140475a9198aede67 --- nova/compute/manager.py | 8 -------- nova/tests/compute/test_compute.py | 3 --- 2 files changed, 11 deletions(-) diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 76c91a575..8ef673328 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -2148,14 +2148,6 @@ class ComputeManager(manager.SchedulerDependentManager): """ try: - # Checking volume node is working correctly when any volumes - # are attached to instances. - if self._get_instance_volume_bdms(context, instance['uuid']): - rpc.call(context, - FLAGS.volume_topic, - {'method': 'check_for_export', - 'args': {'instance_id': instance['id']}}) - if block_migration: disk = self.driver.get_instance_disk_info(instance['name']) else: diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py index 63af33153..bf921fa2f 100644 --- a/nova/tests/compute/test_compute.py +++ b/nova/tests/compute/test_compute.py @@ -2090,9 +2090,6 @@ class ComputeTestCase(BaseTestCase): # creating mocks self.mox.StubOutWithMock(rpc, 'call') - rpc.call(c, FLAGS.volume_topic, - {"method": "check_for_export", - "args": {'instance_id': inst_id}}) self.mox.StubOutWithMock(self.compute.driver, 'get_instance_disk_info') -- cgit