Domino on Linux/Unix, Troubleshooting, Best Practices, Tips and more ...

alt

Daniel Nashed

Domino Start Script systemd Support

Daniel Nashed – 6 March 2015 11:54:03
Domino 9.0.1 FP3 IF1 also supports SLES12.
So it is time to finish my work on systemd support which is the new service model used in RHEL7 and SLES12.

Enclosed you find the current description of the changes in the start script for systemd support.
Some parts really need to change to support the new model.
But I am keeping the concept that rc_domino is the main entry point for all your operations.

The following is a short description. I am currently writing the documentation for the new version of the script but it is not yet final.
I have a working version for systemd support but I am still testing and making minor changes.
If you have feedback or want to test it, let me know by mail or write a reply including your e-mail address.

-- Daniel


Domino Start Script systemd Support

Beginning with RHEL7 and SLES12 Linux is using the new "systemd" (http://en.wikipedia.org/wiki/Systemd) for starting services daemons.

All other platforms are also moving to systemd. rc scripts are still working to some extent. but it makes sense to switch to the systemd service model.

Most of the functionality in the Domino start script will remain the same and you will also continue to use the same files and configuration. But the start/stop operations are done by a "domino.service".

The start script will continue to have a central entry point per partition "rc_domino" but that script is not used by the "rc environment" any more. You can place the file in any location and it is not leveraged by systemd.

systemd will use a new "domino.service" per Domino partition. the service file will directly invoke the main script logic "rc_domino_script" after switching to the right user and setting the right resources like number of open files (before this was done with "su - notes" and the limits configuration of the corresponding pam module).

Starting and Stopping the Domino server can be done either by the rc_domino script which will invoke the right service calls in the background. Or directly using the systemd commands.

Starting, Stopping and getting the Status


systemctl start domino.service

systemctl stop domino.service

systemctl status domino.service


Enabling and Disabling the Service


systemctl enable domino.service

systemctl disable domino.service


The service file itself will be located in /etc/systemd/system.

You have to install a service file per Domino partition.
When you copy the file you have to make sure to have the right settings

a.) ExecStart/ExecStop needs the right location for the rc_domino_script (still usually the Domino program directory)

b.) Set the right user account name for your Domino server (usually "notes").

The following example is what will ship with the start script and which needs to be copied to "/etc/systemd/system" before it can be enabled or started.



Systemd service file shipped with the the start script


[Unit]

Description=IBM Domino Server

After=syslog.target network.target


[Service]

Type=forking

User=notes

LimitNOFILE=60000

PIDFile=/local/notesdata/notes.pid

ExecStart=/opt/ibm/domino/rc_domino_script start
ExecStop=/opt/ibm/domino/rc_domino_script stop
TimeoutSec=100

TimeoutStopSec=300

KillMode=none

RemainAfterExit=no


[Install]

WantedBy=multi-user.target



The rc_domino script can be still used for all commands -- including starting and stopping Domino as a service (only "restart live" option is not implemented).

You can continue to have rc_domino with the same or different names in the /etc/init.d directory or put it into any other location. It remains the central entry point for all operations.

But the domino.service can also be started and stopped using "systemctl".

rc_domino uses the configured name of the domino.service (in the header section of rc_domino script).

systemd operations need root permissions. So it would be best to either start rc_domino for start/stop operations with root.

One way to accomplish using root permissions is to allow sudo for the rc_domino script.

The configuration in /etc/sysconfig/rc_domino_config_notes (or whatever your user name is) will remain the same and will still be read by rc_domino_script.

The only difference is that the rc_domino_script is invoked by the systemd service instead of the rc_domino script for start/stop operations.

When invoking start/stop live operations a combination of systemd commands and the existing rc_domino_script logic is used.

New systemd status command

The output from the systemd status command provides much more information than just if the service is started.

Therefore when using systemd the rc_domino script has a new command to show the systemd status output.

The new command is "statusd"

How do you install the script with systemd?

-
Copy rc_domino, rc_domino_script and rc_domino_config_notes to the right locations

- Copy domino.service to etc/systemd/system.

- Make the changes according to your environment

- Enable the service via systemctl enable domino.service and have it started/stopped automatically or start/stop it either via systemd command or via rc_domino script commands.

- rc_domino script contains the name of the systemd service. If you change the name or have multiple partitions you need to change the names accordingly

How does it work?

a.) Machine startup

When the machine is started systemd will automatically start the domino.service.

The domino.service will invoke the rc_domino_script (main script logic).

rc_domino_script will open rc_domino_config_notes for configuration.

b.) Start/Stop via rc_domino

when rc_domino start is invoked the script will invoke the service via systemctl start/stop domino.service

c.) Other script operations

Other operations like "monitor" will continue unchanged and invoke the rc_domino_script.


Links

    Archives


    • [HCL Domino]
    • [Domino on Linux]
    • [Nash!Com]
    • [Daniel Nashed]