We are building docker images and uses Foreman to sync and distribute these globally.
What I see is that if an image is updated but the tag is unchanged, the sync status shows “No content added” event though a new image was synced. Looking on the sync task I can see however that Katello seems to be aware that something was added:
“sync_result”: {
“publication_provided”: false,
“contents_changed”: true
},
Is this expected behavior? I did not expect that sync status should be “No content added” if a new image was added to the repo even though the tag was unchanged.
On Foreman 3.6.1/Katello 4.8.0.
Hi @tedevil,
If you open up the foreman task for your sync task, you can enter the Dynflow Console via a button. If you go in there and look at the “Run” tab, you should see an entry for “Actions::Pulp3::Repository::Sync”. If you open that up, can you paste the “Output” section here? If Pulp detected a change during syncing, there will be a new repository version under the created_resource
.
Also, it could potentially be a Sync Status Page bug. If you go into the manifest images for your Docker repository, do you see the new image among the list?
Output from “Actions::Pulp3::Repository::Sync”
pulp_tasks:
- pulp_href: "/pulp/api/v3/tasks/2e3f191b-9ab4-4b51-b9f6-4ab4a91d1300/"
pulp_created: '2023-05-09T15:38:18.306+00:00'
state: completed
name: pulp_container.app.tasks.synchronize.synchronize
logging_cid: 00db4106-a3cd-498f-9512-9b86020db0fe
started_at: '2023-05-09T15:38:18.372+00:00'
finished_at: '2023-05-09T15:38:20.183+00:00'
worker: "/pulp/api/v3/workers/5ab70129-951b-4937-87dc-ef2a04142ae7/"
child_tasks: []
progress_reports:
- message: Downloading Artifacts
code: sync.downloading.artifacts
state: completed
done: 2
- message: Associating Content
code: associating.content
state: completed
done: 43
- message: Downloading tag list
code: sync.downloading.tag_list
state: completed
total: 1
done: 1
- message: Processing Tags
code: sync.processing.tag
state: completed
total: 7
done: 7
- message: Un-Associating Content
code: unassociating.content
state: completed
done: 4
created_resources:
- "/pulp/api/v3/repositories/container/container/483b3df4-1f62-4f3a-9168-bb694ec36dc1/versions/16/"
reserved_resources_record:
- "/pulp/api/v3/repositories/container/container/483b3df4-1f62-4f3a-9168-bb694ec36dc1/"
- shared:/pulp/api/v3/remotes/container/container/59a4718c-51d8-410d-ac26-7ed990815a0f/
create_version: true
task_groups: []
poll_attempts:
total: 3
failed: 0
Comparing two syncs that both imported a new image from the same tag, the “versions” part is just increasing from “/versions/15/” to “/versions/16/”, the rest is the same.
Looking on the “Container Image Manifests” list for this image, I see:
Comparing it to a docker hub repo it feels like some values are missing.
Not totally familiar with the way the developers create those images but perhaps something is missing?
Looked a little on the Docker Hub repos I have and it seems to show the same behavior, new images are downloaded and added to the same tag but gets sync status “No content added”.
I found the issue, it comes down to what Katello internally considers to be “primary content types”. For some reason only Docker Tags are considered primary content types for Docker repositories.
Funny enough this issue has been around for many releases and no one yet has caught it.
Nice catch!
I’ve made an issue: Bug #36404: Container image manifests synced without tags triggers "no content added" - Katello - Foreman