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

[option] to skip ostree-finalize-stage #2281

Open
damianatorrpm opened this issue Oct 23, 2020 · 6 comments
Open

[option] to skip ostree-finalize-stage #2281

damianatorrpm opened this issue Oct 23, 2020 · 6 comments

Comments

@damianatorrpm
Copy link

damianatorrpm commented Oct 23, 2020

The rpm-ostree upgrade relies on a clean reboot to run the ostree-finalized-stage
@cgwalters mentioned that it is possible to run ostree-finalized-stage manually
but this would result in new changes to /etc to not be propagated into the new deployment

If possible add an option to rpm-ostree to run ostree-finalized-stage,
maybe printing a warning message or make /etc read-only

A lot of people are used to 'reboot' 'eject usb safely' via a hardware related action.
Usecase: be able to enable automatic rpm-ostree updates via the timer,
but not rely on clean reboot at all.

@cgwalters
Copy link
Member

The API for this is basically systemctl stop ostree-finalize-staged.service.

I don't quite understand though the concern about "clean reboot". What's the problem with that?
Is this something like ostreedev/ostree#1924 ?

What you should really do today is change the grub option to disable os-prober if so.

@damianatorrpm
Copy link
Author

damianatorrpm commented Oct 23, 2020

Many people I know, know as equivalelent to reboot - press and hold the power button.
In this case ostree-finalize-staged.service would never be run and nothing would be updated.

Unrelated:
I don't know about grub, now I took this patch and converted to systemd with no seperate /boot partition:
ostreedev/ostree#1967

@cgwalters
Copy link
Member

Many people I know, know as equivalelent to reboot - press and hold the power button.
In this case ostree-finalize-staged.service would never be run and nothing would be updated.

Ah. But you'd only do the "long press" in cases where the kernel/system has locked up right? On most hardware you can short-press the power button (or just click something in a UI) to initiate a soft reboot...how often are you hitting this hard reboot case?

@damianatorrpm
Copy link
Author

damianatorrpm commented Oct 23, 2020

First, thanks for taking the time to discuss this.

On the own workstation machine, I prefer to press the reset button,
on my not private workstation machine, which due to covid is at home now, usually I take it by the power cord,
since it randomly starts at night otherwise (a windows machine, configured to do so for updates, even when powered off,
I suppose AC-Wake in BIOS or smth).

I've seen friends of mine using a workstation PC, I haven't seen them on any OS pressing reboot (via software),
but do it the easier way. (and not all users are power linux user like).

So rpm-ostree would need to be configured on their machines to do auto-updates
and not overwhelm them with that they have to cleanly reboot because...
(true, it's unlikely they will edit /etc either)

On the laptop different stuff: Fedora's GNOME has the power button set to standby horrible.
the reason is not that the behavior itself is bad, but that using Fedora I have had so many
cases where something was still running to detect that press to standby/wake but the system
was in a broken state (GNOME somewhat crashed, and these are usually the bug reports
that are closed with Fedora $version EOL messages, maybe machine specific, maybe weather...,
either way, these are usually not reproducable just random and for some other reason the log files
stop at one point and than continue after the reboot - no crash entry, but this is another story).
After 10 attempts or so (if you forget to change the power button behavior)
you manage to reboot it. (ACER SA5-271 - cant take out battery)

So what I want to achieve is the best possible automatic-update installation
without clean reboot.

@jlebon
Copy link
Member

jlebon commented Oct 23, 2020

Not sure, I guess we could add an option in rpm-ostree for this though it'd essentially be re-introducing the bug that staging fixed.

Maybe simplest is to just have your systemd timer do rpm-ostree upgrade && ostree admin finalize-staged?

@damianatorrpm
Copy link
Author

@jlebon this should work, but then maybe make ostree admin finalize-staged put /etc readonly to prevent that issue that staging fixed (I hope you mean that?) to be triggerred accidenly

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

3 participants