I created a 2 node cluster..
# pcs resource config
Group: nodeapp
Resource: clusterip (class=ocf provider=heartbeat type=IPaddr)
Attributes: cidr_netmask=24 ip=10.6.151.103 nic=ens224:0
Operations: monitor interval=100 (clusterip-monitor-interval-30)
start interval=0s timeout=20s (clusterip-start-interval-0s)
stop interval=0s timeout=20s (clusterip-stop-interval-0s)
Resource: node_disk (class=ocf provider=heartbeat type=Filesystem)
Attributes: device=/dev/mapper/tomcat_vg-tomcat_lv directory=/mnt/tomcat fstype=ext4
Operations: monitor interval=20s timeout=40s (nodeapp_disk-monitor-interval-20s)
start interval=0s timeout=60s (nodeapp_disk-start-interval-20s)
stop interval=0s timeout=60s (nodeapp_disk-stop-interval-0s)
Resource: tomcatserver (class=ocf provider=heartbeat type=tomcat)
Attributes: catalina_base=/mnt/tomcat/apache-tomcat-9.0.65 catalina_home=/mnt/tomcat/apache- tomcat-9.0.65 catalina_tmpdir=/mnt/tomcat/apache-tomcat-9.0.65/temp java_home=/usr/lib/jvm/jre-openjdk name=-Djava.security.egd=file:///dev/urandom statusurl=10.6.151.103:8080 tomcat_user=root
Operations: stop interval=0s timeout=90s (tomcatserver-stop-interval-0s)
monitor enabled=false interval=60s (tomcatserver-monitor-interval-60s)
start interval=0s timeout=360s (tomcatserver-start-interval-0s)
Resource: patchmanager (class=service type=patchmanager)
Operations: monitor interval=60s timeout=60s (patchmanager-monitor-interval-60s)
start interval=0s timeout=90s (patchmanager-start-interval-0s)
stop interval=0s timeout=100 (patchmanager-stop-interval-0s)
The issue is I want tomcat to run as usertomcat rather than root.. so I changed the resource config setting tomcat_user=root to tomcat_user=tomcat unfortunately after this change when the cluster moves from one node to another-- the file ownership of all tomcat folders is changed to chrony ownership..