Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1976011

Summary: Unable to find a match: yum-utils in podman container
Product: Red Hat Enterprise Linux 9 Reporter: yanpliu <yanpliu>
Component: podman-containerAssignee: Jindrich Novy <jnovy>
Status: CLOSED CURRENTRELEASE QA Contact: atomic-bugs <atomic-bugs>
Severity: medium Docs Contact: Michelle Bearer <mbearer>
Priority: unspecified    
Version: 9.0CC: dwalsh, qianzhan, tsweeney
Target Milestone: betaFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-27 08:28:43 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 yanpliu 2021-06-25 00:59:51 UTC
Description of problem:
Unable to find a match: yum-utils  in podman container

Version-Release number of selected component (if applicable):
RHEL-9.0.0-20210622.3
Satellite6.8.6
subscription-manager-1.29.12-2.el9.x86_64
subscription-manager-cockpit-1.29.12-2.el9.noarch
python3-subscription-manager-rhsm-1.29.12-2.el9.x86_64
subscription-manager-rhsm-certificates-1.29.12-2.el9.x86_64
tfm-rubygem-katello-3.16.0.26-1.el7sat.noarch
katello-3.16.0-1.el7sat.noarch
candlepin-3.1.28-1.el7sat.noarch


How reproducible:
100%

Steps to Reproduce:
1. Register guest against Satellite6.8
# subscription-manager register --username=admin --password=admin --org=Default_Organization --environment=Library
Registering to: hpe-nehalem-02.hpe2.lab.eng.bos.redhat.com:443/rhsm
The system has been registered with ID: fd61b41a-e35e-4ec5-a24f-a4143336c66a
The registered system name is: kvm-07-guest08.hv2.lab.eng.bos.redhat.com

2. auto attach
# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64 Beta
Status:       Subscribed

3.create and start container
# podman create -t --name test_container registry-proxy.engineering.redhat.com/rh-osbs/ubi9 && podman start test_container
57ea6d9727ebd685975d9bf1d7c24df461a6c20fb1cac7cf4ff387b48c6c0d47
test_container
4.  cat /etc/yum.repos.d/redhat.repo
# podman exec -i test_container /bin/bash -c "cat /etc/yum.repos.d/redhat.repo"
cat: /etc/yum.repos.d/redhat.repo: No such file or directory
5. run command in container: yum repolist
# podman exec -i test_container /bin/bash -c "yum repolist"
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.
repo id                            repo name
rhel-9-for-x86_64-baseos-beta-rpms Red Hat Enterprise Linux 9 for x86_64 - BaseOS Beta (RPMs)
6. run command in container: cat /etc/yum.repos.d/redhat.repo
# podman exec -i test_container /bin/bash -c "cat /etc/yum.repos.d/redhat.repo"
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated.  Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
#

[rhel-9-for-x86_64-baseos-beta-rpms]
name = Red Hat Enterprise Linux 9 for x86_64 - BaseOS Beta (RPMs)
baseurl = https://hpe-nehalem-02.hpe2.lab.eng.bos.redhat.com/pulp/repos/Default_Organization/Library/content/beta/rhel9/9/x86_64/baseos/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm-host/ca/katello-server-ca.pem
sslclientkey = /etc/pki/entitlement-host/9078839300693229608-key.pem
sslclientcert = /etc/pki/entitlement-host/9078839300693229608.pem
metadata_expire = 1
enabled_metadata = 1
7.  run command in container: yum install -y yum-utils
# podman exec -i test_container /bin/bash -c "yum install -y yum-utils"
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.
Red Hat Enterprise Linux 9 for x86_64 - BaseOS  3.6 MB/s | 1.3 MB     00:00    
No match for argument: yum-utils
Error: Unable to find a match: yum-utils


Actual results:
Unable to find a match: yum-utils in rhel9 podman-container

Expected results:
Should install yum-utils successfully in rhel9 podman-container
Additional info:

Comment 1 Tom Sweeney 2021-06-25 15:30:15 UTC
Assigning to Dan Walsh as he's been working on these kinds of issues recently.  I believe you're going to have to mount the location of your subscription manager DB into your container or rerun your RHEL login subscription within it.  Dan will have the definitive answer.

Comment 3 yanpliu 2022-01-26 09:09:58 UTC
Tested on RHEL-9.0.0-20220119.0 Satellite 6.9.7, this issue can not reproduce.

[root@kvm-05-guest19 ~]# subscription-manager register --username=admin --password=admin --org=Default_Organization --environment=Library
This system is already registered. Use --force to override
[root@kvm-05-guest19 ~]# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64 Beta
Status:       Subscribed

[root@kvm-05-guest19 ~]# podman create -t --name test_container registry-proxy.engineering.redhat.com/rh-osbs/ubi9 && podman start test_container
6409ce773b860aefd02a70df44346200ce0048c9bdf9dbadbe930c2c3e194079
test_container
[root@kvm-05-guest19 ~]# cat /etc/yum.repos.d/redhat.repo
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated.  Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
#

[rhel-9-for-x86_64-baseos-beta-rpms]
name = Red Hat Enterprise Linux 9 for x86_64 - BaseOS Beta (RPMs)
baseurl = https://hpe-magnycours-01.hpe2.lab.eng.bos.redhat.com/pulp/repos/Default_Organization/Library/content/beta/rhel9/9/x86_64/baseos/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm/ca/katello-server-ca.pem
sslclientkey = /etc/pki/entitlement/9087427260233371579-key.pem
sslclientcert = /etc/pki/entitlement/9087427260233371579.pem
metadata_expire = 1
enabled_metadata = 1
[root@kvm-05-guest19 ~]# podman exec -i test_container /bin/bash -c "cat /etc/yum.repos.d/redhat.repo"
WARN[0000] Failed to add conmon to systemd sandbox cgroup: Unit libpod-conmon-6409ce773b860aefd02a70df44346200ce0048c9bdf9dbadbe930c2c3e194079.scope already exists. 
cat: /etc/yum.repos.d/redhat.repo: No such file or directory
[root@kvm-05-guest19 ~]# podman exec -i test_container /bin/bash -c "yum repolist"
WARN[0000] Failed to add conmon to systemd sandbox cgroup: Unit libpod-conmon-6409ce773b860aefd02a70df44346200ce0048c9bdf9dbadbe930c2c3e194079.scope already exists. 
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.
repo id                            repo name
rhel-9-for-x86_64-baseos-beta-rpms Red Hat Enterprise Linux 9 for x86_64 - BaseOS Beta (RPMs)
[root@kvm-05-guest19 ~]#  podman exec -i test_container /bin/bash -c "cat /etc/yum.repos.d/redhat.repo"
WARN[0000] Failed to add conmon to systemd sandbox cgroup: Unit libpod-conmon-6409ce773b860aefd02a70df44346200ce0048c9bdf9dbadbe930c2c3e194079.scope already exists. 
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated.  Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "yum repolist" to refresh available repos
#

[rhel-9-for-x86_64-baseos-beta-rpms]
name = Red Hat Enterprise Linux 9 for x86_64 - BaseOS Beta (RPMs)
baseurl = https://hpe-magnycours-01.hpe2.lab.eng.bos.redhat.com/pulp/repos/Default_Organization/Library/content/beta/rhel9/9/x86_64/baseos/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm-host/ca/katello-server-ca.pem
sslclientkey = /etc/pki/entitlement-host/9087427260233371579-key.pem
sslclientcert = /etc/pki/entitlement-host/9087427260233371579.pem
metadata_expire = 1
enabled_metadata = 1
[root@kvm-05-guest19 ~]# podman exec -i test_container /bin/bash -c "yum install -y yum-utils"
WARN[0000] Failed to add conmon to systemd sandbox cgroup: Unit libpod-conmon-6409ce773b860aefd02a70df44346200ce0048c9bdf9dbadbe930c2c3e194079.scope already exists. 
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.
Red Hat Enterprise Linux 9 for x86_64 - BaseOS  534 kB/s | 2.9 MB     00:05    
Last metadata expiration check: 0:00:01 ago on Wed Jan 26 09:07:29 2022.
Dependencies resolved.
================================================================================
 Package          Arch   Version       Repository                          Size
================================================================================
Installing:
 yum-utils        noarch 4.0.24-2.el9  rhel-9-for-x86_64-baseos-beta-rpms  46 k
Installing dependencies:
 dnf-plugins-core noarch 4.0.24-2.el9  rhel-9-for-x86_64-baseos-beta-rpms  39 k

Transaction Summary
================================================================================
Install  2 Packages

Total download size: 85 k
Installed size: 42 k
Downloading Packages:
(1/2): dnf-plugins-core-4.0.24-2.el9.noarch.rpm 3.2 kB/s |  39 kB     00:12    
(2/2): yum-utils-4.0.24-2.el9.noarch.rpm        3.6 kB/s |  46 kB     00:12    
--------------------------------------------------------------------------------
Total                                           6.6 kB/s |  85 kB     00:12     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : dnf-plugins-core-4.0.24-2.el9.noarch                   1/2 
  Installing       : yum-utils-4.0.24-2.el9.noarch                          2/2 
  Running scriptlet: yum-utils-4.0.24-2.el9.noarch                          2/2 
  Verifying        : yum-utils-4.0.24-2.el9.noarch                          1/2 
  Verifying        : dnf-plugins-core-4.0.24-2.el9.noarch                   2/2 
Installed products updated.

Installed:
  dnf-plugins-core-4.0.24-2.el9.noarch       yum-utils-4.0.24-2.el9.noarch      

Complete!

Comment 5 yanpliu 2022-01-27 01:17:18 UTC
Sure Tom, we can close this bug as current release.