Skip to content
Snippets Groups Projects
Commit 6d54548e authored by Guido Trotter's avatar Guido Trotter
Browse files

burnin: improve instance create message

When the allocator or a non-mirrored template are used the message shown by
burnin at instance creation time was wrong. Fixing it.

Reviewed-by: iustinp
parent 4a7ff493
No related branches found
No related tags found
No related merge requests found
......@@ -207,6 +207,14 @@ class Burner(object):
for pnode, snode, instance in mytor:
if self.opts.iallocator:
pnode = snode = None
Log("- Add instance %s (iallocator: %s)" %
(instance, self.opts.iallocator))
elif self.opts.disk_template not in constants.DTS_NET_MIRROR:
snode = None
Log("- Add instance %s on node %s" % (instance, pnode))
else:
Log("- Add instance %s on nodes %s/%s" % (instance, pnode, snode))
op = opcodes.OpCreateInstance(instance_name=instance,
mem_size=128,
disk_size=self.opts.os_size,
......@@ -227,7 +235,6 @@ class Burner(object):
file_driver="loop",
file_storage_dir=None,
iallocator=self.opts.iallocator)
Log("- Add instance %s on nodes %s/%s" % (instance, pnode, snode))
self.ExecOp(op)
self.to_rem.append(instance)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment