RHEL High-Availability Cluster using pcs, configuring service as a resource
0
votes
2
answers
2897
views
I have a 2 node cluster on RHEL 6.9. Everything is configured except I'm having difficulty with an application launched via shell script that created into a service (in
/etc/init.d/myApplication
), which I'll just call "myApp". From that application, I did a pcs resource create myApp lsb:myApp op monitor interval=30s op start on-fail=standby
. I am new to using this suite of software but it's for work. What I need is for this application to be launched on both nodes simultaneously as it has to be started manually so if the first node fails, it would need intervention if it were not already active on the passive node.
I have two other services:
-VirtIP (ocf:heartbeat:IPaddr2)
for providing a service IP for the application server
-Cron (lsb:crond)
to synchronize the application files (we are not using shared storage)
I have the VirtIP and Cron as dependents via colocation to myApp.
I've tried master/slave as well as cloning but I must be missing something regarding their config. If I take the application offline, pacemaker does not detect the service has gone down and pcs status
outputs that myApp is still running on the node (or nodes depending on my config). I'm also sometimes getting the issue that the service running the app is stopped by pacemaker on the passive node.
Which is the way I need to configure this? I've gone through the RHEL documentation but I'm still stuck. How do I get pacemaker to initiate failover if myApp service goes down? I don't know why it's not detecting the service has stopped in some cases.
EDIT: So for testing purposes, I removed the password requirement for starting/restarting and the service starts/restarts fine as expected and the colocation dependent resources stop/start as expected. But stopping the myApp service does not reflect as a stopped resource but simply stays at Started node1. Likewise, simulating a failover via putting node1 into standby simply stops all resources on node1.
Asked by Greg
(187 rep)
Sep 29, 2017, 07:52 AM
Last activity: Sep 6, 2023, 09:56 PM
Last activity: Sep 6, 2023, 09:56 PM