Bug 1513854 - Resyncing a Docker Repository does not update the tag information
Summary: Resyncing a Docker Repository does not update the tag information
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Container Management
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Partha Aji
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-16 06:30 UTC by Partha Aji
Modified: 2019-08-12 14:02 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:41:03 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 21683 0 None None None 2017-11-16 06:30:16 UTC

Description Partha Aji 2017-11-16 06:30:14 UTC
# Create a docker hub account. (https://cloud.docker.com/) 
# Install docker on a machine
# Run the following commands 
<pre>
docker login -u <username> docker.io
docker pull alpine
docker tag docker.io/alpine:latest docker.io/<username>/alpine:latest
docker tag docker.io/alpine:latest docker.io/<username>/alpine:greatest
docker push docker.io/<username>/alpine
</pre>
# On your katello ui create a docker repo with the following data -> name: repo1,  feed: https://registry-1.docker.io , upstream: <username>/alpine
# Sync repo1. Make sure you see a repo with 2 tags 
# Now go to https://cloud.docker.com/swarm/<username>/repository/docker/<username>/alpine/tags and delete the "latest" tag
# Sync repo1.

Expected:
Successful synced repo with 1 tag

Actual:
Successful sync but wrong tag information. You still see 2 tags

Comment 1 Partha Aji 2017-11-16 06:30:19 UTC
Created from redmine issue http://projects.theforeman.org/issues/21683

Comment 2 Partha Aji 2017-11-16 06:30:22 UTC
Upstream bug assigned to paji@redhat.com

Comment 4 Partha Aji 2017-11-16 21:21:10 UTC
Apologize the suggested steps were slightly off. The above steps actually do the expected thing. The bug was more about updating a tag to a new manifest is not handled correctly.
Here is the new set of steps

# Create a docker hub account. (https://cloud.docker.com/) 
# Install docker on a machine
# Run the following commands 

<pre>
$ mkdir images
$ cd images
$ docker login -u <username> docker.io

$ cat <<EOT > Dockerfile
FROM alpine
RUN touch bar
EOT

$ docker build -t alpine:latest  .
$ docker tag alpine:latest docker.io/<username>/alpine1:latest
$ docker push docker.io/<username>/alpine1:latest
</pre>

# On your katello ui create a docker repo with the following data -> name: repo1,  feed: https://registry-1.docker.io , upstream: <username>/alpine1
# Sync repo1. Make sure you see a repo with 1 tag
# Go to repo1 details -> click on the link next to the DockerManifest number
# Make a note on the digest numbers where "latest" tag points to 
# back on the docker terminal run the following commands 
<pre>
$ cat <<EOT > Dockerfile
FROM alpine
RUN touch foo
EOT

$ docker build -t alpine:latest  .
$ docker tag alpine:latest docker.io/<username>/alpine1:latest
$ docker push docker.io/<username>/alpine1:latest
</pre>
# On your katello ui Sync repo1 again. Make sure you see a repo with 1 tag
# Go to repo1 details -> click on the link next to the DockerManifest number

Expected:
4 Manifests with the "latest" pointing to different digests from the prior one

Actual:
4 Manifests with the "latest" pointing to same digest from the prior one

Comment 5 Satellite Program 2017-11-17 19:18:02 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21683 has been resolved.

Comment 6 Evgeni Golov 2017-11-22 10:27:27 UTC
Hey Partha,

this does not cherrypick cleanly, and before I go and break more than I want, I thought you'd do the pick for me? :))

Thanks!

Comment 9 Peter Ondrejka 2018-01-02 13:56:30 UTC
Verified on Satellite 6.3 snap 30, after changing and resyncing the repo, the manifests digests are correctly updated.

Comment 10 Bryan Kearney 2018-02-21 16:39:20 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-2018:0336

Comment 11 Bryan Kearney 2018-02-21 16:41: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-2018:0336

Comment 12 Satellite Program 2018-02-21 16:54:17 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-2018:0336


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