Comment 66 for bug 1874075

Revision history for this message
Nicolas Bock (nicolasbock) wrote :

On bionic the rabbitmq-server process returns with exit code 0
regardless of whether it managed to start the server or not.
Presumably this behavior is the reason for the ExecStartPost. If I
change the service to type notify then systemd notices that the
ExecStart command fails to start and the ExecStartPost is not
necessary (it is never executed then). However the end result seems to
be the same --> Let's leave the type as simple.

When I add Restart=on-failure the call to `systemctl start
rabbitmq-server` returns with an error message, but the
rabbitmq-server service is restarted every 10 seconds anyway.

I don't know whether the non-blocking of `systemctl start` will cause
issues, but the cluster now recovers as soon as the other broker is
started.

The relevant changes to the service file are:

[Service]
TimeoutStartSec=600
Restart=on-failure
RestartSec=10