Bug #21683
closed
Resyncing a Docker Repository does not update the tag information
Added by Partha Aji about 7 years ago.
Updated over 6 years ago.
Description
- Create a docker hub account. (https://cloud.docker.com/)
- Install docker on a machine
- 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
- 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
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/7067 added
- Bugzilla link set to 1513854
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
- Create a docker hub account. (https://cloud.docker.com/)
- Install docker on a machine
- 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
- 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 and 2 manifests
- 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
$ 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
- 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
- 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
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Translation missing: en.field_release set to 284
- Translation missing: en.field_release changed from 284 to 329
- Translation missing: en.field_release changed from 329 to 284
Also available in: Atom
PDF