Re: keepalived config is not working correctly with virtualbox vms
Richard Scott <[email protected]> Mon, 15 Apr 2013 12:18:13 +0100
| Newsgroups | gmane.linux.keepalived.announce |
|---|---|
| Message-ID | <[email protected]> |
--===============1345923016475499673==
Content-Type: multipart/alternative;
boundary="=_bf51e3ab36c32f025a2930db3f364af3"
--=_bf51e3ab36c32f025a2930db3f364af3
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
=20
Hi,=20
I don't think your priority's are far enough apart. This is in
the Man page:=20
# for electing MASTER, highest priority wins.
# to be
MASTER, make 50 more than other machines.
priority 100=20
Try changing
the 2nd VM to have a priority of 200?=20
Rich=20
On 15/04/2013 09:45, Paul
R=C3=BCder wrote:=20
> Hi,=20
>=20
> my keepalived configuration is not working
correctly (i don't know if this is really a virtualbox issue).=20
>=20
> I
have two virtual testing machines (virtualbox) to try some things out
with keepalived/vrrp. Bot can ping each other flawlessly (internal
virtualbox network).=20
>=20
> VM 1 (MASTER):=20
>=20
> eth0: Management=20
>
eth1: 192.168.2.1/24 [3]=20
> eth2: 192.168.2.2/24 [4]=20
>=20
>
keepalived.conf:=20
>=20
> vrrp_instance test {=20
> state MASTER=20
> interface
eth1=20
> track_interface {=20
> eth2=20
> }=20
> virtual_router_id 1=20
>
priority 101=20
> advert_int 1=20
> authentication {=20
> auth_type PASS=20
>
auth_pass 1111=20
> }=20
> virtual_ipaddress {=20
> 192.168.3.1/24 [5] dev
eth1=20
> 192.168.3.2/24 [6] dev eth2=20
> }=20
> }=20
>=20
> tcpdump on eth1:=20
>
> 12:44:54.720119 IP 192.168.2.1 > vrrp.mcast.net [7]: VRRPv2,
Advertisement, vrid 1, prio 101, authtype simple, intvl 1s, length 24=20
>
12:44:55.049465 IP 192.168.2.3 > vrrp.mcast.net [7]: VRRPv2,
Advertisement, vrid 1, prio 100, authtype simple, intvl 1s, length 24=20
>
> tcpdump on eth2:=20
>=20
> 12:46:21.082264 IP 192.168.2.1 >
vrrp.mcast.net [7]: VRRPv2, Advertisement, vrid 1, prio 101, authtype
simple, intvl 1s, length 24=20
> 12:46:21.494239 IP 192.168.2.3 >
vrrp.mcast.net [7]: VRRPv2, Advertisement, vrid 1, prio 100, authtype
simple, intvl 1s, length 24=20
>=20
> VM 2 (BACKUP):=20
>=20
> eth0: Management
> eth1: 192.168.2.3/24 [8]=20
> eth2: 192.168.2.4/24 [9]=20
>=20
>
keepalived.conf:=20
>=20
> vrrp_instance test {=20
> state BACKUP=20
> interface
eth1=20
> track_interface {=20
> eth2=20
> }=20
> virtual_router_id 1=20
>
priority 100=20
> advert_int 1=20
> authentication {=20
> auth_type PASS=20
>
auth_pass 1111=20
> }=20
> virtual_ipaddress {=20
> 192.168.3.1/24 [5] dev
eth1=20
> 192.168.3.2/24 [6] dev eth2=20
> }=20
> }=20
>=20
> tcpdump on eth1:=20
>
> 12:53:12.265456 IP 192.168.2.1 > vrrp.mcast.net [7]: VRRPv2,
Advertisement, vrid 1, prio 101, authtype simple, intvl 1s, length 24=20
>
12:53:12.670635 IP 192.168.2.3 > vrrp.mcast.net [7]: VRRPv2,
Advertisement, vrid 1, prio 100, authtype simple, intvl 1s, length 24=20
>
> tcpdump on eth2:=20
>=20
> 12:53:34.397374 IP 192.168.2.1 >
vrrp.mcast.net [7]: VRRPv2, Advertisement, vrid 1, prio 101, authtype
simple, intvl 1s, length 24=20
> 12:53:34.787327 IP 192.168.2.3 >
vrrp.mcast.net [7]: VRRPv2, Advertisement, vrid 1, prio 100, authtype
simple, intvl 1s, length 24=20
>=20
> After starting keepalived on VM 2, it
transits instantly to the master state, which shouldnt be.=20
>=20
> Why is
this happening? Any help is very appreciated!=20
>=20
> Regards,=20
>=20
> Paul
R=C3=BCder=20
>=20
>
-------------------------------------------------------------------------=
-----
>
Precog is a next-generation analytics platform capable of advanced
>
analytics on semi-structured data. The platform includes APIs for
building
> apps and a phenomenal toolset for data science. Developers
can use
> our toolset for easy data analysis & visualization. Get a free
account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
[1]
>=20
> _______________________________________________
>
Keepalived-announce mailing list
>
[email protected]
>
https://lists.sourceforge.net/lists/listinfo/keepalived-announce [2]
Links:
------
[1]
http://www2.precog.com/precogplatform/slashdotnewsletter
[2]
https://lists.sourceforge.net/lists/listinfo/keepalived-announce
[3]
http://192.168.2.1/24
[4] http://192.168.2.2/24
[5]
http://192.168.3.1/24
[6] http://192.168.3.2/24
[7]
http://vrrp.mcast.net
[8] http://192.168.2.3/24
[9]
http://192.168.2.4/24
--=_bf51e3ab36c32f025a2930db3f364af3
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>Hi,</p>
<p>I don't think your priority's are far enough apart. This is in the Man p=
age:</p>
<p># for electing MASTER, highest priority wins.<br /># to be MASTER, make =
50 more than other machines.<br />priority 100</p>
<p>Try changing the 2nd VM to have a priority of 200?</p>
<p>Rich</p>
<p> </p>
<p>On 15/04/2013 09:45, Paul Rüder wrote:</p>
<blockquote type=3D"cite" style=3D"padding-left:5px; border-left:#1010ff 2p=
x solid; margin-left:5px; width:100%"><!-- html ignored --><!-- head ignore=
d --><!-- meta ignored -->
<div dir=3D"ltr">
<div>Hi,</div>
<div> </div>
<div>my keepalived configuration is not working correctly (i don't know if =
this is really a virtualbox issue).</div>
<div> </div>
<div>I have two virtual testing machines (virtualbox) to try some things ou=
t with keepalived/vrrp. Bot can ping each other flawlessly (internal virtua=
lbox network).</div>
<div> </div>
<div>VM 1 (MASTER):</div>
<div> </div>
<div> eth0: Management</div>
<div> eth1: <a href=3D"http://192.168.2.1/24">192.168.2.1/24</=
a></div>
<div> eth2: <a href=3D"http://192.168.2.2/24">192.168.2.2/24</=
a></div>
<div> </div>
<div> keepalived.conf:</div>
<div> </div>
<div> vrrp_instance test {</div>
<div> state MASTER</div>
<div> interface eth1</div>
<div> track_interface {</div>
<div> eth2</div>
<div> }</div>
<div> virtual_router_id 1</div>
<div> priority 101</div>
<div> advert_int 1</div>
<div> authentication {</div>
<div> auth_type PASS</div>
<div> auth_pass 1111</div>
<div> }</div>
<div> virtual_ipaddress {</div>
<div> <a href=3D"http://192.168.3=
=2E1/24">192.168.3.1/24</a> dev eth1</div>
<div> <a href=3D"http://192.168.3=
=2E2/24">192.168.3.2/24</a> dev eth2</div>
<div> }</div>
<div> }</div>
<div> </div>
<div> tcpdump on eth1:</div>
<div> </div>
<div> 12:44:54.720119 IP 192.168.2.1 > <a href=3D"http://vr=
rp.mcast.net">vrrp.mcast.net</a>: VRRPv2, Advertisement, vrid 1, prio 101, =
authtype simple, intvl 1s, length 24</div>
<div> 12:44:55.049465 IP 192.168.2.3 > <a href=3D"http://vr=
rp.mcast.net">vrrp.mcast.net</a>: VRRPv2, Advertisement, vrid 1, prio 100, =
authtype simple, intvl 1s, length 24</div>
<div> </div>
<div> tcpdump on eth2:</div>
<div> </div>
<div> 12:46:21.082264 IP 192.168.2.1 > <a href=3D"http://vr=
rp.mcast.net">vrrp.mcast.net</a>: VRRPv2, Advertisement, vrid 1, prio 101, =
authtype simple, intvl 1s, length 24</div>
<div> 12:46:21.494239 IP 192.168.2.3 > <a href=3D"http://vr=
rp.mcast.net">vrrp.mcast.net</a>: VRRPv2, Advertisement, vrid 1, prio 100, =
authtype simple, intvl 1s, length 24</div>
<div> </div>
<div> </div>
<div>VM 2 (BACKUP):</div>
<div> </div>
<div> eth0: Management</div>
<div> eth1: <a href=3D"http://192.168.2.3/24">192.168.2.3/24</=
a></div>
<div> eth2: <a href=3D"http://192.168.2.4/24">192.168.2.4/24</=
a></div>
<div> </div>
<div> keepalived.conf:</div>
<div> </div>
<div> vrrp_instance test {</div>
<div> state BACKUP</div>
<div> interface eth1</div>
<div> track_interface {</div>
<div> eth2</div>
<div> }</div>
<div> virtual_router_id 1</div>
<div> priority 100</div>
<div> advert_int 1</div>
<div> authentication {</div>
<div> auth_type PASS</div>
<div> auth_pass 1111</div>
<div> }</div>
<div> virtual_ipaddress {</div>
<div> <a href=3D"http://192.168.3=
=2E1/24">192.168.3.1/24</a> dev eth1</div>
<div> <a href=3D"http://192.168.3=
=2E2/24">192.168.3.2/24</a> dev eth2</div>
<div> }</div>
<div> }</div>
<div> </div>
<div> tcpdump on eth1:</div>
<div> </div>
<div> 12:53:12.265456 IP 192.168.2.1 > <a href=3D"http://vr=
rp.mcast.net">vrrp.mcast.net</a>: VRRPv2, Advertisement, vrid 1, prio 101, =
authtype simple, intvl 1s, length 24</div>
<div> 12:53:12.670635 IP 192.168.2.3 > <a href=3D"http://vr=
rp.mcast.net">vrrp.mcast.net</a>: VRRPv2, Advertisement, vrid 1, prio 100, =
authtype simple, intvl 1s, length 24</div>
<div> </div>
<div> tcpdump on eth2:</div>
<div> </div>
<div> 12:53:34.397374 IP 192.168.2.1 > <a href=3D"http://vr=
rp.mcast.net">vrrp.mcast.net</a>: VRRPv2, Advertisement, vrid 1, prio 101, =
authtype simple, intvl 1s, length 24</div>
<div> 12:53:34.787327 IP 192.168.2.3 > <a href=3D"http://vr=
rp.mcast.net">vrrp.mcast.net</a>: VRRPv2, Advertisement, vrid 1, prio 100, =
authtype simple, intvl 1s, length 24</div>
<div> </div>
<div>After starting keepalived on VM 2, it transits instantly to the master=
state, which shouldnt be. </div>
<div> </div>
<div>Why is this happening? Any help is very appreciated!</div>
<div> </div>
<div>Regards,</div>
<div> </div>
<div>Paul Rüder</div>
</div>
<br />
<pre>----------------------------------------------------------------------=
--------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
<a href=3D"http://www2.precog.com/precogplatform/slashdotnewsletter">http:/=
/www2.precog.com/precogplatform/slashdotnewsletter</a>
</pre>
<br />
<pre>_______________________________________________
Keepalived-announce mailing list
<a href=3D"mailto:[email protected]">Keepalived-ann=
[email protected]</a>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/keepalived-announce=
">https://lists.sourceforge.net/lists/listinfo/keepalived-announce</a>
</pre>
</blockquote>
<p> </p>
</body></html>
--=_bf51e3ab36c32f025a2930db3f364af3--
--===============1345923016475499673==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
--===============1345923016475499673==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Keepalived-announce mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-announce
--===============1345923016475499673==--