-
Notifications
You must be signed in to change notification settings - Fork 305
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
Roll back an update and use of /proc/cmdline #380
Comments
We should include I guess your last point is important - you're trying to do a rollback from inside the initramfs? And crucially how do you detect "bogus tree"? |
Yes. The idea is to have a "boot-flags" file that records if the last boot of a tree is successful or not and the tries left for it. When doing a deployment, we set We mark a tree as successful when the user is able to log in to a gnome session. |
It seems like the simplest might be to not try to change the bootloader configuration in the initramfs, but to teach The slightly ugly part is that we probably don't want to drag libostree into the initramfs...but the alternative is duplicating the bootloader parsing code. |
See also coreos/rpm-ostree#177 |
We're trying to implement a roll back scheme so if you deploy a bogus tree you roll back to the previous one.
To do that we create a dracut service that checks if the last boot succeeded and if it didn't, it swaps the bootloader configuration.
At the time we roll back, since we're already booted,
/proc/cmdline
will have the old tree andostree-prepare-root
will use that causing the bogus tree to boot again. To fix it we bind-mount a file with the newostree=
value on/proc/cmdline
.Since this is pretty hacky, I wanted to start a discussion on how to do it in a cleaner way, passing the information of the tree to boot in another way. In addition, note that
ostree admin
also relies on the information in/proc/cmdline
.In the future, if we move this logic to the bootloader (instead of doing it in the
initramfs
) we won't have this problem but we're not quite there yet.The text was updated successfully, but these errors were encountered: