Project

General

Profile

Bug #21683

Resyncing a Docker Repository does not update the tag information

Added by Partha Aji almost 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Container
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

  1. Create a docker hub account. (https://cloud.docker.com/)
  2. Install docker on a machine
  3. Run the following commands
    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
    
  4. On your katello ui create a docker repo with the following data -> name: repo1, feed: https://registry-1.docker.io , upstream: <username>/alpine
  5. Sync repo1. Make sure you see a repo with 2 tags
  6. Now go to https://cloud.docker.com/swarm/&lt;username&gt;/repository/docker/&lt;username&gt;/alpine/tags and delete the "latest" tag
  7. Sync repo1.

Expected:
Successful synced repo with 1 tag

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

Associated revisions

Revision 5c11f39d (diff)
Added by Partha Aji almost 4 years ago

Fixes #21683 - Docker Tag resets properly

Prior to this commit
Resyncing a docker repo did not update the tags properly if the
upstream repo changed.

This commit remedies that issue

History

#1 Updated by The Foreman Bot almost 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7067 added

#2 Updated by Partha Aji almost 4 years ago

  • Bugzilla link set to 1513854

#3 Updated by Partha Aji almost 4 years ago

Apologize the suggested steps were slightly off. The above steps actually do the expected thing. The bug was more that updating a tag to a new manifest is not handled correctly.

Here is the new set of steps

  1. Create a docker hub account. (https://cloud.docker.com/)
  2. Install docker on a machine
  3. Run the following commands
    $ 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
    
  4. On your katello ui create a docker repo with the following data -> name: repo1, feed: https://registry-1.docker.io , upstream: <username>/alpine1
  5. Sync repo1. Make sure you see a repo with 1 tag and 2 manifests
  6. Go to repo1 details -> click on the link next to the DockerManifest number
  7. Make a note on the digest numbers where "latest" tag points to
  8. Back on the docker terminal run the following commands
    $ 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
    
  9. On your katello ui Sync repo1 again. Make sure you see a repo with 1 tag
  10. Go to repo1 details -> click on the link next to the DockerManifest number
  11. Make a note on the digest numbers where "latest" tag points to

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

#4 Updated by Partha Aji almost 4 years ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#5 Updated by Justin Sherrill almost 4 years ago

  • Legacy Backlogs Release (now unused) set to 284

#6 Updated by Justin Sherrill almost 4 years ago

  • Legacy Backlogs Release (now unused) changed from 284 to 329

#7 Updated by Justin Sherrill almost 4 years ago

  • Legacy Backlogs Release (now unused) changed from 329 to 284

Also available in: Atom PDF