Skip to content
Snippets Groups Projects
user avatar
Iustin Pop authored
Currently, the supplised script has two issues:
  - it doesn't use start-stop-daemon --start correctly, leading to
    messages like "ganeti.errors.GenericError:
    /var/run/ganeti/ganeti-rapi.pid contains a live process" in the logs
  - it doesn't allow start/stop/restart of a single daemon, which leads
    to manual launch, which is bad because we don't reuse the settings
    from the defaults file

For the first one, we change from ‘--exec …’ to ‘--startas …’, which is
the actual option used for start, whereas exec is a test (that also
supplies the default to startas). We also add ‘--oknodo’ as per recent
Debian policy changes.

For the second, we do a bigger change; we basically remove the full-path
and pid variables, and construct these two from the daemon name. We then
check if we are given a daemon name (in which case we only do that)
otherwise we do the requested action on all daemons.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
82cd7760
Name Last commit Last update