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

Provide greenboot.target and replace greenboot-healthcheck.service by individual units #138

Open
BreiteSeite opened this issue Apr 8, 2024 · 0 comments

Comments

@BreiteSeite
Copy link

BreiteSeite commented Apr 8, 2024

Thanks for this project. I think it's a really nice idea and can be a life-saver to administrate a headless Raspberry Pi.

I wonder there is some potential to simplify the health-check execution. Disclaimer: i'm a big fan of systemd but also not very well versed in either systemd or greenbot and i'm always learning. :)

Provide greenbot.target

This can be RequiredBy=boot-complete.target (if i understand the boot-complete.target correctly.)

Convert the health checks to systemd.service one-shot units

They can be RequiredBy=greenboot.target

I think the fact that greenbot itself has required. and wanted.d is a good indicator that it duplicates systemd logic.

This would also make greenboot-healthcheck.service obsolete.

This would have the following benefits:

  • The script doing the logging that healthchecks are run would be a bit obsolte, systemd already provide everything in the journal and tools to visualize the dependency graph (like systemd-analyze critical-path).
  • The health checks themselves have appropriate dependencies (like health-checks requiring a network can depend on network-only.target)
  • health checks would automatically run in parallel. I think ordering based on file-names does not make sense. systemd dependency and ordering should be used.
  • Admins can easily disable specific health-checks (would make provide mechanism for disabling certain default health checks #119 obsolete). This also means if all health-checks that require network are disabled, boot would be way quicker because greenbot wouldn't wait for the network.
  • Admins can use all the other fancy systemd functionality to extend/hook-into the integrated health checks
  • It would simplify usage of greenbot, because there is only one way that would be needed to be maintained
  • It abstracts away the whole shell script thing. Each healthcheck can use whatever runtime it wants. Also no more dependency on shell for boot checks is nice i guess.
  • Third party checks can just require/want the greenbot.target and order themselves accordingly how they desire.

Let me know what you think. I would be also happy to try to contribute development efforts, if my freetime allows and the idea is generally accepted.

@BreiteSeite BreiteSeite changed the title Provide greenbot.target and replace greenboot-healthcheck.service by individual units Provide greenboot.target and replace greenboot-healthcheck.service by individual units Apr 8, 2024
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

1 participant