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

switch to being a systemd service #2

Open
cgwalters opened this issue Dec 1, 2022 · 2 comments
Open

switch to being a systemd service #2

cgwalters opened this issue Dec 1, 2022 · 2 comments

Comments

@cgwalters
Copy link
Collaborator

Right now we have a lot of simplicity by not running under systemd. But there are a lot of advantages to doing so; see e.g. https://github.com/coreos/bootupd#questions-and-answers

All of the below applies to us too:

  • Why is bootupd a daemon?

It's not, really. The name was intended to be "bootloader-upDater"
not "bootloader-updater-Daemon"; the choice of a "d" suffix is
in retrospect probably too confusing.

At a technical level, yes there is a socket-activated systemd service
which will spawn a bootupd.service. However - the service will
very quickly auto exit. There's nothing long-running, so it's
not really a daemon.

The rationale behind this design is:

  • Using a systemd service provides a robust natural "locking"
    mechanism.
  • Using a systemd service ensures that critical logging metadata
    always consistently ends up in the systemd journal, not e.g.
    a transient client SSH connection.
  • systemd services can easily have sandboxing applied, and
    while bootupd is obviously privileged we can still make use
    of some of this.
  • Ultimately, we do probably want a non-CLI API (whether that's
    DBus or Cap'n Proto or varlink or something else). Having
    a socket (without a defined stable API) is preparatory work for that.
@cgwalters
Copy link
Collaborator Author

Was thinking about this more recently, and there's an alternative path where we actually default to running in a container instead (maybe crun executed on the host rootfs) - but the point is that we avoid relying on too many systemd features because we ideally also support being executed from a privileged container for updates.

@cgwalters
Copy link
Collaborator Author

If we ran from a systemd unit by default it'd make it easier to use https://systemd.io/CREDENTIALS/ for container pull secrets; also xref containers/image#1746

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