Skip to content

RFC: updating scripts to use supervise-daemon #28

Open

Description

@mqqc

A lot of current initscripts either run without supervision entirely or run under start-stop-daemon,
using pidfiles which are inherently subject to race conditions and don't provide proper supervision.

While supervise-daemon also has its flaws, in the context of OpenRC it may be the easiest method to provide proper supervision for services, making sure we get notified when services die and they can be automatically restarted, in a configurable way.

Would you be open to updating (or having me update, of course) the initscripts in meta-openrc to use supervise-daemon as a guiding principle (that is, wherever appropriate and possible)?

Activity

  1. jsbronder commented on Apr 14, 2023

    @jsbronder
    Owner

    I'm a bit hesitant as neither Gentoo nor Alpine have fully committed to supervise-daemon yet [1][2]. There aren't too many users of this layer whereas there's a lot of Gentoo and Alpine users who are providing a lot of "testing" every day. Is there a possibility to support both but default to start-stop-daemon? Ideally we'd be able to enable supervision on a per-recipe basis.

    The layer is already mostly using the declarative style for init scripts; would it be as simple as making sure that we set command appropriately in each init script and define command_args/command_args_foreground where appropriate? I haven't looked closely, but your work in #26 makes me think this might be possible.

    1. https://wiki.gentoo.org/wiki/OpenRC/supervise-daemon
    2. https://lists.alpinelinux.org/~alpine/devel/%3C3LLUI2KOULSYM.359WA6HATX45B%408pit.net%3E (most recent discussion I could easily find, perhaps there's something newer).
  2. mqqc commented on Apr 17, 2023

    @mqqc
    ContributorAuthor

    Yes, to clarify, I mean on a per-recipe basis instead of as a global default; that the initscripts in this repo by and large (where possible and appropriate) use supervision as a guideline, but not as a globally enforced default in rc.conf or something like that.

    The layer is already mostly using the declarative style for init scripts; would it be as simple as making sure that we set command appropriately in each init script and define command_args/command_args_foreground where appropriate? I haven't looked closely, but your work in #26 makes me think this might be possible.

    That is entirely correct, yep.

  3. jsbronder commented on Apr 17, 2023

    @jsbronder
    Owner

    Sounds like a great direction in that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions