From Fedora Project Wiki
(→‎How To Test: link to copr repo, also exclude fwupd-offline-update.service)
(Update with current status of package)
 
(11 intermediate revisions by 2 users not shown)
Line 34: Line 34:
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
-->
-->
* Tracker bug: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=1250939 #1250939]


== Detailed Description ==
== Detailed Description ==
Line 49: Line 49:
Most of the remaining problems with fedup were caused by the fact that it was separate from the system packaging tools, and therefore had slight (and confusing) differences from the normal package update mechanisms.
Most of the remaining problems with fedup were caused by the fact that it was separate from the system packaging tools, and therefore had slight (and confusing) differences from the normal package update mechanisms.


Therefore, we propose that system upgrades should be handled ''by the system packaging tools'', using systemd's Offline System Updates facility.
Therefore, we proposed that system upgrades should be handled ''by the system packaging tools''.


[https://github.com/wgwoods/dnf-plugin-fedup dnf-plugin-fedup] is a proof-of-concept implementation; we propose to integrate support for this into DNF itself.
For upgrades to F23, fedup is being replaced with [https://github.com/rpm-software-management/dnf-plugin-system-upgrade dnf-plugin-system-upgrade], a DNF plugin that handles system upgrades using systemd's Offline System Updates.


== Benefit to Fedora ==
== Benefit to Fedora ==
Line 66: Line 66:


* Proposal owners:
* Proposal owners:
** Make DNF able to send progress output to Plymouth (basically done; see dnf [https://github.com/rpm-software-management/dnf/pull/281 #281] and [https://github.com/rpm-software-management/dnf/pull/313 #313])
** Make DNF able to send progress output to Plymouth (fixed in dnf 1.0.1; see dnf [https://github.com/rpm-software-management/dnf/pull/281 #281] and [https://github.com/rpm-software-management/dnf/pull/313 #313])
** Package [https://github.com/rpm-software-management/dnf-plugin-system-upgrade dnf-plugin-system-upgrade] (done; see [https://admin.fedoraproject.org/pkgdb/package/dnf-plugin-system-upgrade/ pkgdb])
** Write replacement for <code>/usr/bin/fedup</code> (done; see [https://github.com/rpm-software-management/dnf-plugin-system-upgrade/blob/master/fedup.sh <code>fedup.sh</code>])
** Modify Offline System Updates spec as needed to support major system upgrades (in progress, see [http://lists.freedesktop.org/archives/systemd-devel/2015-July/033605.html this systemd-devel thread])
** Modify Offline System Updates spec as needed to support major system upgrades (in progress, see [http://lists.freedesktop.org/archives/systemd-devel/2015-July/033605.html this systemd-devel thread])
** Support Offline System Updates in DNF ([https://github.com/wgwoods/dnf-plugin-fedup dnf-plugin-fedup] does this, but it could be integrated into DNF itself)
** Add plugin to <code>dnf-plugins-core</code> or <code>dnf</code>
** Write man pages and other documentation
** Write man pages and other documentation
** Obsolete and retire fedup
** Obsolete and retire fedup package


* Other developers:
* Other developers:
** Fix any conflicts with <code>packagekit-offline-update.service</code>
** Fix any conflicts with <code>packagekit-offline-update.service</code>
*** See {{bz|1252500}}
** In the unlikely event that some kind of offline system migration is necessary (like [[Features/UsrMove|UsrMove]]), it should be handled the same way as UsrMove - i.e. by a dracut script that runs the first time the new system boots after the upgrade.
** In the unlikely event that some kind of offline system migration is necessary (like [[Features/UsrMove|UsrMove]]), it should be handled the same way as UsrMove - i.e. by a dracut script that runs the first time the new system boots after the upgrade.
** Translations, etc.
*** See https://fedora.zanata.org/project/view/dnf-plugin-system-upgrade


* Release engineering:
* Release engineering:
** Drop <code>upgrade.img</code> from image builds
** Drop <code>upgrade.img</code> from image builds ([https://github.com/rhinstaller/lorax/commit/d9c23d1 fixed in lorax], should be in <code>lorax-23.18</code>)


* Policies and guidelines:  
* Policies and guidelines:  
Line 95: Line 98:
''NOTE: this will change as things evolve''
''NOTE: this will change as things evolve''


# Install <code>dnf-plugin-fedup</code>
# Install <code>dnf-plugin-system-upgrade</code>:
#* From [https://github.com/wgwoods/dnf-plugin-fedup git]
#* <code>dnf --enablerepo=updates-testing install dnf-plugin-system-upgrade</code>
#* Or try the experimental package<br><code>dnf copr enable zbyszek/dnf-plugin-fedup</code><br><code>dnf install 'dnf-command(fedup)'</code>
# <code>systemctl mask packagekit-offline-update.service fwupd-offline-update.service</code>
# <code>systemctl mask packagekit-offline-update.service fwupd-offline-update.service</code>
# <code>dnf fedup download --releasever=23</code>
# <code>dnf system-upgrade download --releasever=23</code>
#* This should download lots of packages; it will probably also ask about importing the new GPG key.
#* This should download lots of packages; it will probably also ask about importing the new GPG key.
# <code>dnf fedup reboot</code>
# <code>dnf system-upgrade reboot</code>
# Observe upgrade progress on plymouth boot splash
# Observe upgrade progress on plymouth boot splash
# System reboots at end of upgrade
# System reboots at end of upgrade
Line 107: Line 109:
# That's about it
# That's about it


(steps 2. and 7. are a temporary work-around, should be gone soon)
(steps 2. and 7. are a temporary work-around for {{bz|1252500}})


== User Experience ==
== User Experience ==
Line 146: Line 148:
* http://www.freedesktop.org/wiki/Software/systemd/SystemUpdates/
* http://www.freedesktop.org/wiki/Software/systemd/SystemUpdates/


Reference implementation:
<code>dnf system-upgrade</code> plugin
* https://github.com/wgwoods/dnf-plugin-fedup
* https://github.com/rpm-software-management/dnf-plugin-system-upgrade


DNF upstream (links to API docs etc.)
DNF upstream (links to API docs etc.)
* https://github.com/rpm-software-management/dnf
* https://github.com/rpm-software-management/dnf


== Release Notes ==
== Release Notes ==
Line 162: Line 163:
<!-- After review, the Wrangler will move your page to Category:ChangeReadyForFesco... if it still needs more work it will move back to Category:ChangePageIncomplete-->
<!-- After review, the Wrangler will move your page to Category:ChangeReadyForFesco... if it still needs more work it will move back to Category:ChangePageIncomplete-->


[[Category:ChangeReadyForWrangler]]
[[Category:ChangeAcceptedF23]]
[[Category:SystemWideChange]]
[[Category:SystemWideChange]]

Latest revision as of 15:23, 8 September 2015

DNF System Upgrades

Summary

fedup is being redesigned and integrated into DNF.

Owner

  • Release notes owner:

Current status

  • Targeted release: Fedora 23
  • Last updated: 2015-09-08

Detailed Description

While fedup worked well in many circumstances, there were a lot of problems resulting from using upgrade.img. This has caused nasty, hard-to-debug blocker bugs for every release since it was introduced.

It turns out that upgrade.img was relying on some undocumented, unsupported systemd behavior. After F22 this was discussed on the systemd-devel mailing list, and the conclusion was that fedup's boot behavior is broken by design, and systemd can't (and won't) continue to support it.

systemd already supports a simpler, more reliable method for performing Offline System Updates; the systemd team suggests using that to perform system upgrades.

Most of the remaining problems with fedup were caused by the fact that it was separate from the system packaging tools, and therefore had slight (and confusing) differences from the normal package update mechanisms.

Therefore, we proposed that system upgrades should be handled by the system packaging tools.

For upgrades to F23, fedup is being replaced with dnf-plugin-system-upgrade, a DNF plugin that handles system upgrades using systemd's Offline System Updates.

Benefit to Fedora

The upgrade process will be much more reliable, and well-integrated with the system packaging tools.

Better integration with system packaging tools:

  • Upgrades support distro-sync mode
  • Systems do not need to (re-)download update metadata after the upgrade

We no longer need to build upgrade.img, which saves space in boot/install media.

Scope

  • Proposal owners:
    • Make DNF able to send progress output to Plymouth (fixed in dnf 1.0.1; see dnf #281 and #313)
    • Package dnf-plugin-system-upgrade (done; see pkgdb)
    • Write replacement for /usr/bin/fedup (done; see fedup.sh)
    • Modify Offline System Updates spec as needed to support major system upgrades (in progress, see this systemd-devel thread)
    • Write man pages and other documentation
    • Obsolete and retire fedup package
  • Other developers:
    • Fix any conflicts with packagekit-offline-update.service
    • In the unlikely event that some kind of offline system migration is necessary (like UsrMove), it should be handled the same way as UsrMove - i.e. by a dracut script that runs the first time the new system boots after the upgrade.
    • Translations, etc.
  • Release engineering:
    • Drop upgrade.img from image builds (fixed in lorax, should be in lorax-23.18)
  • Policies and guidelines:
  • Trademark approval: N/A (not needed for this Change)

Upgrade/compatibility impact

Existing systems can still use fedup to upgrade to F22, F21, and older.

If we backport the DNF changes (or provide them as plugins) we can even provide this as an alternate upgrade path from F21 (or earlier).

How To Test

NOTE: this will change as things evolve

  1. Install dnf-plugin-system-upgrade:
    • dnf --enablerepo=updates-testing install dnf-plugin-system-upgrade
  2. systemctl mask packagekit-offline-update.service fwupd-offline-update.service
  3. dnf system-upgrade download --releasever=23
    • This should download lots of packages; it will probably also ask about importing the new GPG key.
  4. dnf system-upgrade reboot
  5. Observe upgrade progress on plymouth boot splash
  6. System reboots at end of upgrade
  7. systemctl unmask packagekit-offline-update.service fwupd-offline-update.service
  8. That's about it

(steps 2. and 7. are a temporary work-around for RHBZ #1252500)

User Experience

System upgrades will look a lot more like offline updates (because they're just big offline updates).

The commands to upgrade the system will probably be more like:

sudo dnf system-upgrade download --releasever=23
sudo dnf system-upgrade reboot

Dependencies

None known.

Contingency Plan

  • Contingency mechanism: There are a few options; none of them are good.
    • Find someone to maintain fedup and keep using it for one more release, even though upstream systemd says not to
    • Use a different upgrade method for one release
    • Just don't support upgrades for one release
  • Contingency deadline: Beta, at latest - any of the above contingency plans would take a lot of work.
  • Blocks release? Yes. Upgrades are a release criteria.
  • Blocks product? Not product-specific AFAIK.

Documentation

systemd-devel discussion:

fedora devel announcement:

Offline System Updates spec:

dnf system-upgrade plugin

DNF upstream (links to API docs etc.)

Release Notes

The fedup utility has been retired; system upgrades are now handled by dnf system-upgrade.