Re: LVS backup router not taking role
Khapare Joshi <[email protected]> Sat, 21 Jan 2012 08:55:43 +0000
| Newsgroups | gmane.linux.redhat.piranha |
|---|---|
| Message-ID | <CABHhH+tDoaNW8gzwvMJoNpzame_EK3Cx1TFAxbXYNXLdRJvbOQ@mail.gmail.com> |
--f46d040890fd6cca6204b705f6f6 Content-Type: multipart/alternative; boundary=f46d040890fd6cca5d04b705f6f4 --f46d040890fd6cca5d04b705f6f4 Content-Type: text/plain; charset=ISO-8859-1 hi tapan Here are is my lvs.cf file IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn TCP 192.168.1.3:80 wlc -> 192.168.1.4:80 Route 1 0 0 -> 192.168.1.5:80 Route 1 0 0 and I have ip forward enabled on my active router. I also allowed firewall from lvs router to real server and vice versa. I am using direct routing and added line in arptable in REAL server as : # Generated by arptables-save v0.0.8 on Fri Jan 20 20:23:23 2012 *filter :IN ACCEPT [504508:14126224] :OUT ACCEPT [237:6636] :FORWARD ACCEPT [0:0] [346:9688] -A IN -d 130.208.165.193 -j DROP [0:0] -A OUT -d 192.168.1.3 -o eth0 -j mangle --mangle-ip-s 192.16.1.4 COMMIT # Completed on Fri Jan 20 20:23:23 2012 It seems it works for a while then after certain while I only get response from one real server. There seem somewhere I am doing wrong Khapare where else could be the issue ? K On Wed, Jan 18, 2012 at 4:16 PM, Tapan Kumar Thapa < [email protected]> wrote: > Can you please post your complete lvs.cfg? > > Sent from my iPhone > > Regards > Tapan Kumar Thapa > Manager-Tech Support > HT Mobile Solutions Limited > Mob-919871701375 > > On Jan 18, 2012, at 9:28 PM, Khapare Joshi <[email protected]> wrote: > > > > On Wed, Jan 18, 2012 at 1:59 PM, Ranjith Rajaram < <[email protected]> > [email protected]> wrote: > >> ** >> >> >> On 01/18/2012 07:22 PM, Khapare Joshi wrote: >> >> Hi, all, >> >> first time poster. I recently deployed lvs (primary and backup) with >> piranh and ran into few issues. I turned off the primary lvs to see backup >> lvs will take over. However it does not take over right a way seem require >> restart pulse. How does this fail over works if primary goes down ? should >> not this be happen right a way if primary lvs goes down ? >> >> If primary goes, secondary has to take it over >> >> It depends on deadtime >> >> deadtime = n >> Length of time before a node is declared dead and IP >> takeover occurs. >> >> lvs.cf needs to be checked together with system configuration. Look at >> /var/log/messages >> >> >> >> I configured these parameter as this : >> > Heartbeat interval (seconds): Assume dead after (seconds): Heartbeat > runs on port: Monitor NIC links for failures: Syncdaemon: > and copied lvs.cf to redudant server as well. > >> >> >> And I have four real server- and it sees if one goes down whole system is >> unavailable (httpd service). Then I restart pulse and get the httpd >> service. I do not think this is right. could be please guide me in right >> direction to make reliable. >> >> >> Do you have separate boxes for LVS directors and real server's ? [Are you >> running pulse on any of the two real server's ?] >> > > I have two servers for lvs i.e lvs1 lvs2 and configured using piranha > tool. I started pulse on these two machines. Rest of other four server I > only started httpd not the pulse > >> >> check the output of ipvsadm -L -n from the active lvs server [paste it >> here] >> >> >> PS: I use direct routing and have >> >> net.ipv4.conf.lo.arp_ignore = 1 >> net.ipv4.conf.lo.arp_announce = 2 >> >> in /etc/sysctl.conf >> >> sorry for too many question. >> >> Thanks >> >> >> _______________________________________________ >> Piranha-list mailing list <[email protected]>[email protected] <https://www.redhat.com/mailman/listinfo/piranha-list>https://www.redhat.com/mailman/listinfo/piranha-list >> >> >> >> _______________________________________________ >> Piranha-list mailing list >> <[email protected]>[email protected] >> <https://www.redhat.com/mailman/listinfo/piranha-list> >> https://www.redhat.com/mailman/listinfo/piranha-list >> > > _______________________________________________ > Piranha-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/piranha-list > > > _______________________________________________ > Piranha-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/piranha-list > --f46d040890fd6cca5d04b705f6f4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable hi tapan <br><br>Here are is my <a href=3D"http://lvs.cf">lvs.cf</a> file<b= r><br>IP Virtual Server version 1.2.1 (size=3D4096)<br>Prot LocalAddress:Po= rt Scheduler Flags<br>=A0 -> RemoteAddress:Port=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 Forward Weight ActiveConn InActConn<br> TCP=A0 <a href=3D"http://192.168.1.3:80">192.168.1.3:80</a> wlc<br>=A0 ->= ; <a href=3D"http://192.168.1.4:80">192.168.1.4:80</a>=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 Route=A0=A0 1=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0= =A0=A0=A0=A0=A0=A0 <br>=A0 -> <a href=3D"http://192.168.1.5:80">192.168.= 1.5:80</a>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Route=A0=A0 1=A0=A0=A0=A0=A0 0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0 <br> <br>and I have ip forward enabled on my active router. I also allowed firew= all from lvs router to real server and vice versa. I am using direct routin= g and added line in arptable in REAL server as : <br><br># Generated by arp= tables-save v0.0.8 on Fri Jan 20 20:23:23 2012<br> *filter<br>:IN ACCEPT [504508:14126224]<br>:OUT ACCEPT [237:6636]<br>:FORWA= RD ACCEPT [0:0]<br>[346:9688] -A IN -d 130.208.165.193 -j DROP<br>[0:0] -A = OUT -d 192.168.1.3 -o eth0 -j mangle --mangle-ip-s 192.16.1.4<br>COMMIT<br> # Completed on Fri Jan 20 20:23:23 2012<br><br><br>It seems it works for a = while then after certain while I only get response from one real server. Th= ere seem somewhere I am doing wrong <br><br>Khapare<br><br><br><br><br> where else could be the issue ?<br><br>K<br><br><div class=3D"gmail_quote">= On Wed, Jan 18, 2012 at 4:16 PM, Tapan Kumar Thapa <span dir=3D"ltr"><<a= href=3D"mailto:[email protected]">[email protected]</a>>= ;</span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><div bgcolor=3D"#FFFFFF"><div>Can you please= post your complete lvs.cfg?<br><br>Sent from my iPhone<div><br></div><div>= Regards<span class=3D"HOEnZb"><font color=3D"#888888"><br> <div>Tapan Kumar Thapa</div><div>Manager-Tech Support</div><div>HT Mobile S= olutions Limited</div></font></span></div><span class=3D"HOEnZb"><font colo= r=3D"#888888"><div>Mob-919871701375</div></font></span></div><div><div clas= s=3D"h5"> <div><br>On Jan 18, 2012, at 9:28 PM, Khapare Joshi <<a href=3D"mailto:k= [email protected]" target=3D"_blank">[email protected]</a>> wrote:<br= ><br></div><div></div><blockquote type=3D"cite"><div><br><br><div class=3D"= gmail_quote"> On Wed, Jan 18, 2012 at 1:59 PM, Ranjith Rajaram <span dir=3D"ltr"><<a h= ref=3D"mailto:[email protected]" target=3D"_blank"></a><a href=3D"mailto:= [email protected]" target=3D"_blank">[email protected]</a>></span> w= rote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> <u></u> =20 =20 =20 <div bgcolor=3D"#ffffff" text=3D"#000000"><div> <br> <br> On 01/18/2012 07:22 PM, Khapare Joshi wrote: <blockquote type=3D"cite"> =20 Hi, all,<br> <br> first time poster. I recently deployed lvs (primary and backup) with piranh and ran into few issues. I turned off the primary lvs to see backup lvs will take over. However it does not take over right a way seem require restart pulse. How does this fail over works if primary goes down ? should not this be happen right a way if primary lvs goes down ?<br> </blockquote></div> If primary goes, secondary has to take it over<br> <br> It depends on deadtime<br> <br> =A0deadtime =3D n<br> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Length of time before a node is= declared dead and IP takeover occurs.<br> <br> <a href=3D"http://lvs.cf" target=3D"_blank">lvs.cf</a> needs to be chec= ked together with system configuration.=A0 Look at /var/log/messages<div><br> <br> <br> I configured these parameter as this=A0 :<br></div></div></blockquote><= div><table><tbody><tr><td>Heartbeat interval (seconds):</td> <td><input name=3D"hb_interval" size=3D"5" value=3D"2" type=3D"TEXT"> </td> </tr> <tr> <td>Assume dead after (seconds):</td> <td><input name=3D"dead_after" size=3D"5" value=3D"10" type=3D"TEXT"> = </td> </tr> <tr> <td>Heartbeat runs on port:</td> <td><input name=3D"hb_port" size=3D"5" value=3D"539" type=3D"TEXT"> </= td> </tr> <tr> <td>Monitor NIC links for failures:</td> <td><input name=3D"monitor_links" checked type=3D"checkbox"> </td> </tr> <tr> <td>Syncdaemon:</td> <td><input name=3D"syncdaemon" checked type=3D"checkbox"></td></tr></tbo= dy></table><br>and copied <a href=3D"http://lvs.cf" target=3D"_blank">lvs.c= f</a> to redudant server as well. <br></div><blockquote class=3D"gmail_quot= e" style=3D"margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204)= ;padding-left:1ex"> <div bgcolor=3D"#ffffff" text=3D"#000000"><div> <br> <blockquote type=3D"cite"> <br> And I have four real server- and it sees if one goes down whole system is unavailable (httpd service). Then I restart pulse and get=A0 the httpd service. I do not think this is right. could be please guide me in right direction to make reliable.<br> <br> </blockquote> <br></div> Do you have separate boxes for LVS directors and real server's ? [Are you running pulse on any of the two real server's ?]<br></div>= </blockquote><div><br>I have two servers for lvs i.e lvs1 lvs2 and configur= ed using piranha tool. I started pulse on these two machines. Rest of other= four server I only started httpd not the pulse=A0 <br> </div><blockquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0.8ex;b= order-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor=3D"#ff= ffff" text=3D"#000000"> <br> check the output of ipvsadm -L -n from the active lvs server [paste it here]<br> <br> <br> <blockquote type=3D"cite"><div>PS: I use direct routing and have <br> <br> net.ipv4.conf.lo.arp_ignore =3D 1<br> net.ipv4.conf.lo.arp_announce =3D 2<br> <br> in /etc/sysctl.conf<br> <br> sorry for too many question.<br> <br> Thanks </div><pre><fieldset></fieldset> _______________________________________________ Piranha-list mailing list <a href=3D"mailto:[email protected]" target=3D"_blank"></a><a href=3D= "mailto:[email protected]" target=3D"_blank">[email protected]<= /a> <a href=3D"https://www.redhat.com/mailman/listinfo/piranha-list" target=3D"= _blank"></a><a href=3D"https://www.redhat.com/mailman/listinfo/piranha-list= " target=3D"_blank">https://www.redhat.com/mailman/listinfo/piranha-list</a= ></pre> </blockquote> <br> <pre cols=3D"72"></pre> </div> <br>_______________________________________________<br> Piranha-list mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank"></a><a href=3D= "mailto:[email protected]" target=3D"_blank">[email protected]<= /a><br> <a href=3D"https://www.redhat.com/mailman/listinfo/piranha-list" target=3D"= _blank"></a><a href=3D"https://www.redhat.com/mailman/listinfo/piranha-list= " target=3D"_blank">https://www.redhat.com/mailman/listinfo/piranha-list</a= ><br> </blockquote></div><br> </div></blockquote><blockquote type=3D"cite"><div><span>___________________= ____________________________</span><br><span>Piranha-list mailing list</spa= n><br><span><a href=3D"mailto:[email protected]" target=3D"_blank">Pi= [email protected]</a></span><br> <span><a href=3D"https://www.redhat.com/mailman/listinfo/piranha-list" targ= et=3D"_blank">https://www.redhat.com/mailman/listinfo/piranha-list</a></spa= n></div></blockquote></div></div></div><br>________________________________= _______________<br> Piranha-list mailing list<br> <a href=3D"mailto:[email protected]">[email protected]</a><br> <a href=3D"https://www.redhat.com/mailman/listinfo/piranha-list" target=3D"= _blank">https://www.redhat.com/mailman/listinfo/piranha-list</a><br></block= quote></div><br> --f46d040890fd6cca5d04b705f6f4-- --f46d040890fd6cca6204b705f6f6 Content-Type: application/octet-stream; name="lvs.cf" Content-Disposition: attachment; filename="lvs.cf" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gxoect8l0 c2VyaWFsX25vID0gOTYKcHJpbWFyeSA9IDEzMC4yMDguMTY1LjE5NApzZXJ2aWNlID0gbHZzCmJh Y2t1cF9hY3RpdmUgPSAxCmJhY2t1cCA9IDEzMC4yMDguMTY1LjE5NQpoZWFydGJlYXQgPSAxCmhl YXJ0YmVhdF9wb3J0ID0gNTM5CmtlZXBhbGl2ZSA9IDYKZGVhZHRpbWUgPSAxOApuZXR3b3JrID0g ZGlyZWN0CmRlYnVnX2xldmVsID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cm9ncmFtID0gIi91c3Iv bG9jYWwvYmluL3Rlc3Quc2ggJWgiCiAgICAgbG9hZF9tb25pdG9yID0gbm9uZQogICAgIHNjaGVk dWxlciA9IHdycgogICAgIHByb3RvY29sID0gdGNwCiAgICAgdGltZW91dCA9IDYKICAgICByZWVu dHJ5ID0gMTUKICAgICBxdWllc2NlX3NlcnZlciA9IDEKICAgICBzZXJ2ZXIgdnRjbDEucmhpLmhp LmlzIHsKICAgICAgICAgYWRkcmVzcyA9IDEzMC4yMDguMTY1LjE5NwogICAgICAgICBhY3RpdmUg PSAxCiAgICAgICAgIHdlaWdodCA9IDEKICAgICB9CiAgICAgc2VydmVyIHZ0Y2wyLnJoaS5oaS5p cyB7CiAgICAgICAgIGFkZHJlc3MgPSAxMzAuMjA4LjE2NS4xOTgKICAgICAgICAgYWN0aXZlID0g MQogICAgICAgICB3ZWlnaHQgPSAxCiAgICAgfQp9CnZpcnR1YWwgdWNkZXYtdGVzdCB7CiAgICAg YWN0aXZlID0gMQogICAgIGFkZHJlc3MgPSAxMzAuMjA4LjE2NS4xOTMgZXRoMDoyCiAgICAgdmlw X25tYXNrID0gMjU1LjI1NS4yNTUuMAogICAgIHBvcnQgPSA4MAogICAgIHBtYXNrID0gMjU1LjI1 NS4yNTUuMAogICAgIHVzZV9yZWdleCA9IDAKICAgICBsb2FkX21vbml0b3IgPSBub25lCiAgICAg c2NoZWR1bGVyID0gd2xjCiAgICAgcHJvdG9jb2wgPSB0Y3AKICAgICB0aW1lb3V0ID0gNgogICAg IHJlZW50cnkgPSAxNQogICAgIHF1aWVzY2Vfc2VydmVyID0gMQogICAgIHNlcnZlciB1Y2RldjEu cmhpLmhpLmlzIHsKICAgICAgICAgYWRkcmVzcyA9IDEzMC4yMDguMTY1LjE2OAogICAgICAgICBh Y3RpdmUgPSAxCiAgICAgICAgIHdlaWdodCA9IDEKICAgICB9CiAgICAgc2VydmVyIHVjZGV2Mi5y aGkuaGkuaXMgewogICAgICAgICBhZGRyZXNzID0gMTMwLjIwOC4xNjUuMTY3CiAgICAgICAgIGFj dGl2ZSA9IDEKICAgICAgICAgd2VpZ2h0ID0gMQogICAgIH0KfQp2aXJ0dWFsIGJiYmJiIHsKICAg ICBhY3RpdmUgPSAwCiAgICAgYWRkcmVzcyA9IDE5Mi4xNjguMS4xIGV0aDA6NgogICAgIHZpcF9u bWFzayA9IDI1NS4yNTUuMjU1LjAKICAgICBwb3J0ID0gODAKICAgICBwbWFzayA9IDI1NS4yNTUu MjU1LjAKICAgICBzZW5kID0gIkdFVCAvIEhUVFAvMS4wXHJcblxyXG4iCiAgICAgZXhwZWN0ID0g IkhUVFAiCiAgICAgdXNlX3JlZ2V4ID0gMAogICAgIGxvYWRfbW9uaXRvciA9IG5vbmUKICAgICBz Y2hlZHVsZXIgPSB3bGMKICAgICBwcm90b2NvbCA9IHRjcAogICAgIHRpbWVvdXQgPSA2CiAgICAg cmVlbnRyeSA9IDE1CiAgICAgcXVpZXNjZV9zZXJ2ZXIgPSAwCn0K --f46d040890fd6cca6204b705f6f6 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Piranha-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/piranha-list --f46d040890fd6cca6204b705f6f6--