On Mon, Aug 10, 2009 at 6:58 PM, Luca Bigliardi<[email protected]> wrote:
>
> 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: Luca Bigliardi <[email protected]>
> ---
>  lib/config.py |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/lib/config.py b/lib/config.py
> index 26e38bd..5431560 100644
> --- a/lib/config.py
> +++ b/lib/config.py
> @@ -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]

Should we have a better separator? "," or ":"?
For the rest, LGTM

Thanks!!

Guido

Reply via email to