Hello, i want to setup a webserver cluster with two nodes in an
active-active configuration. I've a DNS name for the cluster:
www.example.com. This name is resolved by DNS with the round-robin
technique with two IP 10.0.0.1 and 10.0.0.2. I MUST use a heartbeat
version 2.0.7 (Debian 4.0 Etch).
I want to configure HB to achieve this:
1) On a normal situation (2 nodes running) each node must have one IP
and one apache running.
2) If one apache is failed on one node the IP on this node must migrate
to the remaning node.
3) When a node that had failures is repaired then the IP and the Apache
must return to run on that node.

My first setup was:
 * Resources
    - IP1:IPaddr2(OCF)
    - IP2:IPaddr2(OCF)
    - WebServer(clone max:2 node_max:1):apache(OCF)
 * Costraints:
    - IP1_where_WebServer
    - IP2_Where_Webserver
Initially the resource are equally balanced on the two nodes like this:
 * node1
    - IP1
    - WebServer_istance:0
 * node2
    - IP2
    - WebServer_istance:1
When one webserver instance fails, the IP that runs on the same node
doesn't migrate on the other node. This is not the behavior that i want.
So I decided to try another setup:
 * Resources
    - Group1(ordered, collocated)
         IP1:IPaddr2(OCF)
         WebServer1:apache(OCF)
    - Group2(ordered, collocated)
         IP2:IPaddr2(OCF)
         WebServer2:apache(OCF)
Initially the resource are equally balanced on the two nodes like this:
* node1
    - Group1
         IP1
         WebServer1
* node2
    - Group2
         IP2
         WebServer2
When one webserver instance fails, the IP that runs on the same node
migrate on the other node with the apache resource. This is a good
approximation of what I want (the illusion of two running WebServers
isn't pretty but it works). Now, to restore the migrated IP and
WebServer i've reset the fail-counts of every resource but they don't
come back to their original running node. This in not what i want. Only
If I restart the service on the node where the resource was failed then
the entire group migrate on the original node.
There is anyone that could suggest me a better way to obtain what i
need?
Thanks in advance

-- 
Michele Codutti
Centro Servizi Informatici e Telematici (CSIT)
Universita' degli Studi di Udine
via Delle Scienze, 208 - 33100 UDINE
tel +39 0432 558928
fax +39 0432 558911
e-mail: michele.codutti at uniud.it

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to