Bug 1899494

Summary: Anaconda doesn't apply configuration from /etc/dnf/dnf.conf
Product: Red Hat Enterprise Linux 8 Reporter: Oliver Falk <ofalk>
Component: anacondaAssignee: Radek Vykydal <rvykydal>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: high Docs Contact: Sagar Dubewar <sdubewar>
Priority: high    
Version: 8.3CC: james.antill, jkonecny, jstodola, kfujii, kwalker, pkratoch, pzatko, sbarcomb, sdubewar, yferszt
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-33.16.7.6-1.el8 Doc Type: Bug Fix
Doc Text:
.The installer no longer installs earlier versions of packages Previously, the installer did not correctly load the DNF configuration file during the installation process. As a consequence, the installer sometimes installed earlier versions of select packages in the RPM transaction. This bug has been fixed, and only the latest versions of packages are now installed from the installation repositories. In cases where it is impossible to install the latest versions of the packages, the installation fails as expected.
Story Points: ---
Clone Of:
: 2053710 (view as bug list) Environment:
Last Closed: 2022-11-08 09:17:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Oliver Falk 2020-11-19 12:12:54 UTC
Description of problem:
Given a kickstart file, if you add deprecated packages (eg. langtable-data) to the packages to be installed, the DNF transaction will end up trying to downgrade packages. However, since older packages are potentially not available in the repository, the transaction error message the user is presented with may look like this (random example):

    14:06:57,611 CRT dnf: Error opening file for checksum: /run/install/LocalRHEL-AppStream.nfs/Packages/w/webkit2gtk3-jsc-2.24.4-2.el8_1.x86_64.rpm
    14:06:57,612 CRT dnf: Package "webkit2gtk3-jsc-2.24.4-2.el8_1.x86_64" from local repository "LocalRHEL-AppStream" has incorrect checksum
    14:06:57,682 CRT dnf: Error opening file for checksum: /run/install/LocalRHEL-AppStream.nfs/Packages/l/libreoffice-core-6.0.6.1-20.el8.x86_64.rpm
    14:06:57,682 CRT dnf: Package "libreoffice-core-1:6.0.6.1-20.el8.x86_64" from local repository "LocalRHEL-AppStream" has incorrect checksum
    14:06:57,684 CRT dnf: Error opening file for checksum: /run/install/LocalRHEL-AppStream.nfs/Packages/l/libreoffice-draw-6.0.6.1-20.el8.x86_64.rpm

This looks like there is a problem with the checksum, but the real issue is the file/package isn't available since the dnf transaction tried to downgrade to package not available.


Version-Release number of selected component (if applicable): 8.x


How reproducible: Always


Steps to Reproduce:
1. Use reposync to fetch the relevant RHEL 8(.3) repositories
2. Add any package that has been deprecated from 8.2 to 8.3 to your kickstart file
3. Use this as installation source during a RHEL 8.3 install

Actual results:
Error message is misleadning and it's anyway questionable if Anaconda should allow downgrades during the DNF transaction - but there might be reasons.


Expected results:
Better error message and/or downgrading during the DNF transaction isn't allowed unless explicitly asked for (kickstart config option?)


Additional info:
Linking customer case.

Comment 3 Jiri Konecny 2020-11-19 13:47:22 UTC
Hi, thank you a lot for investigation. If the same issue is happening also for the direct `yum` calls then it's not a specific to Anaconda but rather problem DNF behavior.

Switching component to DNF.

Comment 4 Oliver Falk 2020-11-19 15:39:34 UTC
With direct yum calls, it's obvious. The point here is that Anaconda should catch this somehow and provide the user with a more meaningful error message.

And my additional point was that we should potentially think about if Anaconda should run DNF in a away that would prevent downgrading at all, since this will in almost all cases lead to a failure, as usually only the latest packages are available in the repositories.

Oliver

Comment 5 Daniel Mach 2020-11-23 12:11:13 UTC
Reassigning back to anaconda based on the previous comment.

Comment 6 Pavla Kratochvilova 2020-11-23 15:21:02 UTC
After additional discussion, I am reassigning this back to dnf, because the error message should probably be improved already in dnf.

As for the question whether Anaconda should run DNF in a way that would prevent downgrades, I don't think that's what's happening, because Anaconda just installs all the packages (it doesn't do any upgrades/downgrades). I'd say the problem is more likely in repositories (having inconsistent repodata).

Comment 14 Jiri Konecny 2022-02-11 14:29:02 UTC
Based on the comment 13, I'm removing the FutureFeature because this seems like inconsistency in the Anaconda configuration. We should investigate the reasoning for not loading the best= option.

Comment 16 Jan Stodola 2022-02-11 19:45:03 UTC
Nice work, Kyle!
RHEL-9 clone: bug 2053710

Comment 18 Radek Vykydal 2022-06-09 14:23:12 UTC
Upstream PR: https://github.com/rhinstaller/anaconda/pull/4183

Comment 19 Radek Vykydal 2022-06-16 06:40:22 UTC
https://github.com/rhinstaller/anaconda/pull/4187

Comment 23 Jan Stodola 2022-06-23 15:09:02 UTC
Checked that anaconda-33.16.7.6-1.el8 is in nightly compose RHEL-8.7.0-20220623.0

Moving to VERIFIED

Comment 26 errata-xmlrpc 2022-11-08 09:17:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (anaconda bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7462