Commit 5909fb97 authored by Luca Bigliardi's avatar Luca Bigliardi
Browse files

Map Node/IP in ssconf IP lists



Map the node hostname with its primary/secondary ganeti IP in ssconf.
In this way a node can discover which are its IPs simply grepping ssconf files,
thus avoiding checks depending on network configuration.
Signed-off-by: default avatarLuca Bigliardi <shammash@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 9164cec9
......@@ -1148,8 +1148,10 @@ class ConfigWriter:
instance_names = utils.NiceSort(self._UnlockedGetInstanceList())
node_names = utils.NiceSort(self._UnlockedGetNodeList())
node_info = [self._UnlockedGetNodeInfo(name) for name in node_names]
node_pri_ips = [ninfo.primary_ip for ninfo in node_info]
node_snd_ips = [ninfo.secondary_ip for ninfo in node_info]
node_pri_ips = ["%s,%s" % (ninfo.name, ninfo.primary_ip)
for ninfo in node_info]
node_snd_ips = ["%s,%s" % (ninfo.name, ninfo.secondary_ip)
for ninfo in node_info]
instance_data = fn(instance_names)
off_data = fn(node.name for node in node_info if node.offline)
......
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