Commit a085d96d authored by Bernardo Dal Seno's avatar Bernardo Dal Seno

QA for allocator in recreate-disks

QA for recreate-disks called it twice with a list of node; the first call
now uses an allocator.
Signed-off-by: default avatarAdam Ingrassia <api@google.com>
Signed-off-by: default avatarBernardo Dal Seno <bdalseno@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 38db4e7c
......@@ -481,15 +481,16 @@ def TestRecreateDisks(instance, pnode, snode, othernodes):
orig_seq = pnode["primary"]
if snode:
orig_seq = orig_seq + ":" + snode["primary"]
# This fails beacuse the instance is running
# These fail because the instance is running
_AssertRecreateDisks(["-n", other_seq], instance, fail=True, destroy=False)
_AssertRecreateDisks(["-I", "hail"], instance, fail=True, destroy=False)
AssertCommand(["gnt-instance", "stop", instance["name"]])
# Disks exist: this should fail
_AssertRecreateDisks([], instance, fail=True, destroy=False)
# Recreate disks in place
_AssertRecreateDisks([], instance)
# Move disks away
_AssertRecreateDisks(["-n", other_seq], instance)
_AssertRecreateDisks(["-I", "hail"], instance)
# Move disks back
_AssertRecreateDisks(["-n", orig_seq], instance, check=False)
# This and InstanceCheck decoration check that the disks are working
......
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