Re: Multiple VRRP instances with 1.2.17
David Stapleton <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <CACLi3Jr8fyhKxb7t8wCRioopuyfGOvCXUQS=KCvtehscv_vvDw@mail.gmail.com> |
The engineer who made the code change that causes this regression took a look at this today. Unfortunately he was unable to establish why this was having the undesired effect, so for the time being Alexandre, please revert this patch. We will continue looking at this and we hope we'll be able to fix it soon before the next release. On 18 June 2015 at 08:46, <[email protected]> wrote: > Send Keepalived-devel mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/keepalived-devel > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Keepalived-devel digest..." > > > Today's Topics: > > 1. Re: Keepalived-devel Digest, Vol 107, Issue 2 (Ryan O'Hara) > 2. Problem with notify script (Ryan O'Hara) > 3. Re: Problem with notify script (Alexandre Cassen) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 17 Jun 2015 16:36:22 -0500 > From: "Ryan O'Hara" <[email protected]> > Subject: Re: [Keepalived-devel] Keepalived-devel Digest, Vol 107, > Issue 2 > To: David Stapleton <[email protected]> > Cc: [email protected] > Message-ID: <[email protected]> > Content-Type: text/plain; charset=us-ascii > > On Wed, Jun 17, 2015 at 08:13:02PM +0100, David Stapleton wrote: > > Hi Ryan, > > > > I am also seeing this issue. I work with the person who's commit you > > suspect is the root cause (mlittlej-brcd) so I will speak to him about > this > > tomorrow. Also, the person who signed off on the commit (cdochert) will > be > > off work for a while, so please feel free to CC Anthony ( > > [email protected]) and myself ([email protected]) on any other > issues > > regarding keepalived. > > > > In the meantime, there seems to be two workarounds to this problem. 1) > > Instead of setting each instance's initial state to master, when you set > > them to backup the issue is not observed. 2) If you add one instance at a > > time to the config and then do a reload, the issue doesn't seem to > happen. > > Of course, this isn't very practical, especially if you want to configure > > multiple groups on the one interface. > > > > Once again, I'll have a chat with mlittlej tomorrow and will let you know > > what he says. > > Thanks. After quite a bit of testing, I ultimately reverted this patch > and rebuilt the Fedora packages. This bug was fairly critical for > upstream OpenStack, which is how we discovered the problem. I needed > to get this fixed ASAP, thus the revert of the patch. > > That said, a fix before the next upstream release would be > excellent. I tinkered with the code for a while before I had to set it > aside. > > Ryan > > > > > Thanks, > > David > > > > On 17 June 2015 at 17:39, < > [email protected]> > > wrote: > > > > > Send Keepalived-devel mailing list submissions to > > > [email protected] > > > > > > To subscribe or unsubscribe via the World Wide Web, visit > > > https://lists.sourceforge.net/lists/listinfo/keepalived-devel > > > or, via email, send a message with subject or body 'help' to > > > [email protected] > > > > > > You can reach the person managing the list at > > > [email protected] > > > > > > When replying, please edit your Subject line so it is more specific > > > than "Re: Contents of Keepalived-devel digest..." > > > > > > > > > Today's Topics: > > > > > > 1. [acassen/keepalived] d80c17: Fix vrrp removes incorrect IPv4 > > > address when VIPs ... (Alexandre Cassen) > > > 2. Multiple VRRP instances with 1.2.17 (Ryan O'Hara) > > > 3. Re: Multiple VRRP instances with 1.2.17 (Ryan O'Hara) > > > 4. Re: Multiple VRRP instances with 1.2.17 (Ryan O'Hara) > > > 5. Re: Multiple VRRP instances with 1.2.17 (Alexandre Cassen) > > > > > > > > > ---------------------------------------------------------------------- > > > > > > Message: 1 > > > Date: Tue, 16 Jun 2015 03:00:37 -0700 > > > From: Alexandre Cassen <[email protected]> > > > Subject: [Keepalived-devel] [acassen/keepalived] d80c17: Fix vrrp > > > removes incorrect IPv4 address when VIPs ... > > > To: [email protected] > > > Message-ID: > > > > > > > <557ff3c5d85cb_6ec3fea9710d29c1002b0@hookshot-fe5-cp1-prd.iad.github.net.mail > > > > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > Branch: refs/heads/master > > > Home: https://github.com/acassen/keepalived > > > Commit: d80c171e7e8fe7fb4e0878a15027ac80c23b0a14 > > > > > > > https://github.com/acassen/keepalived/commit/d80c171e7e8fe7fb4e0878a15027ac80c23b0a14 > > > Author: David Stapleton <[email protected]> > > > Date: 2015-06-15 (Mon, 15 Jun 2015) > > > > > > Changed paths: > > > M keepalived/vrrp/vrrp_ipaddress.c > > > > > > Log Message: > > > ----------- > > > Fix vrrp removes incorrect IPv4 address when VIPs are removed > > > > > > When vrrp has an IPv4 VIP that matches the primary interface > > > address, when the VIP is removed from the interface, the original > > > address ends up getting removed instead of the VIP. > > > > > > The kernel receives a netlink message instructing it to remove > > > address x from a particular interface. For IPv4, address x can > > > be configured multiple times providing the prefix lengths differ. > > > If the IFA_ADDRESS attribute is not specified in a RTM_DELADDR > > > message, the kernel will delete the first address it finds a > > > match on, prefix length is not taken into account. > > > > > > This fix therefore adds the IFA_ADDRESS attribute when deleting > > > IPv4 addresses so that the address removed is actually the VIP. > > > > > > > > > Commit: e104ba5b5b576eb624db69605ab0ecfacbf45857 > > > > > > > https://github.com/acassen/keepalived/commit/e104ba5b5b576eb624db69605ab0ecfacbf45857 > > > Author: Alexandre Cassen <[email protected]> > > > Date: 2015-06-16 (Tue, 16 Jun 2015) > > > > > > Changed paths: > > > M keepalived/vrrp/vrrp_ipaddress.c > > > > > > Log Message: > > > ----------- > > > Merge pull request #155 from DStape/fix-vrrp-removes-primary-addr > > > > > > Fix vrrp removes incorrect IPv4 address when VIPs are removed > > > > > > > > > Compare: > > > > https://github.com/acassen/keepalived/compare/18ee593dac25...e104ba5b5b57 > > > > > > ------------------------------ > > > > > > Message: 2 > > > Date: Tue, 16 Jun 2015 14:15:21 -0500 > > > From: "Ryan O'Hara" <[email protected]> > > > Subject: [Keepalived-devel] Multiple VRRP instances with 1.2.17 > > > To: [email protected] > > > Message-ID: <[email protected]> > > > Content-Type: text/plain; charset=us-ascii > > > > > > > > > I was informed today about a problem with keepalived 1.2.17 when using > > > multiple VRRP instances [1]. Consider the following keepalived.conf: > > > > > > vrrp_instance VRRP_51 { > > > virtual_router_id 51 > > > advert_int 1 > > > priority 101 > > > state MASTER > > > interface eth0 > > > > > > virtual_ipaddress { > > > 192.168.1.1 > > > } > > > } > > > > > > vrrp_instance VRRP_52 { > > > virtual_router_id 52 > > > advert_int 1 > > > priority 101 > > > state MASTER > > > interface eth0 > > > > > > virtual_ipaddress { > > > 192.168.1.2 > > > } > > > } > > > > > > Note that both instances use the same interface but have unique VRIDs > > > and VIPs. This works in 1.2.16 and earlier, but in 1.2.17 only the > > > first VIP is added to the interface. There are no other nodes running > > > keepalived. > > > > > > Any ideas on what changed? I've been digging through the code for a > > > while now and have no found the change that caused this > > > regression. Both instances get parsed correct as evidence of the > > > configuration dump (-d option). > > > > > > Ryan > > > > > > [1] https://bugzilla.redhat.com/show_bug.cgi?id=1232408 > > > > > > > > > > > > > > > ------------------------------ > > > > > > Message: 3 > > > Date: Tue, 16 Jun 2015 14:21:12 -0500 > > > From: "Ryan O'Hara" <[email protected]> > > > Subject: Re: [Keepalived-devel] Multiple VRRP instances with 1.2.17 > > > To: [email protected] > > > Message-ID: <[email protected]> > > > Content-Type: text/plain; charset=us-ascii > > > > > > On Tue, Jun 16, 2015 at 02:15:21PM -0500, Ryan O'Hara wrote: > > > > > > > > I was informed today about a problem with keepalived 1.2.17 when > using > > > > multiple VRRP instances [1]. Consider the following keepalived.conf: > > > > > > > > vrrp_instance VRRP_51 { > > > > virtual_router_id 51 > > > > advert_int 1 > > > > priority 101 > > > > state MASTER > > > > interface eth0 > > > > > > > > virtual_ipaddress { > > > > 192.168.1.1 > > > > } > > > > } > > > > > > > > vrrp_instance VRRP_52 { > > > > virtual_router_id 52 > > > > advert_int 1 > > > > priority 101 > > > > state MASTER > > > > interface eth0 > > > > > > > > virtual_ipaddress { > > > > 192.168.1.2 > > > > } > > > > } > > > > > > > > Note that both instances use the same interface but have unique VRIDs > > > > and VIPs. This works in 1.2.16 and earlier, but in 1.2.17 only the > > > > first VIP is added to the interface. There are no other nodes running > > > > keepalived. > > > > > > Sorry, I was mistaken. Only the second VIP (192.168.1.2) is added to > > > the interface: > > > > > > VRRP_Instance(VRRP_52) Transition to MASTER STATE > > > VRRP_Instance(VRRP_52) Entering MASTER STATE > > > VRRP_Instance(VRRP_52) setting protocol VIPs. > > > VRRP_Instance(VRRP_52) Sending gratuitous ARPs on eth0 for 192.168.1.2 > > > > > > There is nothing at all in the logs about VRRP instance "VRRP_51". > > > > > > Ryan > > > > > > > > > > Any ideas on what changed? I've been digging through the code for a > > > > while now and have no found the change that caused this > > > > regression. Both instances get parsed correct as evidence of the > > > > configuration dump (-d option). > > > > > > > > Ryan > > > > > > > > [1] https://bugzilla.redhat.com/show_bug.cgi?id=1232408 > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > > > > Keepalived-devel mailing list > > > > [email protected] > > > > https://lists.sourceforge.net/lists/listinfo/keepalived-devel > > > > > > > > > > > > ------------------------------ > > > > > > Message: 4 > > > Date: Wed, 17 Jun 2015 11:03:44 -0500 > > > From: "Ryan O'Hara" <[email protected]> > > > Subject: Re: [Keepalived-devel] Multiple VRRP instances with 1.2.17 > > > To: [email protected] > > > Cc: [email protected] > > > Message-ID: <[email protected]> > > > Content-Type: text/plain; charset=us-ascii > > > > > > On Tue, Jun 16, 2015 at 02:21:12PM -0500, Ryan O'Hara wrote: > > > > On Tue, Jun 16, 2015 at 02:15:21PM -0500, Ryan O'Hara wrote: > > > > > > > > > > I was informed today about a problem with keepalived 1.2.17 when > using > > > > > multiple VRRP instances [1]. Consider the following > keepalived.conf: > > > > > > > > > > vrrp_instance VRRP_51 { > > > > > virtual_router_id 51 > > > > > advert_int 1 > > > > > priority 101 > > > > > state MASTER > > > > > interface eth0 > > > > > > > > > > virtual_ipaddress { > > > > > 192.168.1.1 > > > > > } > > > > > } > > > > > > > > > > vrrp_instance VRRP_52 { > > > > > virtual_router_id 52 > > > > > advert_int 1 > > > > > priority 101 > > > > > state MASTER > > > > > interface eth0 > > > > > > > > > > virtual_ipaddress { > > > > > 192.168.1.2 > > > > > } > > > > > } > > > > > > > > > > Note that both instances use the same interface but have unique > VRIDs > > > > > and VIPs. This works in 1.2.16 and earlier, but in 1.2.17 only the > > > > > first VIP is added to the interface. There are no other nodes > running > > > > > keepalived. > > > > > > > > Sorry, I was mistaken. Only the second VIP (192.168.1.2) is added to > > > > the interface: > > > > > > > > VRRP_Instance(VRRP_52) Transition to MASTER STATE > > > > VRRP_Instance(VRRP_52) Entering MASTER STATE > > > > VRRP_Instance(VRRP_52) setting protocol VIPs. > > > > VRRP_Instance(VRRP_52) Sending gratuitous ARPs on eth0 for > 192.168.1.2 > > > > > > > > There is nothing at all in the logs about VRRP instance "VRRP_51". > > > > > > I found the commit that causes this regression. > > > > > > > > > > https://github.com/acassen/keepalived/commit/76f9ce36ae389983b48a83a933182739786908c9 > > > > > > Specifically the changes to vrrp_init_instance_sands in > > > vrrp_sync.c. Reverting the code in this function fixes the problems, > > > but I'm not yet sure why. > > > > > > Ryan > > > > > > > > Any ideas on what changed? I've been digging through the code for a > > > > > while now and have no found the change that caused this > > > > > regression. Both instances get parsed correct as evidence of the > > > > > configuration dump (-d option). > > > > > > > > > > Ryan > > > > > > > > > > [1] https://bugzilla.redhat.com/show_bug.cgi?id=1232408 > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > > _______________________________________________ > > > > > Keepalived-devel mailing list > > > > > [email protected] > > > > > https://lists.sourceforge.net/lists/listinfo/keepalived-devel > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > > > > Keepalived-devel mailing list > > > > [email protected] > > > > https://lists.sourceforge.net/lists/listinfo/keepalived-devel > > > > > > > > > > > > ------------------------------ > > > > > > Message: 5 > > > Date: Wed, 17 Jun 2015 18:39:35 +0200 > > > From: Alexandre Cassen <[email protected]> > > > Subject: Re: [Keepalived-devel] Multiple VRRP instances with 1.2.17 > > > To: "Ryan O'Hara" <[email protected]> > > > Cc: [email protected], "[email protected]" > > > <[email protected]> > > > Message-ID: > > > <CAONz4a2Txxa= > > > [email protected]> > > > Content-Type: text/plain; charset="utf-8" > > > > > > Agreed, this patch need to be reverted... but your runing different > VRID > > > which is not related to preempt... will have a look at that... thanks > for > > > reporting... > > > > > > regs, > > > Alexandre > > > > > > On Wed, Jun 17, 2015 at 6:03 PM, Ryan O'Hara <[email protected]> > wrote: > > > > > > > On Tue, Jun 16, 2015 at 02:21:12PM -0500, Ryan O'Hara wrote: > > > > > On Tue, Jun 16, 2015 at 02:15:21PM -0500, Ryan O'Hara wrote: > > > > > > > > > > > > I was informed today about a problem with keepalived 1.2.17 when > > > using > > > > > > multiple VRRP instances [1]. Consider the following > keepalived.conf: > > > > > > > > > > > > vrrp_instance VRRP_51 { > > > > > > virtual_router_id 51 > > > > > > advert_int 1 > > > > > > priority 101 > > > > > > state MASTER > > > > > > interface eth0 > > > > > > > > > > > > virtual_ipaddress { > > > > > > 192.168.1.1 > > > > > > } > > > > > > } > > > > > > > > > > > > vrrp_instance VRRP_52 { > > > > > > virtual_router_id 52 > > > > > > advert_int 1 > > > > > > priority 101 > > > > > > state MASTER > > > > > > interface eth0 > > > > > > > > > > > > virtual_ipaddress { > > > > > > 192.168.1.2 > > > > > > } > > > > > > } > > > > > > > > > > > > Note that both instances use the same interface but have unique > VRIDs > > > > > > and VIPs. This works in 1.2.16 and earlier, but in 1.2.17 only > the > > > > > > first VIP is added to the interface. There are no other nodes > running > > > > > > keepalived. > > > > > > > > > > Sorry, I was mistaken. Only the second VIP (192.168.1.2) is added > to > > > > > the interface: > > > > > > > > > > VRRP_Instance(VRRP_52) Transition to MASTER STATE > > > > > VRRP_Instance(VRRP_52) Entering MASTER STATE > > > > > VRRP_Instance(VRRP_52) setting protocol VIPs. > > > > > VRRP_Instance(VRRP_52) Sending gratuitous ARPs on eth0 for > 192.168.1.2 > > > > > > > > > > There is nothing at all in the logs about VRRP instance "VRRP_51". > > > > > > > > I found the commit that causes this regression. > > > > > > > > > > > > > > > > https://github.com/acassen/keepalived/commit/76f9ce36ae389983b48a83a933182739786908c9 > > > > > > > > Specifically the changes to vrrp_init_instance_sands in > > > > vrrp_sync.c. Reverting the code in this function fixes the problems, > > > > but I'm not yet sure why. > > > > > > > > Ryan > > > > > > > > > > Any ideas on what changed? I've been digging through the code > for a > > > > > > while now and have no found the change that caused this > > > > > > regression. Both instances get parsed correct as evidence of the > > > > > > configuration dump (-d option). > > > > > > > > > > > > Ryan > > > > > > > > > > > > [1] https://bugzilla.redhat.com/show_bug.cgi?id=1232408 > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > > > _______________________________________________ > > > > > > Keepalived-devel mailing list > > > > > > [email protected] > > > > > > https://lists.sourceforge.net/lists/listinfo/keepalived-devel > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > > _______________________________________________ > > > > > Keepalived-devel mailing list > > > > > [email protected] > > > > > https://lists.sourceforge.net/lists/listinfo/keepalived-devel > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > > > > Keepalived-devel mailing list > > > > [email protected] > > > > https://lists.sourceforge.net/lists/listinfo/keepalived-devel > > > > > > > -------------- next part -------------- > > > An HTML attachment was scrubbed... > > > > > > ------------------------------ > > > > > > > > > > ------------------------------------------------------------------------------ > > > > > > > > > ------------------------------ > > > > > > _______________________________________________ > > > Keepalived-devel mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/keepalived-devel > > > > > > > > > End of Keepalived-devel Digest, Vol 107, Issue 2 > > > ************************************************ > > > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > > Keepalived-devel mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/keepalived-devel > > > > > ------------------------------ > > Message: 2 > Date: Wed, 17 Jun 2015 20:35:45 -0500 > From: "Ryan O'Hara" <[email protected]> > Subject: [Keepalived-devel] Problem with notify script > To: [email protected] > Cc: [email protected] > Message-ID: <[email protected]> > Content-Type: text/plain; charset=us-ascii > > > A problem with the notify script in version 1.2.17 was reported to me > and I verified the issue this evening. In short, the notify script is > not being executed. The other notification script (notify_master, > notify_backup, notify_fault) seem to work just fine. > > While testing this, I had two VRRP instances defined in > keepalived.conf. I noticed that if I had a notify script defined, the > second VRRP instance was not being parsed, so I looked at changes to > vrrp_parser.c. It seems that this patch [1]is causing the problem. > > The reporter of this bug also opened an issue on github, which can be > found here [2]. > > I'm considering reverting this patch, but a git revert of this commit > is not clean so it may take a bit of work. > > Ryan > > [1] > https://github.com/acassen/keepalived/commit/5c4177381bee24f9f7fbe33b8dc20c2d9cc2bccb > [2] https://github.com/acassen/keepalived/issues/156 > > > > ------------------------------ > > Message: 3 > Date: Thu, 18 Jun 2015 09:46:04 +0200 > From: Alexandre Cassen <[email protected]> > Subject: Re: [Keepalived-devel] Problem with notify script > To: "Ryan O'Hara" <[email protected]> > Cc: Sameer Agrawal <[email protected]>, > "[email protected]" > <[email protected]> > Message-ID: > <CAONz4a3khNNYVPo5Td+=6yDYCtVV62ocDF-Eag= > [email protected]> > Content-Type: text/plain; charset="utf-8" > > configuration should be updated with brack block as follow : > > notify { > /usr/local/bin/notify_vrrp.sh > } > > but I am considering reverting that patch since it is breaking compat > > regs, > Alexandre > > On Thu, Jun 18, 2015 at 3:35 AM, Ryan O'Hara <[email protected]> wrote: > > > > > A problem with the notify script in version 1.2.17 was reported to me > > and I verified the issue this evening. In short, the notify script is > > not being executed. The other notification script (notify_master, > > notify_backup, notify_fault) seem to work just fine. > > > > While testing this, I had two VRRP instances defined in > > keepalived.conf. I noticed that if I had a notify script defined, the > > second VRRP instance was not being parsed, so I looked at changes to > > vrrp_parser.c. It seems that this patch [1]is causing the problem. > > > > The reporter of this bug also opened an issue on github, which can be > > found here [2]. > > > > I'm considering reverting this patch, but a git revert of this commit > > is not clean so it may take a bit of work. > > > > Ryan > > > > [1] > > > https://github.com/acassen/keepalived/commit/5c4177381bee24f9f7fbe33b8dc20c2d9cc2bccb > > [2] https://github.com/acassen/keepalived/issues/156 > > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Keepalived-devel mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/keepalived-devel > > > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > > ------------------------------------------------------------------------------ > > > ------------------------------ > > _______________________________________________ > Keepalived-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/keepalived-devel > > > End of Keepalived-devel Digest, Vol 107, Issue 5 > ************************************************ > ------------------------------------------------------------------------------ _______________________________________________ Keepalived-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/keepalived-devel