[Linux-HA] Colocation confusion

Christian Rishøj christian at rishoj.net
Fri Jun 15 06:02:16 MDT 2007


I have two servers in a master/master setup running MySQL, Lighttpd
and DBRD/OCFS2. Each has a virtual public IP which is used to serve
requests on the webserver:

Node: ska (e9f7c85b-52f4-4aa8-8227-83e167e625bd): online
Node: dub (807e97ee-cba3-400f-9d78-44e7d3d1820b): online

Clone Set: webserver
    lighttpd:0  (lsb:lighttpd): Started dub
    lighttpd:1  (lsb:lighttpd): Started ska
Clone Set: database
    MySQL:0     (heartbeat::ocf:mysql): Started dub
    MySQL:1     (heartbeat::ocf:mysql): Started ska
dubWebIP        (heartbeat::ocf:IPaddr):        Started dub
skaWebIP        (heartbeat::ocf:IPaddr):        Started ska

The cluster is configured to be symmetric. I would like Heartbeat to:

 1. Only start the WebIP resources on nodes where the database and
webserver is started
 2. Failover WebIP resources in case either the database or webserver fail

Thus I have the following constraints:

<rsc_colocation id="skaWebIP_webserver_colocation" from="webserver"
to="skaWebIP" score="INFINITY"/>
<rsc_colocation id="dubWebIP_webserver_colocation" from="webserver"
to="dubWebIP" score="INFINITY"/>
<rsc_colocation id="skaWebIP_database_colocation" from="database"
to="skaWebIP" score="INFINITY"/>
<rsc_colocation id="dubWebIP_database_colocation" from="database"
to="dubWebIP" score="INFINITY"/>

While this seems to ensure that WebIP resources are only started after
the webserver and database, it does not seem to make the WebIP
resources failover.

What constraint am I missing?

Best regards,
Christian


More information about the Linux-HA mailing list