From: Iustin Pop Date: Sun, 19 Jul 2009 18:34:08 +0000 (+0200) Subject: burnin: fix removal errors hiding real errors X-Git-Tag: v2.0.4~10^2~45 X-Git-Url: https://code.grnet.gr/git/ganeti-local/commitdiff_plain/8629a5432e0d089b3b47df1381fe05a66c6ed981 burnin: fix removal errors hiding real errors A long-standing bug in burnin makes errors during the removal phase (e.g. because an import has failed, or because the initial creation has failed) hide the original error. This patch suppresses removal errors if we are already in ‘has_err’ mode, and otherwise it displays them normally. Signed-off-by: Iustin Pop Reviewed-by: Guido Trotter --- diff --git a/tools/burnin b/tools/burnin index d0ef877..1ba5f7b 100755 --- a/tools/burnin +++ b/tools/burnin @@ -784,7 +784,14 @@ class Burner(object): Log(self.GetFeedbackBuf()) Log("\n\n") if not self.opts.keep_instances: - self.BurnRemove() + try: + self.BurnRemove() + except Exception, err: + if has_err: # already detected errors, so errors in removal + # are quite expected + Log("Note: error detected during instance remove: %s" % str(err)) + else: # non-expected error + raise return 0