Commit 35c48839 authored by Michele Tartara's avatar Michele Tartara

Set the default metavg to be equal to the cluster name

The default metavg was always set to be the constant value "xenvg".
This is OK for most cases, but if the cluster is initialized with
a default name through the --vg-name option, the metavg should change
as well.
Signed-off-by: default avatarMichele Tartara <mtartara@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 2474965b
......@@ -529,6 +529,11 @@ def InitCluster(cluster_name, mac_prefix, # pylint: disable=R0913, R0914
utils.CommaJoin(unknown_params)),
errors.ECODE_INVAL)
utils.ForceDictType(dt_params, constants.DISK_DT_TYPES)
if template == constants.DT_DRBD8 and vg_name is not None:
# The default METAVG value is equal to the VG name set at init time,
# if provided
dt_params[constants.DRBD_DEFAULT_METAVG] = vg_name
try:
utils.VerifyDictOptions(diskparams, constants.DISK_DT_DEFAULTS)
except errors.OpPrereqError, err:
......
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