Commit 51807ab5 authored by Dimitris Bliablias's avatar Dimitris Bliablias Committed by Petr Pudlak

QA: add support for 'rbd' and 'gluster' instances

This patch provides support for the missing 'rbd' and 'gluster' disk
templates. It also makes configurable the gluster and shared file
storage directories at the cluster level, i.e., 'gnt-cluster init'
command.
Signed-off-by: default avatarDimitris Bliablias <bl.dimitris@gmail.com>
Signed-off-by: default avatarPetr Pudlak <pudlak@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent 68ed58a7
......@@ -54,6 +54,7 @@
"# Default file storage directories": null,
"default-file-storage-dir": "/srv/ganeti/file-storage",
"default-shared-file-storage-dir": "/srv/ganeti/shared-file-storage",
"default-gluster-storage-dir": "/srv/ganeti/gluster-file-storage",
"# Additional arguments for initializing cluster": null,
"cluster-init-args": [],
......@@ -224,6 +225,8 @@
"instance-add-shared-file": true,
"instance-add-drbd-disk": true,
"instance-add-diskless": true,
"instance-add-rbd": true,
"instance-add-gluster": true,
"instance-add-restricted-by-disktemplates": true,
"instance-convert-disk": true,
"instance-plain-rapi-common-tests": true,
......
......@@ -224,6 +224,16 @@ def TestClusterInit(rapi_user, rapi_secret):
"--file-storage-dir=%s" %
qa_config.get("default-file-storage-dir",
pathutils.DEFAULT_FILE_STORAGE_DIR))
if constants.DT_SHARED_FILE in enabled_disk_templates:
cmd.append(
"--shared-file-storage-dir=%s" %
qa_config.get("default-shared-file-storage-dir",
pathutils.DEFAULT_SHARED_FILE_STORAGE_DIR))
if constants.DT_GLUSTER in enabled_disk_templates:
cmd.append(
"--gluster-storage-dir=%s" %
qa_config.get("default-gluster-storage-dir",
pathutils.DEFAULT_GLUSTER_STORAGE_DIR))
for spec_type in ("mem-size", "disk-size", "disk-count", "cpu-count",
"nic-count"):
......
......@@ -314,6 +314,22 @@ def TestInstanceAddDiskless(nodes):
return CreateInstanceByDiskTemplateOneNode(nodes, constants.DT_DISKLESS)
@InstanceCheck(None, INST_UP, RETURN_VALUE)
def TestInstanceAddRADOSBlockDevice(nodes):
"""gnt-instance add -t rbd"""
assert len(nodes) == 1
if constants.DT_RBD in qa_config.GetEnabledDiskTemplates():
return CreateInstanceByDiskTemplateOneNode(nodes, constants.DT_RBD)
@InstanceCheck(None, INST_UP, RETURN_VALUE)
def TestInstanceAddGluster(nodes):
"""gnt-instance add -t gluster"""
assert len(nodes) == 1
if constants.DT_GLUSTER in qa_config.GetEnabledDiskTemplates():
return CreateInstanceByDiskTemplateOneNode(nodes, constants.DT_GLUSTER)
@InstanceCheck(None, INST_DOWN, FIRST_ARG)
def TestInstanceRemove(instance):
"""gnt-instance remove"""
......@@ -1474,4 +1490,8 @@ available_instance_tests = [
TestInstanceAddFile, 1),
("instance-add-shared-file", constants.DT_SHARED_FILE,
TestInstanceAddSharedFile, 1),
("instance-add-rbd", constants.DT_RBD,
TestInstanceAddRADOSBlockDevice, 1),
("instance-add-gluster", constants.DT_GLUSTER,
TestInstanceAddGluster, 1),
]
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