Re: VRRP behavior on network restart

Quentin Armitage <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Organization The Armitage family
Message-ID <[email protected]>
On Thu, 2016-05-05 at 05:31 +0000, Amir Dafny-Man wrote:

> Hi,
> 
> I am using Keepalived on RHEL6, using Redhat's latest version (1.2.13).
> I noticed that after the network is restarted (service network restart), multiple errors appear in the log:
> May  2 12:55:30 sdclab006-09 Keepalived_vrrp[14885]: Netlink: filter function error
> After that Keepalived does not bring the VIP up anymore.
> I have seen in an old email from this list that Keepalived does not handle well interfaces taken down and a configuration reload (kill -HUP) is required to correct this situation.
> 
> >From 1.2.20 changelog:
> * vrrp: Dynamic addition of interfaces from netlink msg.
>   When a tracked interface is deleted then recreated with the same config
>   VRRP groups tracking this interface will remain down. This is due to
>   tracking of stale information.
>   This patch listens for netlink messages for the creation of interfaces
>   and does one of two things.
>   i) If the interface doesn't exist in the vrrp interface list a new
>   interface structure is created and the information from the message is
>   used to fill the structure. This new interface is then added to the
>   interface queue.
>   ii) If the interface already exists in the queue we zero it and then
>   use the information in the message to fill the structure.
> 
> Does this change the behavior experienced above or do I still need to reload configuration after network restart?
> 

It looks as though it is still necessary to reload the configuration
after a network restart, or even just an interface being deleted and
recreated. I have a development system with a USB wireless interface and
if I disconnect the interface and then reconnect it, keepalived does not
recover without a configuration reload. Although using wireless USB
isn't likely to be used in a real environment, a hot-swappable NIC might
be.

Although the patch referred to above enables keepalived to track the
creation of new interfaces (it doesn't seem to track the deletion of
interfaces), what appears to be missing is the closing of sockets opened
on the deleted interfaces, and opening sockets on re-created interfaces.

I'll have a look and see if I can sort out the closing and reopening of
sockets when interfaces disappear and reappear. It will also be
necessary to recreate any vmacs that are configured on the physical
interface.

Preliminary testing appears to show that there are a plethora of
RTM_NEWLINK netlink messages sent after the recreation of a wireless
interface, including an RTM_NEWLINK message for wlan0, when it is wlan1
being created, so it looks as though it won't be trivial to sort out
what is going on.

I hope that helps, and I'll send you an update if I get something
working.

Quentin Armitage

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j

_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.