gnt-node migrate: pass the cleanup option
authorGuido Trotter <ultrotter@google.com>
Thu, 27 Nov 2008 15:02:34 +0000 (15:02 +0000)
committerGuido Trotter <ultrotter@google.com>
Thu, 27 Nov 2008 15:02:34 +0000 (15:02 +0000)
currently gnt-node migrate fails because there is no cleanup option
passed to the opcode. this patch fixes it by setting cleanup to False.
In case of gnt-node migrate failure cleanup will have to be passed
manually.

Reviewed-by: iustinp

scripts/gnt-node

index fcdbea2..18498df 100755 (executable)
@@ -238,7 +238,8 @@ def MigrateNode(opts, args):
 
   good_cnt = bad_cnt = 0
   for iname in pinst:
-    op = opcodes.OpMigrateInstance(instance_name=iname, live=opts.live)
+    op = opcodes.OpMigrateInstance(instance_name=iname, live=opts.live,
+                                   cleanup=False)
     try:
       logger.ToStdout("Migrating instance %s" % iname)
       SubmitOpCode(op)