Skip to content
  • Flore Harlé's avatar
    feat(main)!: use watchdog of SystemD · 2e636de7
    Flore Harlé authored
    The launcher and the watchdog of flexisip are removed and replaced by
    the services management of SystemD that provides a watchdog. The
    behavior of a Flexisip service is configured in the SystemD unit
    files. By default, a service notifies SystemD once startup is
    complete, using `Type=notify`. The SystemD watchdog is then enabled,
    and the service's main loop periodically notifies the watchdog to
    confirm that the process is alive and not blocked. The watchdog
    timeout is configured in the service's unit file by `WatchdogSec` (10s
    by default), while the main loop notification interval is set via the global
    parameter `watchdog-notify-interval` (1s by default).
    
    Flexisip now uses `Restart=on-failure` in its SystemD service units by
    default. This ensures that if a service crashes, exits with a non-zero
    status or fails to notify the watchdog before the timeout, SystemD
    automatically restarts it. SystemD also restarts if the
    RESTART_EXIT_CODE is received (`RestartForceExitStatus=5`). There is
    a delay `RestartSec` before restarting the service. If the startup
    fails, the service is not restarted.
    
    The option `--daemon` in command line is not used anymore to start a
    service.
    
    The option `--disable-stdout` in command line is added to disable the
    display of logs in standard output. This option is used in the
    configuration of the Flexisip services for SystemD.
    
    The global parameter `auto-respawn` is not used anymore.
    
    The library libsystemd is used to notify SystemD, if
    ENABLE_SYSTEMD=ON (default on linux).
    
    Update mainTester : the test starts a server with all services and
    check that the proxy is properly initiated by sending a request with
    cli. Then the server is stopped and the test checks that it exited
    cleanly.
    
    Update docker images with library for SystemD.
    
    Update readme and changelog.
    2e636de7