Commit dfcebee3 authored by Klaus Aehlig's avatar Klaus Aehlig

Fix getNodeRole

In the configuration, the master node is now given
by its uuid. Therefore, compare the uuid and not the
name to find out if a given node is the master.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
parent cba1fce1
......@@ -123,7 +123,7 @@ getNodeInstances cfg nname =
-- | Computes the role of a node.
getNodeRole :: ConfigData -> Node -> NodeRole
getNodeRole cfg node
| nodeName node == clusterMasterNode (configCluster cfg) = NRMaster
| nodeUuid node == clusterMasterNode (configCluster cfg) = NRMaster
| nodeMasterCandidate node = NRCandidate
| nodeDrained node = NRDrained
| nodeOffline node = NROffline
......
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