diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-03-01 03:47:27 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-03-01 03:47:27 +0000 |
| commit | 87401deacff181829c0934fb409dd56eb1fc3a71 (patch) | |
| tree | d83e06ffe9bb411363fefd57bbb8c7653d160856 | |
| parent | a9fdb38924c497200e5a32c8e14dce7ca4737f27 (diff) | |
| parent | a96f9f743c2a2b04c4b15cc8b359951a5777b0c4 (diff) | |
| download | nova-87401deacff181829c0934fb409dd56eb1fc3a71.tar.gz nova-87401deacff181829c0934fb409dd56eb1fc3a71.tar.xz nova-87401deacff181829c0934fb409dd56eb1fc3a71.zip | |
Merge "Fixes a Hyper-V live migration issue"
| -rwxr-xr-x | nova/virt/hyperv/driver.py | 16 | ||||
| -rw-r--r-- | nova/virt/hyperv/livemigrationops.py | 18 |
2 files changed, 24 insertions, 10 deletions
diff --git a/nova/virt/hyperv/driver.py b/nova/virt/hyperv/driver.py index aac47deef..e29ef7cbe 100755 --- a/nova/virt/hyperv/driver.py +++ b/nova/virt/hyperv/driver.py @@ -112,9 +112,6 @@ class HyperVDriver(driver.ComputeDriver): post_method, recover_method, block_migration, migrate_data) - def compare_cpu(self, cpu_info): - return self._livemigrationops.compare_cpu(cpu_info) - def pre_live_migration(self, context, instance, block_device_info, network_info, migrate_data=None): self._livemigrationops.pre_live_migration(context, instance, @@ -134,14 +131,19 @@ class HyperVDriver(driver.ComputeDriver): src_compute_info, dst_compute_info, block_migration=False, disk_over_commit=False): - pass + return self._livemigrationops.check_can_live_migrate_destination( + ctxt, instance_ref, src_compute_info, dst_compute_info, + block_migration, disk_over_commit) def check_can_live_migrate_destination_cleanup(self, ctxt, dest_check_data): - pass + self._livemigrationops.check_can_live_migrate_destination_cleanup( + ctxt, dest_check_data) - def check_can_live_migrate_source(self, ctxt, instance, dest_check_data): - pass + def check_can_live_migrate_source(self, ctxt, instance_ref, + dest_check_data): + return self._livemigrationops.check_can_live_migrate_source( + ctxt, instance_ref, dest_check_data) def plug_vifs(self, instance, network_info): LOG.debug(_("plug_vifs called"), instance=instance) diff --git a/nova/virt/hyperv/livemigrationops.py b/nova/virt/hyperv/livemigrationops.py index dca5de0cc..94f6f74d8 100644 --- a/nova/virt/hyperv/livemigrationops.py +++ b/nova/virt/hyperv/livemigrationops.py @@ -76,6 +76,18 @@ class LiveMigrationOps(object): LOG.debug(_("post_live_migration_at_destination called"), instance=instance_ref) - def compare_cpu(self, cpu_info): - LOG.debug(_("compare_cpu called %s"), cpu_info) - return True + def check_can_live_migrate_destination(self, ctxt, instance_ref, + src_compute_info, dst_compute_info, + block_migration=False, + disk_over_commit=False): + LOG.debug(_("check_can_live_migrate_destination called"), instance_ref) + return {} + + def check_can_live_migrate_destination_cleanup(self, ctxt, + dest_check_data): + LOG.debug(_("check_can_live_migrate_destination_cleanup called")) + + def check_can_live_migrate_source(self, ctxt, instance_ref, + dest_check_data): + LOG.debug(_("check_can_live_migrate_source called"), instance_ref) + return dest_check_data |
