burnin: skip instance moves on single node
authorGuido Trotter <ultrotter@google.com>
Wed, 7 Oct 2009 09:45:29 +0000 (10:45 +0100)
committerGuido Trotter <ultrotter@google.com>
Wed, 7 Oct 2009 10:14:15 +0000 (11:14 +0100)
If we have only one node, instance moves fail, because it tries to move
the instance to itself. Skipping the operation, because in that case it
doesn't make sense.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>

tools/burnin

index 7796785..395edbf 100755 (executable)
@@ -865,8 +865,8 @@ class Burner(object):
       if opts.do_migrate and opts.disk_template == constants.DT_DRBD8:
         self.BurnMigrate()
 
-      if opts.do_move and opts.disk_template in [constants.DT_PLAIN,
-                                                 constants.DT_FILE]:
+      if (opts.do_move and len(self.nodes) > 1 and
+          opts.disk_template in [constants.DT_PLAIN, constants.DT_FILE]):
         self.BurnMove()
 
       if (opts.do_importexport and