Commit 320eda24 authored by Iustin Pop's avatar Iustin Pop
Browse files

burnin: add option to not remove instances

This patch adds a burnin option to keep instances at the end, so that
debugging after a burnin failure is easier.

Also, we reorder the command line parsing and client query so that one
can use ./tools/burnin --help even on non-ganeti machines.

Reviewed-by: ultrotter
parent 25e7b43f
......@@ -88,8 +88,8 @@ class Burner(object):
self.instances = []
self.to_rem = []
self.opts = None = cli.GetClient()
self.ParseOptions() = cli.GetClient()
def ClearFeedbackBuf(self):
......@@ -222,6 +222,12 @@ class Burner(object):
help="Enable checking of instance status via http,"
" looking for /hostname.txt that should contain the"
" name of the instance")
parser.add_option("-K", "--keep-instances", default=False,
help="Leave instances on the cluster after burnin,"
" for investigation in case of errors or simply"
" to use them")
options, args = parser.parse_args()
......@@ -724,7 +730,8 @@ class Burner(object):
Log("Error detected: opcode buffer follows:\n\n")
if not self.opts.keep_instances:
return 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment