[Pacemaker] Reload named upon failover to 2nd Pacemaker node

Ken Gaillot kjgaillo at gleim.com
Mon Sep 22 17:29:26 UTC 2014


On 09/22/2014 12:06 PM, Martin Thorpe wrote:
> I've successfully setup a cluster IP (floating IP) using "crm configure"
> but I am struggling with how to define the named service and tell it to
> reload on the second node upon failure of the primary node of the two
> node test cluster.

That was discussed recently on this list, and two approaches were mentioned:

1. Make a custom resource agent based on ocf::heartbeat:IPaddr2 that 
reloads named when it adds or removes an IP address;

2. Our approach at Gleim:

    order dns-restart +inf: dns-ip:start dns-daemon-clone:start

dns-ip is our IPaddr2 resource, and dns-daemon-clone is the clone of the 
named resource. So that tells pacemaker to start    dns-daemon-clone 
after dns-ip, which in practice makes it restart named if dns-ip moves 
to the host. This does a full restart rather than a reload, but if that 
is acceptable in your situation, it's easy.

BTW, if your apache instance binds to the wildcard address, it won't 
need a reload or restart when the IP moves. BIND has the issue because 
it can only bind to specific IPs.

-- Ken Gaillot <kjgaillo at gleim.com>
Network Operations Center, Gleim Publications




More information about the Pacemaker mailing list