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

support systemd soft reboots #3242

Open
cgwalters opened this issue May 13, 2024 · 2 comments
Open

support systemd soft reboots #3242

cgwalters opened this issue May 13, 2024 · 2 comments

Comments

@cgwalters
Copy link
Member

xref https://www.freedesktop.org/software/systemd/man/latest/systemd-soft-reboot.service.html

We could theoretically do this by default if we detect there's no kernel changes...but per the doc it will cause state leakage in corner cases around things like kernel sysctl.d, module loading blacklists, etc.

systemd (understandably) just made this an opt-in thing. I think to start, we should do the same...just add the basic enablement features of setting up the next root.

Then users that want could invoke e.g.:

ostree prepare-next-root

And hmm... we should have a flag that detects the case where the kernel is skewed, and errors out by default. But in theory we should also allow this, but ensure we've e.g. bind mounted in the old kernel data.

@Mstrodl
Copy link

Mstrodl commented Aug 4, 2024

Kernel differences could be handled with kexec, see #435

Edit: Oh! That's also your issue! Oops.

@cgwalters
Copy link
Member Author

cgwalters commented Aug 29, 2024

Implementing this is going to require some work on ostree-prepare-root.service to be able to run outside of the initramfs and target an explicit root. I don't think it'd be really hard but e.g. one thing we need to do in the general case is set up the composefs mount for example. We also need the /var and /sysroot bind mounts set up in the new deployment root.

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