Disable inter-cluster instance move for file instances
authorHelga Velroyen <helgav@google.com>
Thu, 2 May 2013 12:35:39 +0000 (14:35 +0200)
committerHelga Velroyen <helgav@google.com>
Thu, 2 May 2013 13:01:25 +0000 (15:01 +0200)
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
tools/move-instance

diff --git a/NEWS b/NEWS
index 81aedfb..7cfdec5 100644 (file)
--- 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
index 24bb496..f7a4b34 100755 (executable)
@@ -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,