systemd

Helper module for systemd service readiness notification.

oslo_service.systemd.notify()

Send notification to Systemd that service is ready.

For details see http://www.freedesktop.org/software/systemd/man/sd_notify.html

oslo_service.systemd.notify_once()

Send notification once to Systemd that service is ready.

Systemd sets NOTIFY_SOCKET environment variable with the name of the socket listening for notifications from services. This method removes the NOTIFY_SOCKET environment variable to ensure notification is sent only once.

oslo_service.systemd.onready(notify_socket, timeout)

Wait for systemd style notification on the socket.

Parameters:
  • notify_socket (string) – local socket address
  • timeout (float) – socket timeout
Returns:

0 service ready 1 service not ready 2 timeout occurred