Bug 1931785

Summary: shortname for ubi8-minimal leads to "Repo not found" error
Product: Red Hat Enterprise Linux 8 Reporter: Ondřej Budai <obudai>
Component: skopeoAssignee: Jindrich Novy <jnovy>
Status: CLOSED ERRATA QA Contact: Yuhui Jiang <yujiang>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.4CC: atodorov, ddarrah, fj-lsoft-kichijo, gnecasov, jnovy, lfriedma, lmiksik, pthomas, smccarty, tsweeney, umohnani, ypu
Target Milestone: rcKeywords: TestBlocker, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: skopeo-1.2.2-2.el8 or newer Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1933775 (view as bug list) Environment:
Last Closed: 2021-05-18 15:34:31 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:
Bug Depends On:    
Bug Blocks: 1817517, 1933775    
Attachments:
Description Flags
Updated rhel-shortnames.conf for review. none

Description Ondřej Budai 2021-02-23 08:29:06 UTC
/etc/containers/registries.conf.d/rhel-shortnames.conf shipped in containers-common-1:1.2.2-1.module+el8.4.0+10073+30e5ea69 (subpackage of skopeo) has a wrong shortname for ubi8-minimal:

"ubi8-minimal" = "registry.access.redhat.com/repository/ubi8-minimal"


When I try to pull the image using the short name, it fails:

$ podman pull ubi8-minimal
Resolved "ubi8-minimal" as an alias (/etc/containers/registries.conf.d/rhel-shortnames.conf)
Trying to pull registry.access.redhat.com/repository/ubi8-minimal:latest...
  name unknown: Repo not found
Error: Error initializing source docker://registry.access.redhat.com/repository/ubi8-minimal:latest: Error reading manifest latest in registry.access.redhat.com/repository/ubi8-minimal: name unknown: Repo not found


When I try to pull the image using the full name, it also fails:

$ podman pull registry.access.redhat.com/repository/ubi8-minimal
Trying to pull registry.access.redhat.com/repository/ubi8-minimal:latest...
  name unknown: Repo not found
Error: Error initializing source docker://registry.access.redhat.com/repository/ubi8-minimal:latest: Error reading manifest latest in registry.access.redhat.com/repository/ubi8-minimal: name unknown: Repo not found


The official docs (https://catalog.redhat.com/software/containers/ubi8/ubi-minimal/5c359a62bed8bd75a2c3fba8?gti-tabs=unauthenticated&container-tabs=gti) says that ubi8-minimal is available at the following address:

registry.access.redhat.com/ubi8/ubi-minimal

I tried `podman pull registry.access.redhat.com/ubi8/ubi-minimal` and it indeed worked.

Interestingly, Fedora uses `registry.access.redhat.com/ubi8-minimal` as a shortname and it also works.

Comment 4 Tom Sweeney 2021-02-23 20:03:18 UTC
Ondřej,

You should not need to do this, but as a test, can you change the entry in /etc/containers/registries.conf.d/rhel-shortnames.conf of:

"ubi8-minimal" = "registry.access.redhat.com/repository/ubi8-minimal"

to

"ubi8-minimal" = "registry.access.redhat.com/ubi8/ubi-minimal"

and see if you can pull with the short name?

Scott McCarty, can you please confirm that the "registry.access.redhat.com/ubi8/ubi-minimal" is the correct location we should have in the conf file for RHEL 8.4?

Assigning to Valentin for the moment, but this may be heading to Jindrich quickly.

Comment 5 Ondřej Budai 2021-02-23 20:10:14 UTC
Yes, this fix works.

Comment 6 Valentin Rothberg 2021-02-24 10:39:27 UTC
Looking at https://github.com/containers/shortnames/blob/main/shortnames.conf, we have:

  "ubi8-minimal" = "registry.access.redhat.com/ubi8-minimal"
  "ubi8/ubi-minimal" = "registry.access.redhat.com/ubi8-minimal"

This must be resolved on the packaging side, so I am assigning it to Jindrich.

Comment 7 Jindrich Novy 2021-02-24 11:04:39 UTC
The script using Pyxis API to generate rhel-shornames.conf needs to be changed to get this one fixed. Work is in progress.

Comment 8 Jindrich Novy 2021-02-24 14:10:58 UTC
Can you please re-test with the floowing scratch build?

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=35137006

Comment 14 Ondřej Budai 2021-02-25 07:55:32 UTC
The scratch build fixed the issue.

$ podman pull ubi8-minimal
Resolved "ubi8-minimal" as an alias (/etc/containers/registries.conf.d/rhel-shortnames.conf)
Trying to pull registry.access.redhat.com/ubi8-minimal:latest...
Getting image source signatures
Checking if image destination supports signatures
Copying blob 76b9354adec6 done  
Copying blob a591faa84ab0 done  
Copying config dc080723f5 done  
Writing manifest to image destination
Storing signatures
dc080723f596f2407300cca2c19a17accad89edcf39f7b8b33e6472dd41e30f1

Comment 15 Jindrich Novy 2021-02-25 08:56:40 UTC
Created attachment 1759215 [details]
Updated rhel-shortnames.conf for review.

Comment 17 Jindrich Novy 2021-02-25 09:13:10 UTC
(In reply to Ondřej Budai from comment #14)
> The scratch build fixed the issue.
> 
> $ podman pull ubi8-minimal
> Resolved "ubi8-minimal" as an alias
> (/etc/containers/registries.conf.d/rhel-shortnames.conf)
> Trying to pull registry.access.redhat.com/ubi8-minimal:latest...
> Getting image source signatures
> Checking if image destination supports signatures
> Copying blob 76b9354adec6 done  
> Copying blob a591faa84ab0 done  
> Copying config dc080723f5 done  
> Writing manifest to image destination
> Storing signatures
> dc080723f596f2407300cca2c19a17accad89edcf39f7b8b33e6472dd41e30f1

Thanks Ondřej. Now I will allow PM to review rhel-shortnames.conf which is attached to this bug. Once confirmed I will commit and build.

Laurie, can you please confirm the attached rhel-shortnames.conf looks good?

Comment 18 Tom Sweeney 2021-02-26 00:47:12 UTC
I'm not Laurie, but I've perused through the rhel-shortnames.conf and tried pulling each of the ubi-minimal images and they all LGTM.  Jindrich, do you by chance have a change log/diff between this file that you've attached and the one that you started with?  Just to quadruple check.

Comment 26 Jindrich Novy 2021-03-05 08:21:55 UTC
*** Bug 1935570 has been marked as a duplicate of this bug. ***

Comment 29 errata-xmlrpc 2021-05-18 15:34:31 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 (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:1796