Pacemake not failover when nginx service down

544 views Asked by At

I have setup HA-Cluster for nginx. So when nginx or node fail, then it will failover to second node.

pcs status Cluster name: push_noti_cluster Stack: corosync Current DC: push2 (version 1.1.18-11.el7_5.3-2b07d5c5a9) - partition with quorum Last updated: Tue Jul 31 11:29:16 2018 Last change: Tue Jul 31 09:20:05 2018 by root via cibadmin on push1

2 nodes configured 3 resources configured

Online: [ push1 push2 ]

Full list of resources:

virtual_ip (ocf::heartbeat:IPaddr2): Started push1 Clone Set: Nginx-clone [Nginx] Started: [ push1 push2 ]

Daemon Status: corosync: active/enabled pacemaker: active/enabled pcsd: active/enabled You have new mail in /var/spool/mail/root [root@server1 ~]#

Failover work fine when we stop cluster service using pcs cluster stop on either of these nodes or rebooting the servers.

What we want to achieve is to perform the resource failover when nginx on host node01 stop running and both the resources virtual_ip/webserver should failover to second host node02.

Is it possible to do a service level failover? I.e. when one of resource fails in one node (node01), all the configured resources (here virtual_ip/webserver) should failover to other node (node02).

1

There are 1 answers

0
Ivan Gurzhiy On

From what you write, I see there is not configured that "active" node must be that node where present active nginx(any needed service).

Try to check your configuration with examples from this site. https://wiki.clusterlabs.org/wiki/Example_configurations#Failover_IP_.2B_One_service