If I install tomcat under leap 15.1 it will be automatically controlled by systemd.
This is fine except you are in need of a PID file.
I am going to run tomcat as a resource under the cluster manager pacemaker.
The tomcat OCF interface of pacemaker deals with the PID file and is not working well with tomcat if it is missed. With
the classic process control with the catalina.sh it never was a problem because this scripts contains all the code
for PID file creation/deletion etc.
My question is what i have to do to switch from systemd control back to the classic control unter opensuse ?
Resource under control of OCF script should never be under control of system service manager (be it systemd or sysvinit or upstart), so I do not really understand your question. If you are asking how to disable automatic startup of unit on boot - this is “systemctl disable unit-name”.
The tomcat OCF file coming with pacemaker uses the tomcat/bin/catalina.sh script for start/stop. The tomcat installation
under Leap 15.1 overwrites the normal catalina.sh script with another version of it using systemd. This is the reason
why there is no longer any PID file.
I just installed tomcat with #zypper in tomcat
This automatically prepares the systemd integration.
Is there probably another way to install tomcat to gain an ‘old style’ installation without doing everything manually ?
IIRC you can specify a PID in the Unit file (If you can’t find it, post and I or someone else should be able to find it unless I’m wrong). Of course, specifying a PID during startup avoids having to discover its PID after it’s running (which is usually random and changes each time the process is started).
But,
Although I’m not in front of a Tomcat, whether any SysVinit commands used to manage Tomcat will depend on degree and progress of integration… If no major effort has been implemented yet, you’ll find the commands intact and systemd commands are dynamically created to support the SysVinit service. On the other hand, if integration is well along, you may find that legacy commands are no longer supported and you’ll need to modify your setup accordingly.
Have you looked at the SUSE and LEAP documentation for HA? It’s something in transition, so it’d be important to consult documentation for whatever is likely supported and implemented.
tomcat OCF resource-agent also supports redirecting to systemd:
<parameter name="force_systemd" unique="0" required="0"><longdesc lang="en">
Force use of systemd when available.
</longdesc>
<shortdesc lang="en">Force use of systemd when available</shortdesc>
<content type="string" default="$OCF_RESKEY_force_systemd_default" />
</parameter>
If this does not work for you, or you have valid use case where direct tomcat management works but systemd-based does not, you should open bug report.