2

Following is the service scripts which runs custom script.

[root@xxxxxxxxxxvmrf0001vbisalah001 ~]# cat 
/etc/systemd/system/drbdRes_rhcdDaemon.service
[Unit]
Description=Manage drbdRes cluster service
After=basic.target
Requires=basic.target

[Service]
Type=forking
RemainAfterExit=yes
ExecStart=/opt/ngms/ha.d/drbdRes_rhcdDaemon.sh start
ExecStop=/opt/ngms/ha.d/drbdRes_rhcdDaemon.sh stop

[Install]
WantedBy=multi-user.target

And created resource using below command

pcs resource create MNGT_drbdRes_rhcdDaemon systemd:drbdRes_rhcdDaemon op monitor interval=10s --group MNGT

Resource will start, but if i kill the process still pcs resource status shows resource has been started.

I have put debug logs in start/stop/status in /opt/ngms/ha.d/drbdRes_rhcdDaemon.sh script. Debug logs are generated at start and stop but not at status. I feel resource has been not monitored.

Vijay S B
  • 185
  • 1
  • 4

0 Answers0