burnin: only call self.GrowDisks() if needed
authorIustin Pop <iustin@google.com>
Fri, 16 Jan 2009 13:09:43 +0000 (13:09 +0000)
committerIustin Pop <iustin@google.com>
Fri, 16 Jan 2009 13:09:43 +0000 (13:09 +0000)
In case we pass --disk-grow 0[,0..] then we should not call GrowDisks as it
prints confusing log lines.

Reviewed-by: imsnah

tools/burnin

index 230c803..84b506b 100755 (executable)
@@ -689,7 +689,8 @@ class Burner(object):
           opts.disk_template in constants.DTS_NET_MIRROR) :
         self.ReplaceDisks2()
 
-      if opts.disk_template != constants.DT_DISKLESS:
+      if (opts.disk_template != constants.DT_DISKLESS and
+          utils.any(self.disk_growth, lambda n: n > 0)):
         self.GrowDisks()
 
       if opts.do_failover and opts.disk_template in constants.DTS_NET_MIRROR: