From f94391fb41b42909ae9508ed54316199fccfe41d Mon Sep 17 00:00:00 2001 From: Jian Wen Date: Wed, 29 Aug 2012 22:29:25 +0800 Subject: Add a new exception for live migration. Raises new exception InvalidLocalStorage instead of InvalidSharedStorage when block migration is used with shared storage. Corrects the message of InvalidSharedStorage. Fixes bug 1043165 Change-Id: I68bfac3f89276edc38c00ca963911fe07456dc0d --- nova/virt/libvirt/driver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nova/virt') diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 7bb4cbc22..6207c6caf 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -2242,7 +2242,7 @@ class LibvirtDriver(driver.ComputeDriver): """ # Checking shared storage connectivity # if block migration, instances_paths should not be on shared storage. - dest = FLAGS.host + source = FLAGS.host filename = dest_check_data["filename"] block_migration = dest_check_data["block_migration"] @@ -2252,12 +2252,12 @@ class LibvirtDriver(driver.ComputeDriver): if shared: reason = _("Block migration can not be used " "with shared storage.") - raise exception.InvalidSharedStorage(reason=reason, path=dest) + raise exception.InvalidLocalStorage(reason=reason, path=source) elif not shared: reason = _("Live migration can not be used " "without shared storage.") - raise exception.InvalidSharedStorage(reason=reason, path=dest) + raise exception.InvalidSharedStorage(reason=reason, path=source) def _get_compute_info(self, context, host): """Get compute host's information specified by key""" -- cgit