Bug 1947628

Summary: [BUG] The --docker-tags-whitelist option is not allowing the syncing of whitelisted tags for a docker type repo in Satellite 6
Product: Red Hat Satellite Reporter: Sayan Das <saydas>
Component: RepositoriesAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: sganar
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8.0CC: apatel, kgaikwad, mmccune, ofedoren, pcreech, rabajaj, sganar
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:10:33 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 Sayan Das 2021-04-08 18:39:07 UTC
Description of problem:

hammer is not handing the "." in repository tags properly when using --docker-tags-whitelist option. I could reproduce this issue with any repos from rhosp-rhel8/* .


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

How reproducible:
Always

Steps to Reproduce:

1. hammer product create --name container --organization RedHat

2. hammer repository create --name "rhosp-rhel8/openstack-aodh-base" --upstream-username USER --upstream-password "PASSWORD" --docker-upstream-name "rhosp-rhel8/openstack-aodh-base" --product container --url "https://registry.redhat.io" --publish-via-http yes --content-type docker --organization RedHat

3. hammer repository update --name "rhosp-rhel8/openstack-aodh-base" --product container --docker-tags-whitelist "16.1" --organization RedHat

4. hammer repository synchronize --name "rhosp-rhel8/openstack-aodh-base" --product "container" --organization RedHat

5. hammer repository update --name "rhosp-rhel8/openstack-aodh-base" --product container --docker-tags-whitelist "16\.1" --organization RedHat

6. hammer repository synchronize --name "rhosp-rhel8/openstack-aodh-base" --product "container" --organization RedHat

Actual results:

At step 3, the tag will be correctly set to 16.1 but at step 4 , repo sync will not download any data.
~~
# hammer repository synchronize --name "rhosp-rhel8/openstack-aodh-base" --product "container" --organization RedHat
[...............................................................................................................................................................................] [100%]
~~

At step 5, when I escape the "." with "\." and update the tag as "16\.1" , it will set the tag as 16.1 only and at step 6, it will download the blobs.
~~
# hammer repository synchronize --name "rhosp-rhel8/openstack-aodh-base" --product "container" --organization RedHat
[...............................................................................................................................................................................] [100%]
New blobs: 12.
~~


Expected results:

--docker-tags-whitelist "16.1" should work and sync after that should allow downloading the data as well for that tag.


Additional info:

* This issue cannot be reproduced if we set the "Limit Sync Tags" from Satellite UI as 16.1. So from UI it works just fine.

Comment 2 Mike McCune 2021-05-13 15:07:46 UTC
Re-evaluate in 6.10 with Pulp 3, see if this is working or not

Comment 4 Justin Sherrill 2021-07-15 18:43:52 UTC
Created redmine issue https://projects.theforeman.org/issues/33039 from this bug

Comment 5 Bryan Kearney 2021-07-15 20:05:59 UTC
Upstream bug assigned to jsherril

Comment 6 Bryan Kearney 2021-07-15 20:06:01 UTC
Upstream bug assigned to jsherril

Comment 7 Justin Sherrill 2021-07-27 20:20:45 UTC
moving to modified as this is fixed already in 6.10

Comment 8 sganar 2021-09-09 10:25:14 UTC
Verified.

Tested on Satellite 6.10.0 Snap 17.0

Steps followed: 
1. hammer product create --name container --organization RedHat

2. hammer repository create --name "rhosp-rhel8/openstack-aodh-base" --upstream-username USER --upstream-password "PASSWORD" --docker-upstream-name "rhosp-rhel8/openstack-aodh-base" --product container --url "https://registry.redhat.io" --publish-via-http yes --content-type docker --organization RedHat

3. hammer repository update --name "rhosp-rhel8/openstack-aodh-base" --product container --docker-tags-whitelist "16.1" --organization RedHat

4. hammer repository synchronize --name "rhosp-rhel8/openstack-aodh-base" --product "container" --organization RedHat

5. hammer repository update --name "rhosp-rhel8/openstack-aodh-base" --product container --docker-tags-whitelist "16\.1" --organization RedHat

6. hammer repository synchronize --name "rhosp-rhel8/openstack-aodh-base" --product "container" --organization RedHat

Observation: 

Repository sync is successful with the given --docker-tags-whitelist "16.1"
Also after sync downloading the data for that tag is successful as expected.

Comment 11 errata-xmlrpc 2021-11-16 14:10:33 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: Satellite 6.10 Release), 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:4702