-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-8.10, rhel-9.6
-
None
-
No
-
Low
-
rhel-sst-csi-client-tools
-
13
-
False
-
-
None
-
None
-
None
-
None
-
-
x86_64
-
None
What were you trying to do that didn't work?
The dnf/yum plugin "subscription-manager" has an option to disable repositories that are not in "/etc/yum.repos.d/redhat.repo":
disable_system_repos=1
This works when using the command "yum repolist". Yum/dnf will only show the repsoitories from the "redhat.repo" file.
However, if you try to install/remove a package, yum/dnf tries to cache the repository metadata at the very end of the transaction. That is, the package installs fine without any attempt to grab metadata from the non Red Hat repository. But once the package is installed, there is a step at the end to update the cache of the repositories, and it tries to update the cache for the non Red Hat repository.
This issue is further complicated when the Red Hat client doesn't have connectivity to these custom non redhat.repo repositories (connectivity is only allowed when updates from those repositories are necessary). The Red Hat client will try to connect to each repository 4 times, timing out after 30 seconds each time.
Please provide the package NVR for which bug is seen:
RHEL9:
rpm -q subscription-manager subscription-manager-1.29.40-1.el9.x86_64
RHEL8:
rpm -q subscription-manager subscription-manager-1.28.42-1.el8.x86_64
How reproducible:
Always
Steps to reproduce
1. Setup custom repository in the "/etc/yum.repos.d/" directory (something that isn't in "redhat.repo".
2. Make sure the "subscription-manager" plugin has "disable_system_repos=1" in it.
3. Try to install a package (or remove a package) and see that the non Red Hat repository is being checked for cached data.
Expected results
The non redhat.repo repositories should appear as disabled, and yum/dnf should not try to generate the cache for these repositories, just like when "yum repolist" is ran.
Actual results
Repositories that should be disabled via the "subscription-manager" plugin, appear not to be disabled when packages are installed/removed. Yum/dnf tries to cache the data for the repository, even though it is disabled via the "subscription-manager" command.
Details from repoducer
The "subscription-manager.conf" file:
cat /etc/yum/pluginconf.d/subscription-manager.conf [main] enabled=1 # When following option is set to 1, then all repositories defined outside redhat.repo will be disabled # every time subscription-manager plugin is triggered by dnf or yum disable_system_repos=1
Contents in "/etc/yum.repos.d/"
ls /etc/yum.repos.d/ redhat.repo test.repo
Contents of the "test.repo" file:
cat /etc/yum.repos.d/test.repo [test-repo] name = Test (RPMs) baseurl = https://192.168.0.104/content/dist/layered/rhel8/x86_64/sat-capsule/6.11/os enabled = 1 gpgcheck = 1 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release sslverify = 1 sslcacert = /etc/rhsm/ca/test-server-ca.pem sslclientkey = /etc/pki/entitlement/1626533514321033573-key.pem sslclientcert = /etc/pki/entitlement/1626533514321033573.pem metadata_expire = 1 enabled_metadata = 0
Output of "yum repolist -v" (notice the "test.repo" isn't listed:
yum repolist -v Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, fapolicyd, generate_completion_cache, groups-manager, kpatch, modulesync, needs-restarting, playground, product-id, repoclosure, repodiff, repograph, repomanage, reposync, subscription-manager, system-upgrade, uploadprofile, versionlock Updating Subscription Management repositories. YUM version: 4.7.0 cachedir: /var/cache/dnf subscription-manager plugin disabled 1 system repositories with respect of configuration in /etc/dnf/plugins/subscription-manager.conf Red Hat Enterprise Linux 8 for x86_64 - AppStream 100 kB/s | 4.5 kB 00:00 Red Hat Enterprise Linux 8 for x86_64 - BaseOS (R 100 kB/s | 4.1 kB 00:00 Repo-id : rhel-8-for-x86_64-appstream-rpms Repo-name : Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) Repo-revision : 1723028565 Repo-updated : Wed 07 Aug 2024 07:02:45 AM EDT Repo-pkgs : 38,803 Repo-available-pkgs: 34,192 Repo-size : 126 G Repo-baseurl : https://satellite.example.com/pulp/content/Studio-14/Library/content/dist/rhel8/8/x86_64/appstream/os Repo-expire : 1 second(s) (last: Wed 31 Dec 1969 07:00:00 PM EST) Repo-filename : /etc/yum.repos.d/redhat.repo Repo-id : rhel-8-for-x86_64-baseos-rpms Repo-name : Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) Repo-revision : 1717149560 Repo-updated : Fri 31 May 2024 05:59:19 AM EDT Repo-pkgs : 17,460 Repo-available-pkgs: 17,454 Repo-size : 31 G Repo-baseurl : https://satellite.example.com/pulp/content/Studio-14/Library/content/dist/rhel8/8/x86_64/baseos/os Repo-expire : 1 second(s) (last: Wed 31 Dec 1969 07:00:00 PM EST) Repo-filename : /etc/yum.repos.d/redhat.repo Total packages: 56,263
Install "wget" package just fine, and at end, the "Generating completion cache" step tries to generate cached metadata for the "test.repo":
Transaction check succeeded. Running transaction test Transaction test succeeded. timer: transaction test: 235 ms Running transaction RPM transaction start. Preparing : 1/1 Installed: libmetalink-0.1.3-7.el8.x86_64 Installing : libmetalink-0.1.3-7.el8.x86_64 1/2 Installed: wget-1.19.5-11.el8.x86_64 Installing : wget-1.19.5-11.el8.x86_64 2/2 Running scriptlet: wget-1.19.5-11.el8.x86_64 2/2 RPM transaction over. Verifying : wget-1.19.5-11.el8.x86_64 1/2 Verifying : libmetalink-0.1.3-7.el8.x86_64 2/2 timer: verify transaction: 3540 ms timer: transaction: 6504 ms Completion plugin: Generating completion cache... Installed products updated. User-Agent: constructed: 'libdnf (Red Hat Enterprise Linux 8.9; generic; Linux.x86_64)' Cleaning up. Plugins were unloaded. User-Agent: constructed: 'libdnf (Red Hat Enterprise Linux 8.9; generic; Linux.x86_64)' reviving: 'rhel-8-for-x86_64-appstream-rpms' can be revived - repomd matches. rhel-8-for-x86_64-appstream-rpms: using metadata from Wed 07 Aug 2024 07:02:45 AM EDT. reviving: 'rhel-8-for-x86_64-baseos-rpms' can be revived - repomd matches. rhel-8-for-x86_64-baseos-rpms: using metadata from Fri 31 May 2024 05:59:19 AM EDT. repo: downloading from remote: test-repo error: Curl error (28): Timeout was reached for https://192.168.0.104/content/dist/layered/rhel8/x86_64/sat-capsule/6.11/os/repodata/repomd.xml [Connection timed out after 30000 milliseconds] (https://192.168.0.104/content/dist/layered/rhel8/x86_64/sat-capsule/6.11/os/repodata/repomd.xml). error: Curl error (28): Timeout was reached for https://192.168.0.104/content/dist/layered/rhel8/x86_64/sat-capsule/6.11/os/repodata/repomd.xml [Connection timed out after 30000 milliseconds] (https://192.168.0.104/content/dist/layered/rhel8/x86_64/sat-capsule/6.11/os/repodata/repomd.xml). error: Curl error (28): Timeout was reached for https://192.168.0.104/content/dist/layered/rhel8/x86_64/sat-capsule/6.11/os/repodata/repomd.xml [Connection timed out after 30000 milliseconds] (https://192.168.0.104/content/dist/layered/rhel8/x86_64/sat-capsule/6.11/os/repodata/repomd.xml). error: Curl error (28): Timeout was reached for https://192.168.0.104/content/dist/layered/rhel8/x86_64/sat-capsule/6.11/os/repodata/repomd.xml [Connection timed out after 30000 milliseconds] (https://192.168.0.104/content/dist/layered/rhel8/x86_64/sat-capsule/6.11/os/repodata/repomd.xml). Errors during downloading metadata for repository 'test-repo': - Curl error (28): Timeout was reached for https://192.168.0.104/content/dist/layered/rhel8/x86_64/sat-capsule/6.11/os/repodata/repomd.xml [Connection timed out after 30000 milliseconds] Installed: libmetalink-0.1.3-7.el8.x86_64 Installed: wget-1.19.5-11.el8.x86_64 Installed: libmetalink-0.1.3-7.el8.x86_64 wget-1.19.5-11.el8.x86_64 Complete! Cleaning up. /var/cache/dnf/rhel-8-for-x86_64-baseos-rpms-667e016c88519760/packages/libmetalink-0.1.3-7.el8.x86_64.rpm removed /var/cache/dnf/rhel-8-for-x86_64-appstream-rpms-9e875d00b38a8c9c/packages/wget-1.19.5-11.el8.x86_64.rpm removed