Home_greyopenFATE - openSUSE feature tracking > #306966
Dashboard | Search | Sign up | Login

Please login or register to be able to edit or vote this feature.

[Beta2] No Shutdown/Suspend During Package Update

Feature state

openSUSE-11.3
Done

Description

During a package update, it should not be possible to shutdown or suspend the system. Such requests should be delayed until the package update is finished. You do not want to bring the system in an inconsistent state. I consider this a desktop feature, so if somebody runs halt/shutdown on the console, this might not need to work - but if the GNOME/KDE shutdown/suspend options are used, it should finish the update first.

Note: Windows does not allow shutdown during an update.

What happened and let me to report this as feature: A user installed a kernel update and thought the update was finished. But only one out of the three kernel packages was updated and therefore after a reboot, the system did not came up completely.

User benefit:

If this feature is not implemented, people can get broken systems - which might result in support calls.

Relations

Discussion


icons/user_comment.png M. N. wrote: (8 years ago)

Seems obvious since system integrity should be a primary goal.

icons/user_comment.png R. U. wrote: (8 years ago)

make critical time as short as possible:

1. firstly download all packages (not critical)

2. after finished download start installing (critical phase)

Don't make download and install in parallel an option!

icons/user_comment.png R. D. wrote: (8 years ago)

No!  The critical time would be minimised, if only a subset of packages with impact for resume were treated specially.

The real cause of the system not coming up properly, was "only one out of the three kernel packages" being updated, so inflicting pre-download of potentially nearly a GB of data is not a good solution.  Use of a fallback kernel ie the traditional sysdmin practice of 
not removing the working running kernel until the newer one proves good.

Critical system packages like kernel, glibc ought to be updated together as a transaction.

The unsafe kernel update method was justified on grounds of avoiding extra disk space usage, so the change to download first of potentially much more data seems inconsistent.

icons/user_comment.png R. D. wrote: (8 years ago)

The request to inhibit Suspend during update does not require minimising cirtical sections.

Increasing availability of Suspend, during system update actually goes against the requester's wish "should be delayed until the package update is finished", after all the system is busy and doing important work.    (point seperate to previous reply as it's logically distincit)

icons/user_comment.png D. M. wrote: (8 years ago)

This feature has two parts.

First, PackageKit already supports inhibiting the suspend and probably we need only to review it.

First part is:

  • Gnome applet does a session inhibit to gnome-power-manager to prevent suspend.
  • Daemon inhibit code is in src/pk-inhibit.c, it talks to HAL, according to Richard this does not do anything in modern devicekit-power systems.

In theory, in the gnome/HAL world this should work, and therefore I wonder why it did not work when PM evaluated it.

  • The above two parts needs to be reviewed by Gnome and Mobile teams. (adding engmgrs)
  • KDE applet needs to do an inhibit too. We can do that (if it is not there), however this is the part that we lack more resources too. I could promise the KDE part for 11.3, but not for SP1. We will try to get it for SP1 if time allows.

Second part is to make it safer, for which we need to switch PackageKit libzypp backend to use the default policy of download first, and then install for all update operations. That can also be done in my team and should be trivial.

icons/user_comment.png R. D. wrote: (8 years ago)

Does this address automatic updates done in background, that the GUI user may not be aware of?

Rather than downloading every single update first, the concept of
critical package sets ought to be used, and the inhibition done at a lower level, which would then be implemented once for all desktops and CLI rather than changes to applets.

Most application updates are not needed to resume system from RAM or disk;  so why force all updates including KDE, OOo  & Mozilla to be done as slow as possible risking failure due to disk full, as if they were kernel, glibc/ld.so and early system boot code?

Installing oS-11.1 a year after release and running updates results in a huge amount of patches and downloads, which if done by download first requires diskspace on every client system!  The "download first" is likely to incovenience very many users, and make a poor impression of update on new installers, leading to reluctance (like most Windows users) to update.

Fate #120340 : Run download and install in parallel ( https://features.opensuse.org/120340 ) is the most popular item for a good reason!  Putting a monster serialisation into every update, when most likely simply fixing the long running kernel update to be done right, like it always should have been done, as one logical transaction would solve 99% of the support problem.

icons/user_comment.png D. M. wrote: (8 years ago)

If all involved stakeholders agree with the above, this can be set to "ready". My team can commit to fix the ZYpp part (and the KDE one for SP1, or 11.3).

icons/user_comment.png S. B. wrote: (8 years ago)

Uwe, could you comment, too?

icons/user_comment.png H. M. wrote: (8 years ago)

First some questions:

  • What is meant by gnome-applet? The PolicyKit gnome applet?
  • What is the daemon inhibit code in src/pk-inhibit.c? At least the PolicyKit in SLE11 doesn't have this

The suspend part at the desktop level should be quite less work, if not even working already. Do we really have a method to inhibit a shutdown/restart, which is also part of this feature? I'm also not sure if it is a good idea to prevent the user from shutting down if he explicitly asks to (with pressing the shutdown button). For doing this right, the action would need to be buffered and performed as soon as the update is finished. This sounds like quite more work.

icons/user_comment.png R. D. wrote: (8 years ago)

The point about physical shutdown and sudden power withdrawal is a very good one!  Resorting to update on shutdown/reboot like Windows would not generally be necessary however.

Multi-version packages solve issue for kernel.  Convenience feature like removing unwanted kernels (say not tagged as Fallback in GRUB configuration) can follow later.

Critical system packages only could be batched for update (pre-downloaded) when going down or coming up (ideally special purposed single-user run level to avoid slow BIOS), so it gracefully shuts down daemons, updates, and then cleanly restarts afterwards.   When rpm(8) supports transactions better then consistency issues can be reduced further.

Interrupted updates could be handled by GUI notification, suggesting resumption via  applet or CLI if that fails.

icons/user_comment.png S. R. wrote: (8 years ago)

The gnome-applet is the gnome-packagekit updater applet (gpk-update-icon)  and the pk-inhibit.c code is part of PackageKit.

The basic infrastructure is available for the gnome updater applet to support this just some of the parts still need to be hooked up and some additional support added in the PackageKit zypp backend (it currently does not issue the inhibit calls because it depends on cancel support).

This can be done for the gnome updater for SP1

icons/user_comment.png S. B. wrote: (8 years ago)

Scott, any update? Is beta 2 doable?

icons/user_comment.png S. R. wrote: (8 years ago)

Submitted for Beta2. Concerns and sugestions about critical package sets and parallel installation (comments 20-23) would need to be addressed separately by PM and libzypp policy team

icons/user_comment.png D. M. wrote: (5 years ago)

Setting to done in 11.3 as it was submitted to SP1 before.

Note that for the future we also have the systemd inhibition APIs (dbus and command line).

Last change: 22 months ago
Voting
Score: 20
  • Negative: 2
  • Neutral: 0
  • Positive: 22
Feature Export
Application-xmlXML   Text-x-logPlaintext   PrinterPrint