[Pacemaker] Default gateway issues

Albéric de Pertat alberic.depertat at adelux.fr
Mon Aug 8 03:43:29 EDT 2011


Hi Devin and thanks for your quick reply.

Le vendredi 05 août 2011 22:54:32, Devin Reade a écrit :
> --On Friday, August 05, 2011 03:57:53 PM +0200 Albéric de Pertat
> 
> <alberic.depertat at adelux.fr> wrote:
> > I have two nodes with ips 10.0.9.11/24 and 10.0.9.12/24 routed
> > via 10.0.9.254. I have declared an IPaddr resource for
> > 10.0.10.10/24. So far so good.
> > 
> > primitive ip ocf:heartbeat:IPaddr \
> > 
> >         params ip="10.0.10.10" cidr_netmask="24" nic="eth0" \
> >         broadcast="10.0.10.255"
> > 
> > Then I added a Route resource like so :
> > 
> > primitive gw ocf:heartbeat:Route \
> > 
> >         params destination="0.0.0.0/0" gateway="10.0.10.1"
> 
> It's not clear from the above what is the role of 10.0.9.254
> and if 10.0.10.1 is on your cluster or elsewhere.
> 
> If 10.0.10.1 is the IP of your normal default gateway and
> is not part of the cluster, you should be able to get rid of
> the Route resource and just use the normal non-cluster
> mechanisms for setting up your default route.

My normal default gateway is 10.0.9.254. That's the one I put in 
/etc/network/interfaces. But, when the VIP comes up (10.0.10.10/24, on another 
subnet), the default gateway should become 10.0.10.1. This address points to 
another machine in the network, unrelated to the firewall and which is not 
necessarily the same as 10.0.9.254.

> > This also works fine. The problems come if I try to move the
> > resources. If I standby the node where ip is running, the
> > resources ip and gw will move fine but the first node will be
> > left without a default gateway as the Route RA simply deletes it
> > when it stops, whether it's been added by the cluster or not.
> 
> Routes aren't "stacked", so the fact that the cluster has to
> remove it when the resource is moved is reasonable.  If you had
> it set up independent of the cluster with the same parameters,
> then I would consider that a config error.  OTOH, if moving the
> gw resource gets rid of a default route that points to a
> second gateway, I would consider that a problem with either
> the cluster software or network stack.

The cluster behavior is simple (from what I understood from the code of the 
Route RA) : when you setup a Route resource that is supposed to change your 
default gateway, it will first "ip route del" the current default gateway, 
then "ip route add" its own. But when the Route resource stops, the cluster 
has no way of remembering what the original gateway was and therefore will not 
restore it, leaving me with no default gateway.

This does not seem too uncommon a problem to me, so I guess there is something 
I am doing wrong. 
-- 
Albéric de Pertat
ADELUX: http://www.adelux.fr
Tel: 01 40 86 45 81
GPG: http://www.adelux.fr/societe/gpg/alberic.asc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110808/c476fe2c/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110808/c476fe2c/attachment-0003.sig>


More information about the Pacemaker mailing list