[Pacemaker] Auto-restart service on IP shift?

Erich Weiler weiler at soe.ucsc.edu
Thu Feb 4 18:19:17 UTC 2010


Actually, this is very odd.  named is running on testvm1 and testvm2. 
The IP is tied to testvm1.  Things are great.

Then I power off testvm1.  The IP goes to testvm2, but named does not 
restart, and thus isn't bound to the IP.  I guess that's what I'm trying 
to solve.

But here's the really weird part:  When I boot up testvm1 again, the IP 
goes over to testvm1 when it goes back online, then named starts on 
testvm1 (as it should), and then named *restarts* on testvm2!  Even 
though the IP address is no longer there.  I hope there is a way to get 
named to restart when the IP *comes* to testvm2, not when the IP leaves 
it.  ;)

Erich Weiler wrote:
>> If you had an ordering constraint that said named clone should start
>> after the ip, that would achieve what you want.
>> Might result in extra restarts of the clone though.
> 
> I thought that was the way I had it configured, but it doesn't seem to 
> work.  When I shut down testvm1, the IP goes to testvm2, but it doesn't 
> restart BIND-clone there.  Here's my config:
> 
> node testvm1 \
>         attributes standby="off"
> node testvm2
> node testvm3 \
>         attributes standby="off"
> primitive BIND lsb:named \
>         op monitor interval="30s" timeout="10s"
> primitive BIND-IP ocf:heartbeat:IPaddr2 \
>         params ip="10.1.1.79" nic="eth1" cidr_netmask="16" \
>         op monitor interval="30s" timeout="10s"
> primitive LDAP lsb:ldap \
>         op monitor interval="40s" timeout="10s" \
>         meta target-role="Started"
> primitive LDAP-IP ocf:heartbeat:IPaddr2 \
>         params ip="10.1.1.80" nic="eth1" cidr_netmask="16" \
>         op monitor interval="30s" timeout="10s"
> clone BIND-clone BIND \
>         meta clone-max="2" clone-node-max="1"
> clone LDAP-clone LDAP \
>         meta clone-max="2" clone-node-max="1"
> location BIND-IP-placement-1 BIND-IP 100: testvm1
> location BIND-IP-placement-2 BIND-IP 50: testvm2
> location BIND-placement-1 BIND-clone 100: testvm1
> location BIND-placement-2 BIND-clone 50: testvm2
> location LDAP-IP-placement-1 LDAP-IP 100: testvm3
> location LDAP-IP-placement-2 LDAP-IP 50: testvm2
> location LDAP-placement-1 LDAP-clone 100: testvm3
> location LDAP-placement-2 LDAP-clone 50: testvm2
> colocation BIND-with-IP inf: BIND-IP BIND-clone
> colocation LDAP-with-IP inf: LDAP-IP LDAP-clone
> order BIND-after-IP inf: BIND-IP BIND-clone
> order LDAP-after-IP inf: LDAP-IP LDAP-clone
> property $id="cib-bootstrap-options" \
>         dc-version="1.0.5-462f1569a43740667daf7b0f6b521742e9eb8fa7" \
>         cluster-infrastructure="openais" \
>         expected-quorum-votes="3" \
>         stonith-enabled="false" \
>         symmetric-cluster="false" \
>         no-quorum-policy="ignore"
> 
> Am I missing something?
> 
> Thanks again!
> 
> -erich
> 




More information about the Pacemaker mailing list