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 1833390 - Podman does not respect configuration in "/etc/containers/registries.conf.d"
Summary: Podman does not respect configuration in "/etc/containers/registries.conf.d"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: podman
Version: 8.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Valentin Rothberg
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
: 1802213 (view as bug list)
Depends On:
Blocks: 1186913 1793607
TreeView+ depends on / blocked
 
Reported: 2020-05-08 15:01 UTC by Simon Krenger
Modified: 2023-10-06 19:57 UTC (History)
15 users (show)

Fixed In Version: podman-1.9.0 and newer
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-21 15:32:03 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-43158 0 None None None 2023-09-07 23:09:58 UTC
Red Hat Product Errata RHSA-2020:3053 0 None None None 2020-07-21 15:32:37 UTC

Description Simon Krenger 2020-05-08 15:01:28 UTC
Description of problem:

In Red Hat OpenShift Container Platform, additional registry configuration (for example "unqualified-search-registries") for "/etc/containers/registries.conf" is stored in files in "/etc/containers/registries.conf.d/". This is described in RHBZ#1802213 for example.

`crictl` and the `crio` runtime do respect the configuration stored in "/etc/containers/registries.conf.d/", but `podman` does not, which can be very confusing and is inconsistent.

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

```
sh-4.4# podman --version
podman version 1.6.4
sh-4.4# rpm-ostree status
State: idle
AutomaticUpdates: disabled
Deployments:
* pivot://quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:4cd521fb34c0d362205a1e55ad8c9c8dd6c7365b71a357ef705692ed80f7b112
              CustomOrigin: Managed by pivot tool
                   Version: 43.81.202004280317.0 (2020-04-28T03:22:44Z)
```

How reproducible:

Always

Steps to Reproduce:

1. Provision an OpenShift Container Platform Cluster (tested with 4.3.18)

2. Apply the following `MachineConfig` to write the content "unqualified-search-registries = ['quay.io']" to "/etc/containers/registries.conf.d/01-unqualified.conf"

```
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: worker
  name: 99-worker-unqualified-search-registries
spec:
  config:
    ignition:
      version: 2.2.0
    storage:
      files:
      - contents:
          source: data:text/plain;charset=utf-8;base64,dW5xdWFsaWZpZWQtc2VhcmNoLXJlZ2lzdHJpZXMgPSBbJ3F1YXkuaW8nXQo=
        filesystem: root
        mode: 420
        path: /etc/containers/registries.conf.d/01-unqualified.conf
```

2. Use `oc debug node/worker-0.example.com` and `chroot /host` to use a worker nodes binaries.

3. Use `crictl pull simonkrenger/echoenv` to pull an image that does not exist on 'quay.io', verify that it fails, as "unqualified-search-registries" was set to 'quay.io' above.

4. Use `podman pull simonkrenger/echoenv`

Actual results:

Podman does not read the configuration from "/etc/containers/registries.conf.d/01-unqualified.conf" and proceeds to pull from "docker.io". 

Expected results:

Podman reads the configuration from "/etc/containers/registries.conf.d" and pulls from the configured registry.

Additional info:

Comment 2 Tom Sweeney 2020-05-08 17:50:25 UTC
I think Valentin Rothberg fixed this sometime in the Podman v1.8 time frame.  Valentin can you confirm?

Comment 3 Daniel Walsh 2020-05-08 19:01:56 UTC
From a little detective work, it looks like the first podman version with this is podman 1.9.0
Which means to get it you will need to mode to RHEL8.2.1 which will be the next release.

Comment 4 Derrick Ornelas 2020-05-13 21:16:57 UTC
I think this bug belongs under RHEL 8, especially since RHCOS is referenced.

Comment 8 Laurie Friedman 2020-05-14 07:18:05 UTC
Setting exception+ as agreed by Kerri Anderson before 8.2.1 code freeze since podman is approved for 8.2.1 and all 8.2.1 BZs require exception+

Comment 11 Urvashi Mohnani 2020-05-21 18:03:41 UTC
*** Bug 1802213 has been marked as a duplicate of this bug. ***

Comment 12 Joy Pu 2020-05-28 13:45:14 UTC
Test with podman-1.9.3-1.module+el8.2.1+6750+e53a300c.x86_64. Comments out all items in register.conf and add file /etc/containers/registries.conf.d/01-unqualified.conf as described in the bug. Try to pull simonkrenger/echoenv but failed as expect. So set this to verified.
more details: 
# podman pull simonkrenger/echoenv
Trying to pull quay.io/simonkrenger/echoenv...
  Get https://quay.io/v2/: dial tcp 10.11.5.40:443: connect: connection refused
Error: error pulling image "simonkrenger/echoenv": unable to pull simonkrenger/echoenv: 1 error occurred:
	* Error initializing source docker://quay.io/simonkrenger/echoenv:latest: error pinging docker registry quay.io: Get https://quay.io/v2/: dial tcp 10.11.5.40:443: connect: connection refused
# podman info
...
registries:
  search:
  - quay.io
...

Comment 14 errata-xmlrpc 2020-07-21 15:32:03 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/RHSA-2020:3053


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