[ClusterLabs] Apache Active Active Balancer without FileSystem Cluster
Ken Gaillot
kgaillot at redhat.com
Mon Jun 13 14:20:43 UTC 2016
On 06/13/2016 08:06 AM, Klaus Wenninger wrote:
> On 06/13/2016 02:33 PM, alan john wrote:
>> Dear All,
>>
>> I am trying to setup an Apache active-active cluster. I do not wish
>> to have common file system for both nodes. it i However I do not like
>> to have pcs/corosync to start or stop apache, but monitor it and move
>> only VIP to secondary node and on recovery pull it back. Would this
>> be practically possible or do you think it is not-achievable.
>>
>>
>> I have following constraints.
>>
>> 1. Virtual IP is not where apache is not running. --- Could not achieve.
>> 2. Node 1 is priority ----- Works fine
>> 3. pcs should not start/ stop apache -- Works fine using un-managed
Unmanaged won't let you achieve #1.
It's a lot easier to let the cluster manage apache, but if you really
want to go the other way, you'll need to write a custom OCF agent for
apache.
Start/stop/monitor should use the ha_pseudo_resource function in
ocf-shellfuncs so the agent can distinguish "running" from "not running"
(itself, not apache).
The monitor command should additionally check apache (you can copy the
code from the standard agent), and set a node attribute with apache's
status.
Clone the agent so it's always running everywhere apache might run.
Finally, set a location constraint for your VIP using a rule matching
that node attribute.
So, if apache fails, the new agent detects that and updates the node
attribute, and pacemaker moves the VIP away from that node.
>> 4. send mail when vip gets switched or cluster status changes -- guess
>> achievable.
> Check out the new alerts-feature in pacemaker 1.1.15 for that.
>> 5. pcs monitor apache process id and responses to satisfy Pt1.
>>
>> Regards,
>> Alan
More information about the Users
mailing list