Re: Keepalive holddown timer vs interval?
Quentin Armitage <[email protected]> Mon, 19 Jul 2021 18:14:49 +0100
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============4187187888112583002== Content-Type: multipart/alternative; boundary="=-ou5ouzhBfqUCL8WbxS9W" --=-ou5ouzhBfqUCL8WbxS9W Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit On Mon, 2021-07-19 at 15:51 +0000, Jeremy Guthrie wrote: > We are seeing an issue where a single second disconnect or packet loss appears > to cause keepalived to go into fault and die. We'd like to actually run with > an 'advert_int' of 2 seconds with a '10 second hold down timer' meaning we > have to lose five(5) hellos instead. Is there a way to do that? Right now > it appears that we have only to lose a single hello and VRRP wants to fail > over which is too fragile. We are trying to find the configs to allow for > that. > > Any thoughts? Jeremy, This is a very old list that you have sent this message to. The current list is [email protected] . You don't say which version of keepalived you are using; generally newer versions are more reliable than older versions. The current version is v2.2.2. > We are seeing an issue where a single second disconnect or packet loss appears > to cause keepalived to go into fault and die. What is happening here depends on what you are doing. If the network cable is disconnected from an interface that is being used by keepalived (or indeed if the interface is downed by command - e.g. ip link set XXX down), then any VRRP instance tracking that interface will go to fault state until the interface comes back up again. Once the interface comes back up, the VRRP instance will go to BACKUP state, and then if it is the highest priority instance and nopreempt is not set, then after three advert intervals plus a bit (I'll explain later) it will take over as master. I am not sure what you mean by "die". Does the VRRP instance remain in fault state after the interface is restored? > We'd like to actually run with an 'advert_int' of 2 seconds with a '10 second > hold down timer' meaning we have to lose five(5) hellos instead. Is there a > way to do that? The simple answer is NO. The VRRP RFCs are specific about how long a backup will wait before it takes over as master. For VRRPv3 this is 3 * advert_int + (256 - priority) / 256 * advert_int. For VRRPv2 it is 3 * advert_int + (256 - priority) / 256. So the timeout is always somewhere between 3 and 4 advert intervals, and the higher the priority of the VRRP instance the closer the timeout is to 3 advert intervals. Since the RFCs are explicit about the calculation of 3 * advert_int plus a bit, the 3 * is hard coded, and not configurable. Technically the 3 * could be replaced with a configurable parameter, but then you would not be running VRRP! > Right now it appears that we have only to lose a single hello and VRRP > wants to fail over which is too fragile. This is not the case. An interface going down will cause an immediate transition to fault state, but the loss of a single advert will NOT cause a backup vrrp to take over as master. > We are trying to find the configs to allow for that. > There are none since keepalived does not support anything other than 3 * advert_int + a bit, and always immediately transitions to FAULT state if the interface it is using goes down. If you could give more details about what is happening in respect of "single second disconnect or packet loss" and also "go into fault and die" then we might be able to make some more concrete suggestions. I hope this helps, Quentin Armitage --=-ou5ouzhBfqUCL8WbxS9W Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable <html><head> </head> <body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; line-break:= after-white-space;" class=3D""><div>On Mon, 2021-07-19 at 15:51 +0000, Jer= emy Guthrie wrote:</div><blockquote type=3D"cite" style=3D"margin:0 0 0 .8e= x; border-left:2px #729fcf solid;padding-left:1ex"><div class=3D"">We are s= eeing an issue where a single second disconnect or packet loss appears to c= ause keepalived to go into fault and die. We'd like to actually run w= ith an 'advert_int' of 2 seconds with a '10 second hold down timer' meaning= we have to lose five(5) hellos instead. Is there a way to do that? &= nbsp; Right now it appears that we have only to lose a single hello and VRR= P wants to fail over which is too fragile. We are trying to find the = configs to allow for that.</div><div class=3D""><br class=3D""></div><div c= lass=3D"">Any thoughts?</div></blockquote><div><br></div><div>Jeremy,</div>= <div><br></div><div>This is a very old list that you have sent this message= to. The current list is <a href=3D"mailto:[email protected]"= title=3D"Click to mail [email protected]" style=3D"white-space: n= owrap;">[email protected]</a> .</div><div><br></div><div>You = don't say which version of keepalived you are using; generally newer versio= ns are more reliable than older versions. The current version is v2.2.2.</d= iv><div><br></div><blockquote type=3D"cite" style=3D"margin:0 0 0 .8ex; bor= der-left:2px #729fcf solid;padding-left:1ex"><div class=3D"">We are seeing = an issue where a single second disconnect or packet loss appears to cause k= eepalived to go into fault and die. </div></blockquote><div><br></div= ><div>What is happening here depends on what you are doing. If the network = cable is disconnected from an interface that is being used by keepalived (o= r indeed if the interface is downed by command - e.g. ip link set XXX down)= , then any VRRP instance tracking that interface will go to fault state unt= il the interface comes back up again. Once the interface comes back up, the= VRRP instance will go to BACKUP state, and then if it is the highest prior= ity instance and nopreempt is not set, then after three advert intervals pl= us a bit (I'll explain later) it will take over as master.</div><div><br></= div><div>I am not sure what you mean by "die". Does the VRRP instance remai= n in fault state after the interface is restored?</div><div><br></div><bloc= kquote type=3D"cite" style=3D"margin:0 0 0 .8ex; border-left:2px #729fcf so= lid;padding-left:1ex"><div class=3D"">We'd like to actually run with an 'ad= vert_int' of 2 seconds with a '10 second hold down timer' meaning we have t= o lose five(5) hellos instead. Is there a way to do that?</div></bloc= kquote><div><br></div><div>The simple answer is NO. The VRRP RFCs are speci= fic about how long a backup will wait before it takes over as master. For V= RRPv3 this is 3 * advert_int + (256 - priority) / 256 * advert_int. For VRR= Pv2 it is 3 * advert_int + (256 - priority) / 256. So the timeout is always= somewhere between 3 and 4 advert intervals, and the higher the priority of= the VRRP instance the closer the timeout is to 3 advert intervals.</div><d= iv><br></div><div>Since the RFCs are explicit about the calculation of 3 * = advert_int plus a bit, the 3 * is hard coded, and not configurable. Technic= ally the 3 * could be replaced with a configurable parameter, but then you = would not be running VRRP!</div><div> </div><blockquote type=3D"cite" = style=3D"margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"= ><div class=3D""> Right now it appears that we have only to los= e a single hello and VRRP wants to fail over which is too fragile.</div></b= lockquote><div><br></div><div>This is not the case. An interface going down= will cause an immediate transition to fault state, but the loss of a singl= e advert will NOT cause a backup vrrp to take over as master.</div><div><br= ></div><blockquote type=3D"cite" style=3D"margin:0 0 0 .8ex; border-left:2p= x #729fcf solid;padding-left:1ex"><div class=3D""> We are trying= to find the configs to allow for that.</div><div class=3D""><br></div></bl= ockquote><div>There are none since keepalived does not support anything oth= er than 3 * advert_int + a bit, and always immediately transitions to FAULT= state if the interface it is using goes down.</div><div><br></div><div>If = you could give more details about what is happening in respect of "single s= econd disconnect or packet loss" and also "go into fault and die" then we m= ight be able to make some more concrete suggestions.</div><div><br></div><d= iv>I hope this helps,</div><div><br></div><div>Quentin Armitage</div><br cl= ass=3D"Apple-interchange-newline"><blockquote type=3D"cite" style=3D"margin= :0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote><= div><br></div><div><span></span></div></body></html> --=-ou5ouzhBfqUCL8WbxS9W-- --===============4187187888112583002== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============4187187888112583002== 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 --===============4187187888112583002==--