Commit 2f10179b authored by Adeodato Simo's avatar Adeodato Simo Committed by Guido Trotter
Browse files

Cluster verify: master must be present for _VerifyFiles



This commit prepares the call to _VerifyFiles for the case when the master
node is not one of the nodes that's being verified (which will be the case
for all node groups but one). We fix it by always passing master info and
checksums to _VerifyFiles, which ensures there's a cluster-wide consistency
check.
Signed-off-by: default avatarAdeodato Simo <dato@google.com>
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent cf692cd0
......@@ -2414,8 +2414,24 @@ class LUClusterVerify(LogicalUnit):
self.my_inst_info)
feedback_fn("* Verifying configuration file consistency")
self._VerifyFiles(_ErrorIf, self.my_node_info.values(), master_node,
all_nvinfo, filemap)
if master_node not in self.my_node_info:
# _VerifyFiles requires that master_node is present in the passed node
# info, to use it as a point of reference even if we're verifying only a
# subset of nodes. Make it so.
vf_nvinfo = all_nvinfo.copy()
vf_node_info = (self.my_node_info.values() +
[self.all_node_info[master_node]])
key = constants.NV_FILELIST
vf_nvinfo.update(self.rpc.call_node_verify([master_node],
{key: node_verify_param[key]},
self.cfg.GetClusterName()))
else:
vf_nvinfo = all_nvinfo
vf_node_info = self.my_node_info.values()
self._VerifyFiles(_ErrorIf, vf_node_info, master_node, vf_nvinfo, filemap)
feedback_fn("* Verifying node status")
......
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