From fc2318f7226402d9e61c32ff1743f7df729d7ae6 Mon Sep 17 00:00:00 2001 From: Helga Velroyen <helgav@google.com> Date: Thu, 2 May 2013 14:35:39 +0200 Subject: [PATCH] Disable inter-cluster instance move for file instances Inter-cluster instance moves depends on exporting an instance. For file-based instance, exporting is not supported. Therefore, this patch disables inter-cluster instance moves for file-based instances and informs the user with an expressive error message. Signed-off-by: Helga Velroyen <helgav@google.com> Reviewed-by: Michele Tartara <mtartara@google.com> --- NEWS | 3 +++ tools/move-instance | 3 +++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 81aedfbcb..7cfdec550 100644 --- a/NEWS +++ b/NEWS @@ -124,6 +124,9 @@ Since beta3: - Fix failure path for instance storage type conversion (Issue 229) - Update htools text backend documentation - Improve the renew-crypto section of :manpage:`gnt-cluster(8)` +- Disable inter-cluster instance move for file-based instances, because + it is dependant on instance export, which is not supported for + file-based instances. (Issue 414) Version 2.7.0 beta3 diff --git a/tools/move-instance b/tools/move-instance index 24bb49612..f7a4b34df 100755 --- a/tools/move-instance +++ b/tools/move-instance @@ -561,6 +561,9 @@ class MoveSourceExecutor(object): logging.info("Retrieving instance information from source cluster") instinfo = self._GetInstanceInfo(src_client, mrt.PollJob, mrt.move.src_instance_name) + if instinfo["disk_template"] == constants.DT_FILE: + raise Error("Inter-cluster move of file-based instances is not" + " supported.") logging.info("Preparing export on source cluster") expinfo = self._PrepareExport(src_client, mrt.PollJob, -- GitLab