Re: Issue with local routing

Vincent Alloo <[email protected]> Wed, 22 Jul 2009 16:22:51 +0200
Newsgroups gmane.linux.highavailability.ultramonkey
Message-ID <[email protected]>
--===============0684271117==
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content=3D"text/html;charset=3DUTF-8" http-equiv=3D"Content-Type"=
>
</head>
<body bgcolor=3D"#ffffff" text=3D"#000000">
Hi,<br>
this is the result of ipvsadm when resource is available:<br>
<br>
TCP=C2=A0 192.168.105.154:80 wrr persistent 600<br>
=C2=A0 -&gt; 192.168.105.151:80=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 Route=C2=A0=C2=A0 30=C2=A0=C2=A0=C2=A0=C2=A0 0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0<br>
=C2=A0 -&gt; 192.168.105.156:80=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 Local=C2=A0=C2=A0 70=C2=A0=C2=A0=C2=A0=C2=A0 0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0<br>
<br>
<br>
When not available:<br>
TCP=C2=A0 192.168.105.154:80 wrr persistent 600<br>
=C2=A0 -&gt; 192.168.105.151:80=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 Route=C2=A0=C2=A0 30=C2=A0=C2=A0=C2=A0=C2=A0 0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0<br>
=C2=A0 -&gt; 192.168.105.156:80=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 Local=C2=A0=C2=A0 0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0<br>
<br>
And under load:<br>
TCP=C2=A0 192.168.105.154:80 wrr persistent 600<br>
=C2=A0 -&gt; 192.168.105.151:80=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 Route=C2=A0=C2=A0 30=C2=A0=C2=A0=C2=A0=C2=A0 6=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 313<br>
=C2=A0 -&gt; 192.168.105.156:80=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 Local=C2=A0=C2=A0 70=C2=A0=C2=A0=C2=A0=C2=A0 4=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 272<br>
<br>
And my ldirectord.conf:<br>
virtual=3D192.168.105.154:80<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 checktype=3Dnegoti=
ate<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 real=3D192.168.105=
.156:80 gate 70<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 real=3D192.168.105=
.151:80 gate 30<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fallback=3D127.0.0=
.1:80<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 request=3D"index.h=
tml"<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 receive=3D"Cluster=
"<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 service=3Dhttp<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 checkport=3D80<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 scheduler=3Dwrr<br=
>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 protocol=3Dtcp<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 persistent =3D 600=
<br>
<br>
/etc/ha.d$ sudo sysctl -p<br>
kernel.printk =3D 4 4 1 7<br>
kernel.maps_protect =3D 1<br>
fs.inotify.max_user_watches =3D 524288<br>
vm.mmap_min_addr =3D 65536<br>
net.ipv4.conf.default.rp_filter =3D 1<br>
net.ipv4.conf.all.rp_filter =3D 1<br>
net.ipv4.ip_forward =3D 1<br>
net.ipv4.conf.all.arp_ignore =3D 1<br>
net.ipv4.conf.eth2.arp_ignore =3D 1<br>
net.ipv4.conf.eth3.arp_ignore =3D 1<br>
net.ipv4.conf.bond0.arp_ignore =3D 1<br>
net.ipv4.conf.all.arp_announce =3D 2<br>
net.ipv4.conf.eth2.arp_announce =3D 2<br>
net.ipv4.conf.eth3.arp_announce =3D 2<br>
net.ipv4.conf.bond0.arp_announce =3D 2<br>
<br>
<br>
/etc/ha.d$ ip add sh<br>
1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 16436 qdisc noqueue<br>
=C2=A0=C2=A0=C2=A0 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<=
br>
=C2=A0=C2=A0=C2=A0 inet 127.0.0.1/8 scope host lo<br>
=C2=A0=C2=A0=C2=A0 inet6 ::1/128 scope host<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 valid_lft forever preferred_lft fore=
ver<br>
2: eth0: &lt;BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP&gt; mtu 1500 qdisc
pfifo_fast master bond1 qlen 1000<br>
=C2=A0=C2=A0=C2=A0 link/ether 00:23:7d:fb:49:12 brd ff:ff:ff:ff:ff:ff<br>
3: eth1: &lt;BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP&gt; mtu 1500 qdisc
pfifo_fast master bond1 qlen 1000<br>
=C2=A0=C2=A0=C2=A0 link/ether 00:23:7d:fb:49:12 brd ff:ff:ff:ff:ff:ff<br>
4: eth2: &lt;BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP&gt; mtu 1500 qdisc
pfifo_fast master bond0 qlen 1000<br>
=C2=A0=C2=A0=C2=A0 link/ether 00:24:81:a9:74:78 brd ff:ff:ff:ff:ff:ff<br>
5: eth3: &lt;BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP&gt; mtu 1500 qdisc
pfifo_fast master bond0 qlen 1000<br>
=C2=A0=C2=A0=C2=A0 link/ether 00:24:81:a9:74:78 brd ff:ff:ff:ff:ff:ff<br>
6: bond0: &lt;BROADCAST,MULTICAST,MASTER,UP,LOWER_UP&gt; mtu 1500 qdisc
noqueue<br>
=C2=A0=C2=A0=C2=A0 link/ether 00:24:81:a9:74:78 brd ff:ff:ff:ff:ff:ff<br>
=C2=A0=C2=A0=C2=A0 inet 192.168.105.156/24 brd 192.168.105.255 scope glob=
al bond0<br>
=C2=A0=C2=A0=C2=A0 inet 192.168.105.154/24 brd 192.168.105.255 scope glob=
al secondary
bond0<br>
=C2=A0=C2=A0=C2=A0 inet 192.168.105.133/24 brd 192.168.105.255 scope glob=
al secondary
bond0<br>
=C2=A0=C2=A0=C2=A0 inet 192.168.105.130/24 brd 192.168.105.255 scope glob=
al secondary
bond0<br>
=C2=A0=C2=A0=C2=A0 inet6 fe80::224:81ff:fea9:7478/64 scope link<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 valid_lft forever preferred_lft fore=
ver<br>
7: bond1: &lt;BROADCAST,MULTICAST,MASTER,UP,LOWER_UP&gt; mtu 1500 qdisc
noqueue<br>
=C2=A0=C2=A0=C2=A0 link/ether 00:23:7d:fb:49:12 brd ff:ff:ff:ff:ff:ff<br>
=C2=A0=C2=A0=C2=A0 inet 172.18.0.148/28 brd 172.18.0.159 scope global bon=
d1<br>
=C2=A0=C2=A0=C2=A0 inet6 fe80::223:7dff:fefb:4912/64 scope link<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 valid_lft forever preferred_lft fore=
ver<br>
<br>
Thanks for your help.<br>
<br>
Regards, Vincent.<br>
<br>
Theodor Reppe [dotSource GmbH] a =C3=A9crit=C2=A0:
<blockquote
 cite=3D"mid:[email protected]=
RCE.local"
 type=3D"cite">
  <pre wrap=3D"">Hi Vincent,

  </pre>
  <blockquote type=3D"cite">
    <pre wrap=3D"">So in my setup, if the resource on 192.168.6.4 is not =
available, the=20
quey on the VIP 192.168.6.240 is still processed by the localhost=20
(192.168.6.4) and not forwarded to 192.168.6.5. When the 2 resources are=20
up, the load balancing is working fine.
    </pre>
  </blockquote>
  <pre wrap=3D""><!---->
could you please send an output of /sbin/ipvsadm -L -n at the time, the r=
esource on 192.168.6.4 is not available?
And an output of /sbin/ipvsadm -L -n when both resources are up and there=
 is some traffic on the load balancer (so we can see, wether both real se=
rvers are in use).

Thanks,
Theodor Reppe

Systemadministrator
=20
dotSource GmbH
Leutragraben 1
Intershop Tower
07743 Jena
=20
Telefon:  +49 (0)3641 573 3499
Telefax:  +49 (0)3641 573 3306
=20
E-Mail:   <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:t.reppe@do=
tSource.de">[email protected]</a>
 =20
Internet: <a class=3D"moz-txt-link-abbreviated" href=3D"http://www.dotSou=
rce.de">www.dotSource.de</a>
Blog:     <a class=3D"moz-txt-link-abbreviated" href=3D"http://www.handel=
skraft.de">www.handelskraft.de</a>
=20
Projekte: <a class=3D"moz-txt-link-abbreviated" href=3D"http://www.preisb=
ock.de">www.preisbock.de</a>

Eingetragen im Handelsregister
am Amtsgericht Jena, HRB 210634
Gesch=C3=A4ftf=C3=BChrer: Christian Gr=C3=B6tsch, Christian Malik

_______________________________________________
Ultramonkey-users mailing list
<a class=3D"moz-txt-link-abbreviated" href=3D"mailto:Ultramonkey-users@ve=
rgenet.net">[email protected]</a>
<a class=3D"moz-txt-link-freetext" href=3D"http://lists.vergenet.net/list=
info/ultramonkey-users">http://lists.vergenet.net/listinfo/ultramonkey-us=
ers</a>
  </pre>
</blockquote>
<br>
<pre class=3D"moz-signature" cols=3D"72">--=20
Vincent Alloo
EPISTEMA - IT infrastructure manager
<a class=3D"moz-txt-link-freetext" href=3D"http://www.epistema.com">http:=
//www.epistema.com</a>
<a class=3D"moz-txt-link-abbreviated" href=3D"mailto:vincent.alloo@episte=
ma.com">[email protected]</a>
+33489610930 - +33682130080</pre>
</body>
</html>

--===============0684271117==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ultramonkey-users mailing list
[email protected]
http://lists.vergenet.net/listinfo/ultramonkey-users

--===============0684271117==--