Commit 58385fad authored by Iustin Pop's avatar Iustin Pop
Browse files

verify cluster: check /etc/hosts consistency



If we are told to modify /etc/hosts, then verify its consistency during
cluster verify.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent cf29cfb6
......@@ -1689,6 +1689,7 @@ class LUVerifyCluster(LogicalUnit):
vg_name = self.cfg.GetVGName()
hypervisors = self.cfg.GetClusterInfo().enabled_hypervisors
cluster = self.cfg.GetClusterInfo()
nodelist = utils.NiceSort(self.cfg.GetNodeList())
nodeinfo = [self.cfg.GetNodeInfo(nname) for nname in nodelist]
instancelist = utils.NiceSort(self.cfg.GetInstanceList())
......@@ -1707,6 +1708,8 @@ class LUVerifyCluster(LogicalUnit):
file_names = ssconf.SimpleStore().GetFileList()
file_names.extend(constants.ALL_CERT_FILES)
file_names.extend(master_files)
if cluster.modify_etc_hosts:
file_names.append(constants.ETC_HOSTS)
local_checksums = utils.FingerprintFiles(file_names)
......@@ -1770,7 +1773,6 @@ class LUVerifyCluster(LogicalUnit):
self.cfg.GetClusterName())
nvinfo_endtime = time.time()
cluster = self.cfg.GetClusterInfo()
master_node = self.cfg.GetMasterNode()
all_drbd_map = self.cfg.ComputeDRBDMap()
......
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