Features/OfflineSystemUpdates

From FedoraProject

< Features(Difference between revisions)
Jump to: navigation, search
(Scope)
(Scope)
 
(24 intermediate revisions by 4 users not shown)
Line 11: Line 11:
 
== Current status ==
 
== Current status ==
 
* Targeted release: [[Releases/18 | Fedora 18 ]]  
 
* Targeted release: [[Releases/18 | Fedora 18 ]]  
* Last updated: 2012-06-06
+
* Last updated: 2012-07-23
* Percentage of completion: 50%
+
* Percentage of completion: 100%
  
The necessary systemd infrastructure has landed in rawhide with the systemd 183 release.
+
The necessary systemd and PackageKit infrastructure has landed in rawhide with systemd 183 and PackageKit 0.8.1.
The PackageKit and GNOME pieces are still being developed.
+
All the necessary plymouth and GNOME pieces have landed in rawhide with GNOME 3.5.4.
 +
The feature is testable now.
  
 
== Detailed Description ==
 
== Detailed Description ==
  
 
By "offline" OS updates we mean package installations and updates that are run with the system booted into a special system update mode, in order to avoid problems related to conflicts of libraries and services that are currently running with those on disk.
 
By "offline" OS updates we mean package installations and updates that are run with the system booted into a special system update mode, in order to avoid problems related to conflicts of libraries and services that are currently running with those on disk.
 +
 +
Updates will be downloaded in the background, and the user will be informed about available updates only once they are actually ready to be installed.
 +
 +
Installing updates will still be the users choice - if system updates are available, we will offer 'Install Updates & Restart' '''in addition'''
 +
to a plain 'Power Off' in the menus.
  
 
The system update mode is implemented by booting into a special target. The target installs the downloaded updates and then reboots back into
 
The system update mode is implemented by booting into a special target. The target installs the downloaded updates and then reboots back into
the regular default target. For more details, see http://freedesktop.org/wiki/Software/systemd/SystemUpdates  
+
the regular default target. Safeguards are in place to ensure that we reboot back into the default target even if the update fails or the update process crashes. For more details, see http://freedesktop.org/wiki/Software/systemd/SystemUpdates. After logging in again, the user is notified
 +
that system updates have been installed (or that the update has failed).
  
Installing updates will still be the users choice - if system updates are available, we will offer 'Restart and install updates' '''in addition'''
+
Note that this feature does '''not''' prevent you from using yum and other commandline tools to install updates whenever you want to. We also differentiate updates of 'OS components' (which we want to do in this offline fashion) from application updates and installations, which should still
to a plain 'Restart' in the menus.
+
be possible from the UI without restarting the system.
  
Note that this feature does '''not''' prevent you from using yum to install updates whenever you want to. We also differentiate updates of 'OS components' (which we want to do in this offline fashion) from application updates and installations, which should still be possible from the UI
+
The differentiation between 'OS components' and applications is necessarily a heuristic, since Fedora only knows about packages. The initial heuristic
without restarting the system.
+
is that a package is considered an application if it installs a desktop file that is shown in the menus. This is not perfect and can be refined when
 +
additional metadata becomes available.
  
 
Also note that this feature is about implementing offline updates for GNOME. Other spins are not affected, although they could choose to use the same systemd and PackageKit infrastructure, and provide a similar experience.
 
Also note that this feature is about implementing offline updates for GNOME. Other spins are not affected, although they could choose to use the same systemd and PackageKit infrastructure, and provide a similar experience.
Line 40: Line 48:
  
 
== Scope ==
 
== Scope ==
* Update systemd to version >= 183 (done in rawhide)
+
* Update systemd to version >= 183 (done)
* Complete the PackageKit support for offline updates (mostly done upstream)
+
* Complete the PackageKit support for offline updates (done)
 
* Update gnome-packagekit to support offline updates
 
* Update gnome-packagekit to support offline updates
* Update gnome-shell to offer 'Install updates and restart' when updates are available ([[http://bugzilla.gnome.org/show_bug.cgi?id=677394 #677394]])
+
* Update gnome-settings-daemon to support offline updates (done)
* Adjust plymouth to show useful information during the offline update
+
* Update gnome-session to offer a restart dialog ([http://bugzilla.gnome.org/show_bug.cgi?id=679084 done])
 +
* Update gnome-shell to offer 'Install Updates & Restart' when updates are available ([http://bugzilla.gnome.org/show_bug.cgi?id=677394 done])
 +
* Adjust plymouth to show useful information during the offline update (done)
  
 
== How To Test ==
 
== How To Test ==
# Testcase 1: Available system updates
+
# Testcase: Available system updates
 
## Use repositories which have system updates available
 
## Use repositories which have system updates available
 
## Verify that you are not notified about available updates before they have been downloaded
 
## Verify that you are not notified about available updates before they have been downloaded
 
## The 'Software Updates' UI should not offer to directly install system updates
 
## The 'Software Updates' UI should not offer to directly install system updates
 
## The user status menu should have a 'Restart and install updates' item
 
## The user status menu should have a 'Restart and install updates' item
 
 
# Testcase 2: Installing system updates
 
# Testcase 2: Installing system updates
 
## In the situation of testcase 1, choose 'Restart and install updates'
 
## In the situation of testcase 1, choose 'Restart and install updates'
Line 61: Line 70:
 
## Verify that the 'Restart and install updates' menuitem is gone
 
## Verify that the 'Restart and install updates' menuitem is gone
 
## Rebooting the system now will not enter the system update mode, but just reboot as usual
 
## Rebooting the system now will not enter the system update mode, but just reboot as usual
 
+
# Testcase: Update problem
# Testcase 3: Update problem
+
 
## Same situation as testcase 1, but with a package set that will not successfully update (one way to achieve this would be to manually set up a repository with an inconsistent set of updates)
 
## Same situation as testcase 1, but with a package set that will not successfully update (one way to achieve this would be to manually set up a repository with an inconsistent set of updates)
 
## Repeat the same steps as in testcase 2
 
## Repeat the same steps as in testcase 2
Line 68: Line 76:
 
## Verify that you get notified about the failed update attempt
 
## Verify that you get notified about the failed update attempt
 
## Verify that the failed system update is '''not''' tried again if you reboot again
 
## Verify that the failed system update is '''not''' tried again if you reboot again
 
+
# Testcase: Commandline use
# Testcase 4: Commandline use
+
 
## Same situation as testcase 1
 
## Same situation as testcase 1
 
## Open a terminal and run yum update
 
## Open a terminal and run yum update
 
## Verify that this works as before
 
## Verify that this works as before
 
+
# Testcase: Application updates
# Testcase 5: Application updates
+
 
## Use repositories which have application updates available
 
## Use repositories which have application updates available
 
## Open 'Software Updates'
 
## Open 'Software Updates'
 
## Verify that the available updates are listed, and that you can install them without rebooting
 
## Verify that the available updates are listed, and that you can install them without rebooting
 +
# Testcase: Non-privileged user
 +
## Create a user account
 +
## Set up PolicyKit policy so that this user is not allowed to install updates (TODO: details needed)
 +
## Verify that available updates do not cause notifications or other disruptions for this user
 +
# Testcase: Disabling automatic downloads
 +
## Install an override for the setting that controls whether PackageKit downloads updates automatically (TODO: details needed)
 +
## Verify that updates are not downloaded even if they are available
  
 
== User Experience ==
 
== User Experience ==
Line 83: Line 96:
  
 
== Dependencies ==
 
== Dependencies ==
none outside of systemd, packagekit and GNOME components
+
None outside of systemd, packagekit and GNOME components
  
 
== Contingency Plan ==
 
== Contingency Plan ==
Line 100: Line 113:
  
  
[[Category:FeaturePageIncomplete]]
+
[[Category:FeatureAcceptedF18]]
 
<!-- When your feature page is completed and ready for review -->
 
<!-- When your feature page is completed and ready for review -->
 
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->
 
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->
 
<!-- After review, the feature wrangler will move your page to Category:FeatureReadyForFesco... if it still needs more work it will move back to Category:FeaturePageIncomplete-->
 
<!-- After review, the feature wrangler will move your page to Category:FeatureReadyForFesco... if it still needs more work it will move back to Category:FeaturePageIncomplete-->
 
<!-- A pretty picture of the page category usage is at: https://fedoraproject.org/wiki/Features/Policy/Process -->
 
<!-- A pretty picture of the page category usage is at: https://fedoraproject.org/wiki/Features/Policy/Process -->

Latest revision as of 11:42, 23 July 2012

Contents

[edit] Offline Updates using systemd and PackageKit

[edit] Summary

Make updating of system components more reliable by doing it in an minimal, controlled environment.

[edit] Owner

[edit] Current status

  • Targeted release: Fedora 18
  • Last updated: 2012-07-23
  • Percentage of completion: 100%

The necessary systemd and PackageKit infrastructure has landed in rawhide with systemd 183 and PackageKit 0.8.1. All the necessary plymouth and GNOME pieces have landed in rawhide with GNOME 3.5.4. The feature is testable now.

[edit] Detailed Description

By "offline" OS updates we mean package installations and updates that are run with the system booted into a special system update mode, in order to avoid problems related to conflicts of libraries and services that are currently running with those on disk.

Updates will be downloaded in the background, and the user will be informed about available updates only once they are actually ready to be installed.

Installing updates will still be the users choice - if system updates are available, we will offer 'Install Updates & Restart' in addition to a plain 'Power Off' in the menus.

The system update mode is implemented by booting into a special target. The target installs the downloaded updates and then reboots back into the regular default target. Safeguards are in place to ensure that we reboot back into the default target even if the update fails or the update process crashes. For more details, see http://freedesktop.org/wiki/Software/systemd/SystemUpdates. After logging in again, the user is notified that system updates have been installed (or that the update has failed).

Note that this feature does not prevent you from using yum and other commandline tools to install updates whenever you want to. We also differentiate updates of 'OS components' (which we want to do in this offline fashion) from application updates and installations, which should still be possible from the UI without restarting the system.

The differentiation between 'OS components' and applications is necessarily a heuristic, since Fedora only knows about packages. The initial heuristic is that a package is considered an application if it installs a desktop file that is shown in the menus. This is not perfect and can be refined when additional metadata becomes available.

Also note that this feature is about implementing offline updates for GNOME. Other spins are not affected, although they could choose to use the same systemd and PackageKit infrastructure, and provide a similar experience.

[edit] Benefit to Fedora

Replacing libraries and files while the OS is running can cause problems ranging from application crashes to inconsistent system states where processes are using different versions of a library at the same time. By installing system updates 'outside' the normal system operation, we avoid these problems.

Secondary benefits of the work done for this feature include that we are downloading all updates before we notify the user about available updates, and thus avoid unpleasant wait times.

[edit] Scope

  • Update systemd to version >= 183 (done)
  • Complete the PackageKit support for offline updates (done)
  • Update gnome-packagekit to support offline updates
  • Update gnome-settings-daemon to support offline updates (done)
  • Update gnome-session to offer a restart dialog (done)
  • Update gnome-shell to offer 'Install Updates & Restart' when updates are available (done)
  • Adjust plymouth to show useful information during the offline update (done)

[edit] How To Test

  1. Testcase: Available system updates
    1. Use repositories which have system updates available
    2. Verify that you are not notified about available updates before they have been downloaded
    3. The 'Software Updates' UI should not offer to directly install system updates
    4. The user status menu should have a 'Restart and install updates' item
  2. Testcase 2: Installing system updates
    1. In the situation of testcase 1, choose 'Restart and install updates'
    2. Verify that the system shuts down, then restarts in the system update mode
    3. Plymouth should show a spinner or progress bar and inform you that software updates are installed
    4. When this completes, the system should reboot again, bringing you to the login screen
    5. Log in
    6. Verify that the 'Restart and install updates' menuitem is gone
    7. Rebooting the system now will not enter the system update mode, but just reboot as usual
  3. Testcase: Update problem
    1. Same situation as testcase 1, but with a package set that will not successfully update (one way to achieve this would be to manually set up a repository with an inconsistent set of updates)
    2. Repeat the same steps as in testcase 2
    3. Verify that the system update fails, but you get rebooted again and end up at the login screen again
    4. Verify that you get notified about the failed update attempt
    5. Verify that the failed system update is not tried again if you reboot again
  4. Testcase: Commandline use
    1. Same situation as testcase 1
    2. Open a terminal and run yum update
    3. Verify that this works as before
  5. Testcase: Application updates
    1. Use repositories which have application updates available
    2. Open 'Software Updates'
    3. Verify that the available updates are listed, and that you can install them without rebooting
  6. Testcase: Non-privileged user
    1. Create a user account
    2. Set up PolicyKit policy so that this user is not allowed to install updates (TODO: details needed)
    3. Verify that available updates do not cause notifications or other disruptions for this user
  7. Testcase: Disabling automatic downloads
    1. Install an override for the setting that controls whether PackageKit downloads updates automatically (TODO: details needed)
    2. Verify that updates are not downloaded even if they are available

[edit] User Experience

The desired user experience for System updates is described in https://live.gnome.org/GnomeOS/Design/Whiteboards/SoftwareUpdates

[edit] Dependencies

None outside of systemd, packagekit and GNOME components

[edit] Contingency Plan

If offline updates don't work in time for F18, we can go back to installing all updates while the system is running.

[edit] Documentation

[edit] Release Notes

  • Fedora 18 introduces offline system updates, which means that updates of system components are installed in a special environment outside the normal system operation.

[edit] Comments and Discussion