Project

General

Profile

Actions

Bug #21681

closed

Wrong docker tags copied over on publish

Added by Partha Aji about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Container
Target version:
Difficulty:
Triaged:
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. On your katello ui create a docker repo with the following data -> name: repo2, feed: https://registry-1.docker.io , upstream: <username>/alpine
  8. Sync repo2. Make sure you see a repo with 1 tag
  9. Finally create a content view
  10. Add repo2 via Docker Content to the cv. Make sure its the repo that has 1 tag
  11. Create a Docker Content View Filter With the following data -> Type: Include
  12. Under Tags add a rule to only include the "greatest" tag
  13. Finally publish the content view and check out the published version

Expected:
A successful publish with 2 manifests and 1 Tag

Actual:
A successful publish but the manifest shows 2 Tags instead

A further look at the publish task and expanding "13: Actions::Pulp::Repository::CopyDockerTag (success) [ 1.82s / 0.39s ]"

will show the following clause.

---
source_pulp_id: f93edc01-4915-45c8-a484-e926c561949f
target_pulp_id: 1-jonathan-v1_0-f93edc01-4915-45c8-a484-e926c561949f
clauses:
  "$or":
  - name:
      "$in":
      - latest
      - greatest
      - greatest
      - greatest
      - greatest
remote_user: admin
remote_cp_user: admin
locale: en

So even though the content filter should have only published "greatest" since the source repo had only the 'greatest' tag, we are ending up copying both "greatest" and "latest"

Actions #1

Updated by Partha Aji about 7 years ago

  • Bugzilla link set to 1513769
Actions #2

Updated by The Foreman Bot about 7 years ago

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

Updated by Partha Aji about 7 years ago

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

Updated by Justin Sherrill about 7 years ago

  • Translation missing: en.field_release set to 284
Actions

Also available in: Atom PDF