Use systemd notify protocol when services have started
Description
A smarter way to tell systemd when services have successfully started than just waiting 1 second and hoping.
How Has This Been Tested?
Deployed on xcaltst, and checked the logs in the journal. The line from systemd saying that the service is started comes after the service's own startup stuff:
Sep 16 16:32:48 max-exfl460.desy.de systemd[4663]: Starting XFEL offline calibration ZMQ service...
Sep 16 16:32:48 max-exfl460.desy.de webservice[3165155]: root - INFO - [webservice.py:1644] Adding /home/xcaltst/deployments/developme>
Sep 16 16:32:49 max-exfl460.desy.de webservice[3165155]: git.cmd - DEBUG - [cmd.py:1057] Popen(['git', 'pull', '-v', '--', 'origin'], >
Sep 16 16:32:49 max-exfl460.desy.de webservice[3165155]: git.cmd - DEBUG - [cmd.py:656] AutoInterrupt wait stderr: b''
Sep 16 16:32:49 max-exfl460.desy.de webservice[3165155]: root - INFO - [webservice.py:136] Config repo is initialized
Sep 16 16:32:49 max-exfl460.desy.de webservice[3165155]: root - INFO - [webservice.py:65] Initializing database
Sep 16 16:32:49 max-exfl460.desy.de webservice[3165155]: oauth2_xfel_client.oauth2_client_backend - DEBUG - [oauth2_client_backend.py:>
Sep 16 16:32:49 max-exfl460.desy.de webservice[3165155]: urllib3.connectionpool - DEBUG - [connectionpool.py:1022] Starting new HTTPS >
Sep 16 16:32:49 max-exfl460.desy.de webservice[3165155]: urllib3.connectionpool - DEBUG - [connectionpool.py:475] https://internal.xfe>
Sep 16 16:32:49 max-exfl460.desy.de webservice[3165155]: oauth2_xfel_client.oauth2_client_backend - DEBUG - [oauth2_client_backend.py:>
Sep 16 16:32:49 max-exfl460.desy.de webservice[3165155]: oauth2_xfel_client.oauth2_client_backend - DEBUG - [oauth2_client_backend.py:>
Sep 16 16:32:49 max-exfl460.desy.de systemd[4663]: Started XFEL offline calibration ZMQ service.
Types of changes
- New feature (non-breaking change which adds functionality)
Checklist:
- My code follows the code style of this project.