Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: updating scripts to use supervise-daemon #28

Open
mqqc opened this issue Apr 13, 2023 · 3 comments
Open

RFC: updating scripts to use supervise-daemon #28

mqqc opened this issue Apr 13, 2023 · 3 comments

Comments

@mqqc
Copy link
Contributor

mqqc commented Apr 13, 2023

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)?

@jsbronder
Copy link
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).

@mqqc
Copy link
Contributor Author

mqqc commented Apr 17, 2023

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.

@jsbronder
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants