Unconditionally log upgrades at debug level
authorKlaus Aehlig <aehlig@google.com>
Tue, 12 Jan 2016 09:38:50 +0000 (10:38 +0100)
committerKlaus Aehlig <aehlig@google.com>
Tue, 12 Jan 2016 15:22:13 +0000 (16:22 +0100)
Cluster upgrades to a new minor version of Ganeti are a rare
operation (in fact, new minor versions are released only every
3 months). Therefore, we do not have to worry about increased
size of log files. However, upgrades of Ganeti are complicated
in the sense that, should something break during the upgrade, it
is not immediately obvious, in which Ganeti state is left in. Therefore,
always provide full log information on upgrades. Fixes issue 1137.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

lib/client/gnt_cluster.py

index f1cabef..bffc163 100644 (file)
@@ -2257,6 +2257,8 @@ def UpgradeGanetiCommand(opts, args):
                  " finish it first" % (oldversion, versionstring))
         return 1
 
                  " finish it first" % (oldversion, versionstring))
         return 1
 
+  utils.SetupLogging(pathutils.LOG_COMMANDS, 'gnt-cluster upgrade', debug=1)
+
   oldversion = constants.RELEASE_VERSION
 
   if opts.resume:
   oldversion = constants.RELEASE_VERSION
 
   if opts.resume: