rpm-software-management / dnf-plugin-system-upgrade

A DNF plugin for system upgrades (moved to dnf-plugins-extras!)
GNU General Public License v2.0
24 stars 22 forks source link

prevent reboot loops #37

Closed kparal closed 8 years ago

kparal commented 9 years ago

There are numerous people reporting they are stuck in a reboot loop when attempting upgrade. That's the worst outcome we can get, because suddenly their system is "bricked", and it's not easy to fix. Some of them might be Chinese, due to the this bug, but it seems not all of them. So there are some other issues as well.

We need to make failures more resistant. Because currently, when this fails to start, due to whatever dnf or python error, the system is stuck in a reboot loop, because /system-update is never removed:

ExecStart=/usr/bin/dnf --releasever=${RELEASEVER} system-upgrade upgrade

I suggest to change it to something like this:

ExecStart=/usr/bin/bash -c "/usr/bin/dnf --releasever=${RELEASEVER} system-upgrade upgrade || (/usr/bin/rm -f /system-update; false)"

We need to verify whether the $RELEASEVER envvar will work as intended. We can also create a bash script for this, if we don't want to have it all on a single command line. But I think this is really important, because we need to ensure people won't end up in reboot loops if the system-upgrade command fails to start for any reason.