Commit 996f742d authored by Iustin Pop's avatar Iustin Pop

lvmstrap: fix logic bug for partition reread

The if structure in CheckReread is broken, and makes partitions reread
be full of race issues (esp. after updating them).

Also fix a small message bug.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 6ec77900
......@@ -53,7 +53,7 @@ from ganeti import cli
from ganeti import compat
USAGE = ("\tlvmstrap diskinfo\n"
"\tlvmstrap [--vgname=NAME] [--allow-removable]"
"\tlvmstrap [--vg-name=NAME] [--allow-removable]"
" { --alldisks | --disks DISKLIST }"
" create")
......@@ -648,7 +648,7 @@ def CheckReread(name):
result = ExecCommand(cmd)
if not use_blockdev and result.failed:
break
elif not result.failed:
elif use_blockdev and not result.failed:
break
time.sleep(2)
......
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