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.
DescriptionValentin Rothberg
2021-06-29 11:34:50 UTC
Created attachment 1795755[details]
Updated/fixed registries.conf
Description of problem:
/etc/containers/registries.conf mixes the v1 and v2 notation, namely:
----------
# OLD v1 notation
[registries.search]
registries = ['registry.access.redhat.com', 'registry.redhat.io', 'docker.io']
# NEW v2 notation
unqualified-search-registries = ["registry.fedoraproject.org", "registry.access.redhat.com", "registry.centos.org", "docker.io"]
----------
Mixing the v1 and v2 notation is unsupported and should yield an error when being loaded. Ultimately, it points to a bug in the containers/image library which we should not fix now since it would break with the shipped registries.conf.
Note that only [registries.search] gets loaded; unqualified-search-registries will be ignored. But that is quite unclear when purely looking at this file.
I assume that this mix-up happened when reducing the number of search registries.
What we should do:
- Update /etc/containers/registries.conf and remove all references to the v1 notation and update the `unqualified-search-registries` with the proper set of registries. I uploaded a file how I think registries.conf should look like.
Version-Release number of selected component (if applicable):
[root@kvm-01-guest13 ~]# dnf info containers-common
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Last metadata expiration check: 0:41:39 ago on Tue 29 Jun 2021 01:50:39 PM IDT.
Installed Packages
Name : containers-common
Epoch : 1
Version : 1.2.2
Release : 4.module+el8.5.0+10387+8d85dbaf
Architecture : x86_64
Size : 299 k
Source : skopeo-1.2.2-4.module+el8.5.0+10387+8d85dbaf.src.rpm
Repository : @System
From repo : beaker-AppStream
Summary : Configuration files for working with image signatures
URL : %{git0}
License : ASL 2.0
Description : This package installs a default signature store configuration and a default
: policy under `/etc/containers/`.
How reproducible:
Always. Also reproduced on RHEL 9 beta.
Steps to Reproduce:
1. dnf install podman; cat /etc/containers/registries.conf
Additional info:
I added a registries.conf file with the appropriate fixes. Please include Miloslav and/or me when updating the packages, so we can have a final look.
This is rejected:
> unqualified-search-registries = ["registry.fedoraproject.org", "registry.access.redhat.com", "registry.centos.org", "docker.io"]
> [registries.search]
> registries = ['registry.access.redhat.com', 'registry.redhat.io', 'docker.io']
while this is accepted:
> [registries.search]
> registries = ['registry.access.redhat.com', 'registry.redhat.io', 'docker.io']
> unqualified-search-registries = ["registry.fedoraproject.org", "registry.access.redhat.com", "registry.centos.org", "docker.io"]
and like this, without comments, it’s easier to see what is going on: the second version defines, in TOML, a field registries.search.unqualified-search-registries, not the v2 top-level unqualified-search-registries field.
---
So this is, in some sense, not a bug in the config file parser, OTOH it seems quite desirable to reject such configs as a special case.
Comment 2Valentin Rothberg
2021-06-30 13:51:19 UTC
Assigning to Jindrich, since it must be fixed in the downstream registries.conf.
Comment 5Valentin Rothberg
2021-08-04 14:15:11 UTC
@Jindrich, looks good to me. Thanks for the ping!
I have a slight preference to move `short-name-mode = "enforcing"` up to line 23, maybe with a blank line in before. It looks a bit hidden down there but it does the job.
Comment 7Valentin Rothberg
2021-08-04 14:47:13 UTC
(In reply to Jindrich Novy from comment #6)
> Thanks Valentin. It's actually a good catch as we need enforcing for
> short-name-mode in RHEL9+ only and not in 8.5? If so I actually need to drop
> this...
Good catch. Yes, no enforcing in 8.5 since it would be a breaking change.
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 (Moderate: container-tools:rhel8 security, 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/RHSA-2021:4154
Created attachment 1795755 [details] Updated/fixed registries.conf Description of problem: /etc/containers/registries.conf mixes the v1 and v2 notation, namely: ---------- # OLD v1 notation [registries.search] registries = ['registry.access.redhat.com', 'registry.redhat.io', 'docker.io'] # NEW v2 notation unqualified-search-registries = ["registry.fedoraproject.org", "registry.access.redhat.com", "registry.centos.org", "docker.io"] ---------- Mixing the v1 and v2 notation is unsupported and should yield an error when being loaded. Ultimately, it points to a bug in the containers/image library which we should not fix now since it would break with the shipped registries.conf. Note that only [registries.search] gets loaded; unqualified-search-registries will be ignored. But that is quite unclear when purely looking at this file. I assume that this mix-up happened when reducing the number of search registries. What we should do: - Update /etc/containers/registries.conf and remove all references to the v1 notation and update the `unqualified-search-registries` with the proper set of registries. I uploaded a file how I think registries.conf should look like. Version-Release number of selected component (if applicable): [root@kvm-01-guest13 ~]# dnf info containers-common Updating Subscription Management repositories. Unable to read consumer identity This system is not registered with an entitlement server. You can use subscription-manager to register. Last metadata expiration check: 0:41:39 ago on Tue 29 Jun 2021 01:50:39 PM IDT. Installed Packages Name : containers-common Epoch : 1 Version : 1.2.2 Release : 4.module+el8.5.0+10387+8d85dbaf Architecture : x86_64 Size : 299 k Source : skopeo-1.2.2-4.module+el8.5.0+10387+8d85dbaf.src.rpm Repository : @System From repo : beaker-AppStream Summary : Configuration files for working with image signatures URL : %{git0} License : ASL 2.0 Description : This package installs a default signature store configuration and a default : policy under `/etc/containers/`. How reproducible: Always. Also reproduced on RHEL 9 beta. Steps to Reproduce: 1. dnf install podman; cat /etc/containers/registries.conf Additional info: I added a registries.conf file with the appropriate fixes. Please include Miloslav and/or me when updating the packages, so we can have a final look.