Bug 1648344

Summary: Can't sync discovered containers without slash in name from Docker.io registry
Product: Red Hat Satellite Reporter: Mirek Długosz <mzalewsk>
Component: PulpAssignee: Partha Aji <paji>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: bmbouter, daviddavis, dkliban, ehelms, ggainey, ipanova, paji, rchan, rochacbruno, ttereshc
Target Milestone: 6.5.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.10.0.24-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:38:41 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 Mirek Długosz 2018-11-09 13:24:50 UTC
When using repo discovery to pull containers from Docker.io registry, containers from main namespace (without slash in name) will fail to sync afterwards.

The problem is that while repo discovery works against `index.docker.io`, containers must be properly namespaced to be pulled from it. So instead of `alpine`, `library/alpine` must be pulled.

It seems that `library` is implicit when pulling images from `registry-1.docker.io`, so just `alpine` will work; but repo discovery doesn't work against that host, which means manual creation of repositories.

While this might be problem on Docker.io side, they are the biggest provider of images out there, so we might want to adjust to them nevertheless.


Version-Release number of selected component (if applicable):
Sat 6.5 snap 2
katello-3.9.0-0.11.rc2.el7sat.noarch
satellite-6.5.0-3.beta.el7sat.noarch
foreman-1.20.0-0.17.RC2.el7sat.noarch


Steps to Reproduce:
1. Content -> Products -> Repo discovery -> Type: Container images
2. Registry: index.docker.io -> Registry Search Parameter: alpine
3. Select `alpine` and `alpine/git` -> Create Selected -> Run repository creation
4. Navigate to product page, sync both repositories

Actual results:
Syncing `alpine` repository fails; syncing `alpine/git` succeeds.
To make alpine sync, go to details page and do either of following:
- change Registry URL to `https://registry-1.docker.io/`
- change Upstream Repository Name to `library/alpine`


Expected results:
Syncing both succeeds.

Comment 3 Partha Aji 2019-01-31 21:33:02 UTC
Moving this to the pulp team. Being tracked in https://pulp.plan.io/issues/4374 .

Basically pulp needs to handle the docker logic as per the upstream bug.

Comment 4 Partha Aji 2019-01-31 21:43:23 UTC
https://github.com/pulp/pulp_docker/pull/304  should fix it.

Comment 5 pulp-infra@redhat.com 2019-02-01 12:02:20 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 6 pulp-infra@redhat.com 2019-02-01 12:02:21 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 7 Ina Panova 2019-02-01 12:50:24 UTC
@Miroslaw afaik official docker v2 registry is located at registry-1.docker.io
only v1 clients should hit the index.docker.io, for v2 workflows registry-1.docker.io should be used.
https://pulp.plan.io/issues/4374#note-3

Comment 8 Partha Aji 2019-02-02 20:49:43 UTC
Connecting redmine issue https://projects.theforeman.org/issues/25972 from this bug

Comment 9 Bryan Kearney 2019-02-06 03:05:33 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25972 has been resolved.

Comment 10 pulp-infra@redhat.com 2019-02-06 14:01:43 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

Comment 11 pulp-infra@redhat.com 2019-02-06 18:32:23 UTC
The Pulp upstream bug status is at CLOSED - NOTABUG. Updating the external tracker on this bug.

Comment 13 jcallaha 2019-03-04 15:43:46 UTC
Verified in Satellite 6.5.0 Snap 18

Followed the steps in the initial report, and both images sync'd correctly.

See attached video for verification.

Comment 17 errata-xmlrpc 2019-05-14 12:38:41 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-2019:1222

Comment 18 Bruno Rocha 2020-01-28 16:09:56 UTC
What I've found during verification is that when using 

https://registry-1.docker.io -  it WORKS

However when using

https://index.docker.io - it FAILS