Re: Keepalived erroneously deleting virtual route
Quentin Armitage <[email protected]> Thu, 16 May 2019 09:56:17 +0100
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Organization | The Armitage family |
| Message-ID | <[email protected]> |
--===============7287828859022472328== Content-Type: multipart/alternative; boundary="=-poVV257AqnLbrjaI/Uiw" --=-poVV257AqnLbrjaI/Uiw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Wed, 2019-05-15 at 15:08 -0500, Murat Deligonul wrote: > Hi, > In my Keepalived setup, I have multiple "vrrp_instance" sections in the same configuration file. Each VRRP instance record > also lists "virtual_routes" to be added when it's in the master state. In this particular case, the same virtual route is > defined for two of the VRRP instances (call them A and B). > > I noticed a problem with how Keepalived manages these virtual routes during state transitions. If the daemon is in Master > state for both VRRP Instances A and B, and goes to Backup for only one of the VRRP instances, it then deletes the virtual > route, even though the other VRRP instance still needs it. > > Is this known? I observed this problem with the latest Keepalived release (2.0.16). > > Let me know if you need additional details. > > Thanks, > Murat Keepalived does not attempt to detect the same route configured in multiple vrrp instances. When a vrrp instance transitions from backup to master it will attempt to add all the virtual routes, rules and addresses that are configured for that instance; if they are already configured due to other vrrp instances having the same routes/rules/addresses, an error should be logged since keepalived won't be able to add the route. Similarly, when an instance transitions from master to backup, it will attempt to delete its virtual routes/rules/addresses. Think of it this way: vrrp instances A and B both have route W.X.Y.Z. If instance A is down, it means it doesn't want the route installed, if instance B is up, is does want the route installed. What should happen if A is down and B is up? Fortunately there is a solution. You can specify different priorities for the routes, which means that both routes can be installed at the same time, and they can be added and deleted individually. I hope that helps, Quentin Armitage --=-poVV257AqnLbrjaI/Uiw Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable <html><head></head><body bgcolor=3D"#ffffff" text=3D"#2e3436" link=3D"#2a76= c6" vlink=3D"#2e3436"><div>On Wed, 2019-05-15 at 15:08 -0500, Murat Deligon= ul wrote:</div><blockquote type=3D"cite" style=3D"margin:0 0 0 .8ex; border= -left:2px #729fcf solid;padding-left:1ex"><div dir=3D"ltr">Hi,<div><br><div= >In my Keepalived setup, I have multiple "vrrp_instance" sections in the sa= me configuration file. Each VRRP instance record also lists "virtual_routes= " to be added when it's in the master state. In this particular case, the s= ame virtual route is defined for two of the VRRP instances (call them A and= B).</div><div><br></div><div>I noticed a problem with how Keepalived manag= es these virtual routes during state transitions. If the daemon is in Maste= r state for both VRRP Instances A and B, and goes to Backup for only one of= the VRRP instances, it then deletes the virtual route, even though the oth= er VRRP instance still needs it.</div><div><br></div><div>Is this known? I = observed this problem with the latest Keepalived release (2.0.16).</div><di= v><br></div><div>Let me know if you need additional details.</div><div><br>= </div><div>Thanks,<br>Murat</div></div></div> </blockquote><pre> </pre><div>Keepalived does not attempt to detect the same route config= ured in multiple vrrp instances. When a vrrp instance transitions from back= up to master it will attempt to add all the virtual routes, rules and addre= sses that are configured for that instance; if they are already configured = due to other vrrp instances having the same routes/rules/addresses, an erro= r should be logged since keepalived won't be able to add the route. Similar= ly, when an instance transitions from master to backup, it will attempt to = delete its virtual routes/rules/addresses.</div><div><br></div><div>Think o= f it this way: vrrp instances A and B both have route W.X.Y.Z. If instance = A is down, it means it doesn't want the route installed, if instance B is u= p, is does want the route installed. What should happen if A is down and B = is up?</div><div><br></div><div>Fortunately there is a solution. You can sp= ecify different priorities for the routes, which means that both routes can= be installed at the same time, and they can be added and deleted individua= lly.</div><div><br></div><div>I hope that helps,</div><div><br></div><div>Q= uentin Armitage</div></body></html> --=-poVV257AqnLbrjaI/Uiw-- --===============7287828859022472328== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============7287828859022472328== 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 --===============7287828859022472328==--