Bug 1781601 - yum repolist does not list all repos when running from initscript/unit file
Summary: yum repolist does not list all repos when running from initscript/unit file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: yum
Version: 8.1
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: 8.0
Assignee: Marek Blaha
QA Contact: Luca Berton
URL:
Whiteboard:
: 1792506 (view as bug list)
Depends On:
Blocks: 1814834
TreeView+ depends on / blocked
 
Reported: 2019-12-10 10:12 UTC by Paul Dwyer
Modified: 2020-07-09 12:21 UTC (History)
6 users (show)

Fixed In Version: libdnf-0.39.1-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:49:06 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1823 None None None 2020-04-28 16:49:22 UTC

Description Paul Dwyer 2019-12-10 10:12:48 UTC
Not sure if this should be filed under yum or dnf component.

Description of problem:
Customer is using a complex build/configuration process which involves creating services in post section of a kickstart, these services install various rpms from various custom repos (that have signed metadata).

When using this build process with RHEL8.1 rpm installs failed as not all repos were available.

We have narrowed this down to running yum repolist command in sysv init script on startup (running same script in unit file also fails).

This worked on RHEL8.0 and if I upgrade the yum and dnf packages (see below) in the kickstart before rebooting the server I can reproduce the same behaviour.

yum repolist command works correctly in installed system.

Version-Release number of selected component (if applicable):
The following package versions appear to be involved
dnf-4.2.7-6.el8.noarch.rpm
dnf-data-4.2.7-6.el8.noarch.rpm 
dnf-plugins-core-4.0.8-3.el8.noarch.rpm 
libdnf-0.35.1-8.el8.x86_64.rpm 
libsolv-0.7.4-3.el8.x86_64.rpm 
python3-dnf-4.2.7-6.el8.noarch.rpm 
python3-dnf-plugins-core-4.0.8-3.el8.noarch.rpm
python3-hawkey-0.35.1-8.el8.x86_64.rpm
python3-libdnf-0.35.1-8.el8.x86_64.rpm 
yum-4.2.7-6.el8.noarch.rpm

How reproducible:
always

Steps to Reproduce:
1. install RHEL8.1 using attached kickstart (modify my.repo to point to your own custom repos)
2. This will run /usr/local/bin/repocheck.sh in sysv init script on start, which runs "yum -y repolist" in a loop until all required repos are listed


Actual results:
The sysv init script outputs the following until all repos are found
INFO: 0 out of 3 REPOs are loaded - Tue 10 Dec 04:51:32 EST 2019
INFO: 0 out of 3 REPOs are loaded - Tue 10 Dec 04:51:38 EST 2019
INFO: 3 out of 3 REPOs are loaded - Tue 10 Dec 04:51:44 EST 2019

script also collects stderr and this shows importing gpg_key but only for first repo it finds, each time through the loop it imports one gpg key until all repo keys are imported

Expected results:
yum -y repolist should import all required keys in one transaction like on RHEL8.0


Additional info:
This also produces same result if I run the repocheck script in a unit file.
This does not appear to be a change in systemd as if I update just the systemd packages in the kickstart from 8.0 to 8.1 versions problem does not reproduce.

The repocheck script is just to illustrate the problem and mimic customer's complex build process.

Comment 16 errata-xmlrpc 2020-04-28 16:49:06 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, 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-2020:1823

Comment 17 Marek Blaha 2020-04-29 07:25:51 UTC
*** Bug 1792506 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.