Revision 317a3fdb qa/qa_cluster.py
b/qa/qa_cluster.py | ||
---|---|---|
616 | 616 |
|
617 | 617 |
drbd_usermode_helper = qa_config.get("drbd-usermode-helper", "/bin/true") |
618 | 618 |
bogus_usermode_helper = "/tmp/pinkbunny" |
619 |
for command, fail in \
|
|
620 |
[(["gnt-cluster", "modify",
|
|
621 |
"--enabled-disk-templates=%s" % constants.DT_DRBD8,
|
|
622 |
"--ipolicy-disk-templates=%s" % constants.DT_DRBD8], False),
|
|
623 |
(["gnt-cluster", "modify",
|
|
624 |
"--drbd-usermode-helper=%s" % drbd_usermode_helper], False),
|
|
625 |
(["gnt-cluster", "modify",
|
|
626 |
"--drbd-usermode-helper=%s" % bogus_usermode_helper], True),
|
|
627 |
# unsetting helper when DRBD is enabled should not work
|
|
628 |
(["gnt-cluster", "modify",
|
|
629 |
"--drbd-usermode-helper="], True),
|
|
630 |
(["gnt-cluster", "modify",
|
|
631 |
"--enabled-disk-templates=%s" % constants.DT_PLAIN,
|
|
632 |
"--ipolicy-disk-templates=%s" % constants.DT_PLAIN], False),
|
|
633 |
(["gnt-cluster", "modify",
|
|
634 |
"--drbd-usermode-helper="], False),
|
|
635 |
(["gnt-cluster", "modify",
|
|
636 |
"--drbd-usermode-helper=%s" % drbd_usermode_helper], False),
|
|
637 |
(["gnt-cluster", "modify",
|
|
638 |
"--drbd-usermode-helper=%s" % drbd_usermode_helper,
|
|
639 |
"--enabled-disk-templates=%s" % constants.DT_DRBD8,
|
|
640 |
"--ipolicy-disk-templates=%s" % constants.DT_DRBD8], False),
|
|
641 |
(["gnt-cluster", "modify",
|
|
642 |
"--drbd-usermode-helper=",
|
|
643 |
"--enabled-disk-templates=%s" % constants.DT_PLAIN,
|
|
644 |
"--ipolicy-disk-templates=%s" % constants.DT_PLAIN], False),
|
|
645 |
(["gnt-cluster", "modify",
|
|
646 |
"--drbd-usermode-helper=%s" % drbd_usermode_helper,
|
|
647 |
"--enabled-disk-templates=%s" % constants.DT_DRBD8,
|
|
648 |
"--ipolicy-disk-templates=%s" % constants.DT_DRBD8], False),
|
|
649 |
]:
|
|
619 |
for command, fail in [
|
|
620 |
(["gnt-cluster", "modify", |
|
621 |
"--enabled-disk-templates=%s" % constants.DT_DRBD8, |
|
622 |
"--ipolicy-disk-templates=%s" % constants.DT_DRBD8], False), |
|
623 |
(["gnt-cluster", "modify", |
|
624 |
"--drbd-usermode-helper=%s" % drbd_usermode_helper], False), |
|
625 |
(["gnt-cluster", "modify", |
|
626 |
"--drbd-usermode-helper=%s" % bogus_usermode_helper], True), |
|
627 |
# unsetting helper when DRBD is enabled should not work |
|
628 |
(["gnt-cluster", "modify", |
|
629 |
"--drbd-usermode-helper="], True), |
|
630 |
(["gnt-cluster", "modify", |
|
631 |
"--enabled-disk-templates=%s" % constants.DT_PLAIN, |
|
632 |
"--ipolicy-disk-templates=%s" % constants.DT_PLAIN], False), |
|
633 |
(["gnt-cluster", "modify", |
|
634 |
"--drbd-usermode-helper="], False), |
|
635 |
(["gnt-cluster", "modify", |
|
636 |
"--drbd-usermode-helper=%s" % drbd_usermode_helper], False), |
|
637 |
(["gnt-cluster", "modify", |
|
638 |
"--drbd-usermode-helper=%s" % drbd_usermode_helper, |
|
639 |
"--enabled-disk-templates=%s" % constants.DT_DRBD8, |
|
640 |
"--ipolicy-disk-templates=%s" % constants.DT_DRBD8], False), |
|
641 |
(["gnt-cluster", "modify", |
|
642 |
"--drbd-usermode-helper=", |
|
643 |
"--enabled-disk-templates=%s" % constants.DT_PLAIN, |
|
644 |
"--ipolicy-disk-templates=%s" % constants.DT_PLAIN], False), |
|
645 |
(["gnt-cluster", "modify", |
|
646 |
"--drbd-usermode-helper=%s" % drbd_usermode_helper, |
|
647 |
"--enabled-disk-templates=%s" % constants.DT_DRBD8, |
|
648 |
"--ipolicy-disk-templates=%s" % constants.DT_DRBD8], False), |
|
649 |
]: |
|
650 | 650 |
AssertCommand(command, fail=fail) |
651 | 651 |
_RestoreEnabledDiskTemplates() |
652 | 652 |
|
Also available in: Unified diff