From Fedora Project Wiki

< Changes

Revision as of 08:13, 20 March 2020 by Dmach (talk | contribs) (Created page with "<!-- Self Contained or System Wide Change Proposal? Use this guide to determine to which category your proposed change belongs to. Self Contained Changes are: * changes to is...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Introduce module Obsoletes and EOL

Summary

Fix Fedora upgradability issues when upgrading systems with module streams enabled.


Owner


Current status

  • Targeted release: Fedora 33
  • Last updated: \2020-\03-\20
  • FESCo issue: <will be assigned by the Wrangler>
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>


Detailed Description

DNF currently doesn't have sufficient information to perform system upgrades of systems with enabled module streams correctly. To solve upgradability problems, we will add additional modulemd metadata. This includes information about a stream obsoleting another one or a stream being EOLed.

Use Cases:

  • A stream has reached its EOL and must no longer be available.
    • The stream packages have no replacements and must be removed from the system (an extension of fedora-obsolete-packages?)
    • The stream packages get replaced with non-modular packages
  • A stream has reached its EOL and is Obsoleted by another stream.
  • A stream has reached its EOL and a user wants to continue using it regardless of EOL/Obsoletes.
  • A stream has reached its EOL and a user wants to install a new host with the EOLed stream enabled.

Proposed new DNF config options:

  • module_stream_eol_on_upgrade = 1
  • module_stream_eol_on_system_upgrade = 1

Proposed new modulemd document:

document: modulemd-stream-eol
version: 1
data:
  module: nodejs
  stream: 11
  # if not specified, all contexts get EOLed; consider specifying a list of contexts
  context: aabbccddee
  # if not specified, all arches get EOLed
  arch: x86_64
  eol_date: 2020-03-01
  message: "Module stream nodejs:11 is no longer supported. It is recommended to switch to nodejs:12"
  # force stream switch/reset on `dnf upgrade/distro-sync`
  apply_on_upgrade: true
  # force stream switch/reset on `dnf system-upgrade`
  apply_on_system_upgrade: true
  # if a stream is not EOLed but Obsoleted, provide additional information about the obsoleting stream:
  obsoleted_by:
    module: nodejs
    stream: 12


Benefit to Fedora

Seamless system upgrades of systems with module streams enabled.


Scope

  • Proposal owners:
    • Introduce modularity features to:
    • Obsolete a module stream
    • Stream EOL
    • Design a new modulemd documents for Obsoletes and EOL
    • Get the new documents supported by libmodulemd
    • Implement the new functionality in the DNF stack (libdnf, dnf, microdnf) and PackageKit
  • Other developers:
    • Follow updated packaging policy. See the "Policies and guidelines" section.

Maintain and distribute new module metadata.

  • Policies and guidelines:
    • Packaging policy and modularity documents require a change:
      • When a module stream gets removed from a Fedora release, the maintainer of the module stream must provide a modulemd document with Obsoletes or EOL data.
  • Trademark approval: N/A (not needed for this Change)


Upgrade/compatibility impact

This feature solves upgradability problems of systems with module streams enabled.


How To Test

Stream Obsoletes:

  • Enable a stream that is not available in the next version of Fedora and is obsoleted by another stream in the metadata
  • Run system upgrade
  • Verify that the obsoleting stream is enabled instead of the obsoleted one

Stream EOL:

  • Enable a stream that is not available in the next version of Fedora and is obsoleted in its module metadata
  • Run system upgrade
  • Verify that the EOLed stream is no longer enabled and does not show up in dnf module list


User Experience

Fedora users experience upgradability problems when upgrading to Fedora 32 when they have any module streams enabled.

If a stream no longer exists on the version of Fedora they are upgrading to, DNF used to error out on resolving modular dependencies which was a clear release blocker. To workaround this case, all module streams are reset during the system upgrade. By doing this, modularity users lose information about enabled streams and they need to re-enable them by hand.

This Change aims at removing the upgradability problems and allowing Fedora modularity users to upgrade their systems while keeping their streams enabled, reset or switched (obsoleted) according to newly provided modular metadata.


Dependencies

  • libmodulemd
  • libdnf
  • dnf
  • microdnf
  • PackageKit


Contingency Plan

  • Contingency mechanism: Remove the new metadata from Fedora composes and repositories. Fedora will stay at the current behavior.
  • Contingency deadline: Beta Freeze
  • Blocks release? Yes


Documentation

TBD


Release Notes

Modularity supports Obsoleting streams and stream EOL (end-of-life). Enabled streams are no longer reset during the system upgrade. When a stream reaches its EOL, it's reset. When a stream is Obsoleted, it's switched to the obsoleting stream.