Commit e32e1fb9 authored by Bernardo Dal Seno's avatar Bernardo Dal Seno
Browse files

Verify that templates are compatible with exclusive storage

cluster-verify reports instances with disk templates not compatible with
exclusive storage but that are running on nodes with the exclusive storage
flag set.
Signed-off-by: default avatarBernardo Dal Seno <>
Reviewed-by: default avatarMichael Hanselmann <>
parent d5a690cb
......@@ -2688,6 +2688,18 @@ class LUClusterVerifyGroup(LogicalUnit, _VerifyErrors):
if inst_config.disk_template not in constants.DTS_EXCL_STORAGE:
# Disk template not compatible with exclusive_storage: no instance
# node should have the flag set
es_flags = rpc.GetExclusiveStorageForNodeNames(self.cfg,
es_nodes = [n for (n, es) in es_flags.items()
if es]
_ErrorIf(es_nodes, constants.CV_EINSTANCEUNSUITABLENODE, instance,
"instance has template %s, which is not supported on nodes"
" that have exclusive storage set: %s",
inst_config.disk_template, utils.CommaJoin(es_nodes))
if inst_config.disk_template in constants.DTS_INT_MIRROR:
instance_nodes = utils.NiceSort(inst_config.all_nodes)
instance_groups = {}
......@@ -1476,6 +1476,9 @@ CV_EINSTANCESPLITGROUPS = \
"Instance does not meet policy")
"Instance running on nodes that are not suitable for it")
(CV_TNODE, "ENODEDRBD", "Error parsing the DRBD status file")
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