Bug 1804564

Summary: Cannot upgrade to Fedora 32: Modules blocking the upgrade path
Product: [Fedora] Fedora Reporter: Jaroslav Mracek <jmracek>
Component: PackageKitAssignee: Richard Hughes <rhughes>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 32CC: awilliam, bcotton, bugzilla, dmach, extras-qa, igor.raits, jkadlcik, jmracek, jonathan, kevin, klember, kparal, mailinglists35, mblaha, mhroncok, mihai, msuchy, pkratoch, rdieter, rhughes, robatino, rpm-software-management, sgallagh, Simon.Gerhards, smparrish, ssorce, vmukhame, vondruch, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AcceptedPreviousReleaseBlocker
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1767351 Environment:
Last Closed: 2021-05-25 18:01:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1767351    
Bug Blocks: 1705303    

Description Jaroslav Mracek 2020-02-19 07:47:39 UTC
+++ This bug was initially created as a clone of Bug #1767351 +++

This is a followup Fedora 32 bug after bz1747408 and bz1762751 has been explicitly workarounded for updates to Fedora 31 only.

It was expected that the Fedora 31 workaround is "hackish" because it was needed fast. I'm opening this bug to track the proper solution.

tl;dr problem:

Users that have (often without they intention) activated a modular stream cannot properly upgrade to a new Fedora version where this modular stream is no longer available.

I'm proposing this as a beta blocker, so we don't need to invent a new "hackish" workarounds during beta.

--- Additional comment from Stephen Gallagher on 2019-11-11 13:57:26 UTC ---

+1 blocker

--- Additional comment from Stephen Gallagher on 2019-11-11 16:40:38 UTC ---

FESCo voted in today's meeting to declare this a blocker for Fedora 32 Beta release. (+7, 0, -0).

--- Additional comment from Miro Hrončok on 2020-01-29 09:16:36 UTC ---

We are 4 weeks from Beta Freeze, 7 weeks from Beta Release. I doubt that Josh (default assignee for the distribution component) is actually working on this.

Re-assigning to nobody. CCing Ben, the program manager.

--- Additional comment from Ben Cotton on 2020-01-29 12:41:09 UTC ---

Reassigning to the development team lead for Modularity.

--- Additional comment from Miro Hrončok on 2020-01-29 12:50:13 UTC ---

Thanks Ben.

Daniel, if you want to pick my brain about how we could resolve this, feel free to ping me over IRC etc.

--- Additional comment from Ben Cotton on 2020-02-11 17:18:52 UTC ---

This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

--- Additional comment from Jaroslav Mracek on 2020-02-19 07:46:43 UTC ---

I am proposing to extend hack originally applied only for libgit2 and Fedora 31. The new hack will reset all modules when target releasever will be 31 or 32. (patch - https://github.com/rpm-software-management/dnf-plugins-extras/pull/174) The hack is only applied for system-upgrade. If anyone wants to manage modules manually it will be still possible with other commands including offline-upgrade or offline-distrosync. 


Auto switching to use defaults again and reset the rest of modules:
dnf system-upgrade download --releasever=32
dnf system-upgrade reboot


How to switch modules during system-upgrade manually (nodejs:8 to nodejs:12) and keep other modules unchanged:
dnf module reset nodejs
dnf module enable nodejs:12 --releasever=32
dnf offline-distrosync download --releasever=32
dnf offline-distrosync reboot


Anyway we need a long-term solution. I would recommend to use a similar approach that is used for packages - obsoletes. It means that maintainer of module will provide an upgrade path (maintainer will be responsible to delivery a functional upgrade path) and dnf will follow it when user allows to follow it.

Comment 1 Jaroslav Mracek 2020-02-19 07:52:13 UTC
The original hack for F31 is not sufficient and the new hack will probably require and additional API in libdnf.

Comment 2 Jaroslav Mracek 2020-02-24 10:18:37 UTC
There are multiple approaches how to resolve the issue:
1. Extend dnf_context_reset_modules to accept globs.
It will allow to reset all modules using '*' as a argument

2. Provide a new function that will reset all modules `dnf_context_reset_all_modules`

3. Provide a method to return all available/enabled modules names and then use of dnf_context_reset_modules to reset them.

Please what do you prefer?

Comment 3 Richard Hughes 2020-03-02 19:26:19 UTC
2) seems clean to me I guess. Yell when there's a f32 rpm in the buildroot with that API and I can fix up PK to use that.

Comment 4 Jaroslav Mracek 2020-03-05 13:15:34 UTC
I created PR with requested API (https://github.com/rpm-software-management/libdnf/pull/906). Please could you confirm that it works as you expected?

Comment 5 Jaroslav Mracek 2020-03-06 09:13:43 UTC
It also requires https://github.com/rpm-software-management/libdnf/pull/910

Comment 6 Richard Hughes 2020-03-06 11:20:26 UTC
Is there a srpm available? TIA.

Comment 7 Jaroslav Mracek 2020-03-06 16:33:34 UTC
Builds should be available in rh-atomic-bot. See and follow https://github.com/rpm-software-management/libdnf/pull/906.

To create rpm/srpm by your self please just download libdnf project

git clone https://github.com/rpm-software-management/libdnf.git
cd libdnf
git fetch origin pull/906/head:test
git checkout test

tito build --test --srpm  #srpm

or
dnf builddep libdnf.spec
tito build --test --rpm  #rpm


In case that you need an assistance with creation of patch for downstream, don't hesitate to ask and I can provide a detail description how to do it. Happy to help.

Comment 8 Adam Williamson 2020-03-10 01:41:48 UTC
I believe this should actually be an AcceptedPreviousRelease blocker, same as the DNF one - it's the same situation, AIUI, we need to fix this in Fedora 30 and 31 for upgrades to Fedora 32.

Comment 9 Jaroslav Mracek 2020-03-11 11:48:04 UTC
Any update?

Comment 10 Adam Williamson 2020-03-13 03:37:02 UTC
we're running short on time, so sgallagh kindly volunteered to write the fixes, and I've tested them - they seem to be working. I'm now doing builds and submitting updates (sgallagh went for a rest).

Comment 11 Fedora Update System 2020-03-13 03:53:32 UTC
FEDORA-2020-659dc97781 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-659dc97781

Comment 12 Fedora Update System 2020-03-13 03:57:21 UTC
FEDORA-2020-02ee4b1a1c has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-02ee4b1a1c

Comment 13 Fedora Update System 2020-03-13 03:57:23 UTC
FEDORA-2020-02ee4b1a1c has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-02ee4b1a1c

Comment 14 Adam Williamson 2020-03-13 03:58:31 UTC
OK, this should now be addressed for F30 and F31. I edited the new libdnf and PackageKit into the existing libdnf / dnf-plugins-extras update for F30, for F31 that update has gone stable so I created a new one.

It'd be great if other folks can test and confirm the fix.

Comment 15 Kamil Páral 2020-03-13 11:03:47 UTC
I have found an issue with the new libdnf and PackageKit updates, see bug 1813237.

Comment 16 Adam Williamson 2020-03-13 18:12:23 UTC
*** Bug 1813237 has been marked as a duplicate of this bug. ***

Comment 17 Adam Williamson 2020-03-13 18:13:25 UTC
We're following up on 1813237 here; long story short the initial fix sgallagh wrote also reset all modules on *non-upgrade* transactions, which we don't want. He is sending out updated fixes which don't do that.

Comment 18 Fedora Update System 2020-03-14 01:02:06 UTC
PackageKit-1.1.12-14.fc31, libdnf-0.43.1-5.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-659dc97781

Comment 19 Fedora Update System 2020-03-15 13:42:49 UTC
PackageKit-1.1.12-14.fc31, libdnf-0.43.1-5.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Program Management 2021-04-29 17:12:58 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 21 Ben Cotton 2021-05-25 18:01:50 UTC
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.