This assures that the consistency of the options '--drbd-usermode-helper' and '--enabled-disk-templates' of 'gnt-cluster modify' is checked correctly. Also, this makes the drbd usermode helper configurable in the QA config.
Signed-off-by: Helga Velroyen <[email protected]> --- qa/qa-sample.json | 2 ++ qa/qa_cluster.py | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/qa/qa-sample.json b/qa/qa-sample.json index 8f0a80a..0264a07 100644 --- a/qa/qa-sample.json +++ b/qa/qa-sample.json @@ -25,6 +25,8 @@ "primary_ip_version": 4, "# Name of the LVM group for the cluster": null, "vg-name": "xenvg", + "# The DRBD usermode helper": null, + "drbd-usermode-helper": "/bin/true", "# Cluster-level value of the exclusive-storage flag": null, "exclusive-storage": null, diff --git a/qa/qa_cluster.py b/qa/qa_cluster.py index 33e90de..d72a276 100644 --- a/qa/qa_cluster.py +++ b/qa/qa_cluster.py @@ -471,6 +471,27 @@ def _TestClusterModifyDiskTemplatesArguments(default_disk_template, "--enabled-disk-templates=%s" % ",".join(enabled_disk_templates)], fail=False) + # interaction with --drbd-usermode-helper option + drbd_usermode_helper = qa_config.get("drbd-usermode-helper", None) + if not drbd_usermode_helper: + drbd_usermode_helper = "/bin/true" + # specifying a helper when drbd gets disabled + AssertCommand(["gnt-cluster", "modify", + "--drbd-usermode-helper=%s" % drbd_usermode_helper, + "--enabled-disk-templates=%s" % constants.DT_DISKLESS], + fail=True) + # no checks when no change of enabled disk templates + AssertCommand(["gnt-cluster", "modify", + "--drbd-usermode-helper=%s" % drbd_usermode_helper], + fail=False) + if constants.DT_DRBD8 in enabled_disk_templates: + # specifying a vg name when lvm is enabled + AssertCommand(["gnt-cluster", "modify", + "--drbd-usermode-helper=%s" % drbd_usermode_helper, + "--enabled-disk-templates=%s" % + ",".join(enabled_disk_templates)], + fail=False) + def _TestClusterModifyUsedDiskTemplate(instance_template, enabled_disk_templates): -- 1.8.1.3
