dnf-plugin-system-upgrade icon indicating copy to clipboard operation
dnf-plugin-system-upgrade copied to clipboard

RFE: prompt or cancelable delay on reboot command

Open mattdm opened this issue 10 years ago • 4 comments

I'm seeing some feedback like this from this article on upgrading Fedora :

This will trigger a reboot (immediately - you might be startled by how suddenly it reboots, so make sure you are ready)

Could we make this command prompt to continue (unless -y is given)?

mattdm avatar Nov 10 '15 15:11 mattdm

Pardon my insouciance, but maintaining special code to help people who are startled by the fact that fedup reboot makes their system reboot doesn't seem like the best use of developer resources.

On the other hand, I'd probably accept a patch that made the reboot subcommand use shutdown -r instead, with options/arguments to change the TIME parameter (and a sensible WALL message)...

wgwoods avatar Nov 10 '15 22:11 wgwoods

Pardon my insouciance, but maintaining special code to help people who are startled by the fact that fedup reboot makes their system reboot doesn't seem like the best use of developer resources.

Point, but let me counter that this is contrary to DNF's general behavior — it normally prompts you to accept before doing anything which will add, remove, or upgrade packages... which rebooting into the upgrade environment at this point certainly will.

mattdm avatar Nov 10 '15 22:11 mattdm

And I guess I'll also add that if I had been faster or louder (or both) about "keep it fedup, even with dnf under the hood", I probably wouldn't be writing this, since the expectations could be logically more different. Ah well, here we are.

mattdm avatar Nov 10 '15 22:11 mattdm

Point, but let me counter that this is contrary to DNF's general behavior — it normally prompts you to accept before doing anything which will add, remove, or upgrade packages...

Sure. But you could think of the separate reboot command as an implicit confirmation prompt:

Download complete.
Type the words 'dnf system-upgrade reboot' below to begin the upgrade:
#

This was kind of the intent of the design, after all.

Here's the deal. There's really three steps being performed here: download, prep, and reboot. fedup did the prep work automatically at the end of the download, and then you got to handle the reboot manually, at your leisure. Which led to a lot of unexpected surprises, like:

  • Some people waited a while, then forgot that their system was prepped for upgrade, and when they rebooted later the upgrade was a total surprise
  • The download complete messages listed all the packages that might have problems, but if you install/remove any of them then the upgrade transaction might not work
  • Once the messages from fedup are off-screen it wasn't obvious how to disarm the upgrade, or whether it was still going to happen

And so on. Now, instead, we have download as one step, but the prep doesn't happen automatically. You still get to handle the reboot manually, at your leisure, but you have to use the special fedup reboot command to do it. It's simple, it's still manually-triggered, and it's a good bit more predictable than what we had before.

All that said, I'd be fine with a patch that added a flag for reboot (or maybe a new prep subcommand) that skips the reboot and just does the prep, for people who want to do the actual reboot their own way. But I don't think that would make good default behavior; it seems like it would be really confusing to most users if we added a required middle step between download and reboot.

wgwoods avatar Nov 11 '15 19:11 wgwoods