Re: can unicast_peer be the same on all nodes?

Quentin Armitage <[email protected]> Tue, 12 Jun 2018 09:32:53 +0100
Newsgroups gmane.linux.keepalived.devel
Organization The Armitage family
Message-ID <[email protected]>
--===============5858299225042254465==
Content-Type: multipart/alternative; boundary="=-CuoXnMaZaJwnW8KeYSd4"


--=-CuoXnMaZaJwnW8KeYSd4
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

On Mon, 2018-06-11 at 19:01 -0700, Jeffrey Lewis wrote:
> Hello,
> Sorry for the usage question, but the documentation is not clear on
> this point (at least not clear to me).
> 
> Is it ok (in keepalived 1.2.19) for unicast_peer to contain the IP
> addresses of all hosts, including itself?  For example, if NodeA has
> 10.1.2.101 and NodeB has 10.1.2.102, can I put the following into
> keepalived.conf on *both* nodes?
> 
> unicast_peer {
>   10.1.2.101
>   10.1.2.102
> }
> 
> Thanks,
> Jeffrey
> 
> 
That would not be a safe thing to do. A node would be sending adverts
to itself, and I think the behaviour would at best be unpredictable.

It was for situations like this that conditional configuration was
introduced, so that the same configuration file could be used on
multiple systems, so for example one could configure:
unicast_peer {
@^nodeA 10.1.2.101     # All nodes except nodeA
@^nodeB 10.1.2.102
@^nodeC 10.1.2.103
}

@nodeA unicast_src_ip 10.1.2.101     # Node nodeA only
@nodeB unicast_src_ip 10.1.2.102
@nodeC unicast_src_ip 10.1.2.103

Unfortunately this feature was introduced in version 1.3.6.

Quentin Armitage
--=-CuoXnMaZaJwnW8KeYSd4
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit

<html><head></head><body bgcolor="#ffffff" text="#2e3436" link="#2a76c6" vlink="#2e3436"><div>On Mon, 2018-06-11 at 19:01 -0700, Jeffrey Lewis wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>Sorry for the usage question, but the documentation is not clear on this point (at least not clear to me).</div><div><br></div><div>Is it ok (in keepalived 1.2.19) for unicast_peer to contain the IP addresses of all hosts, including itself?&nbsp; For example, if NodeA has 10.1.2.101 and NodeB has 10.1.2.102, can I put the following into keepalived.conf on *both* nodes?</div><div><br></div><div>unicast_peer {</div><div>&nbsp; 10.1.2.101</div><div>&nbsp; 10.1.2.102</div><div>}</div><div><br></div><div>T
 hanks,<br>Jeffrey</div><div><br></div></div>
</blockquote><div>That would not be a safe thing to do. A node would be sending adverts to itself, and I think the behaviour would at best be unpredictable.</div><div><br></div><div>It was for situations like this that conditional configuration was introduced, so that the same configuration file could be used on multiple systems, so for example one could configure:</div><div>unicast_peer {</div><div>@^nodeA 10.1.2.101     # All nodes except nodeA</div><div>@^nodeB 10.1.2.102</div><div>@^nodeC 10.1.2.103</div><div>}</div><div><div><br></div><div>@nodeA unicast_src_ip 10.1.2.101     # Node nodeA only</div><div>@nodeB unicast_src_ip 10.1.2.102</div><div>@nodeC unicast_src_ip 10.1.2.103</div><div><br></div><div>Unfortunately this feature was introduced in version 1.3.6.</div><div><br></div><di
 v>Quentin Armitage</div></div></body></html>
--=-CuoXnMaZaJwnW8KeYSd4--



--===============5858299225042254465==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--===============5858299225042254465==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel

--===============5858299225042254465==--