Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cache does not match repo #2802

Open
clcc2019 opened this issue Nov 21, 2024 · 5 comments
Open

[Bug]: Cache does not match repo #2802

clcc2019 opened this issue Nov 21, 2024 · 5 comments
Labels
bug Something isn't working rm-external Roadmap item submitted by non-maintainers

Comments

@clcc2019
Copy link

zot version

v2.1.1

Describe the bug

{"level":"info","repository":"global/cilium","reference":"v1.16.3","goroutine":120,"caller":"zotregistry.dev/zot/pkg/api/routes.go:2023","time":"2024-11-21T09:57:57.011823158Z","message":"trying to get updated image by syncing on demand"}
{"level":"info","goroutine":122,"caller":"zotregistry.dev/zot/pkg/extensions/sync/service.go:508","time":"2024-11-21T09:57:57.011907572Z","message":"getting available client"}
{"level":"info","remote":"https://public-repo.hs.com","repository":"global/cilium","reference":"v1.16.3","goroutine":122,"caller":"zotregistry.dev/zot/pkg/extensions/sync/service.go:301","time":"2024-11-21T09:57:57.023594191Z","message":"will not sync image, filtered out by content"}
{"level":"error","error":"image is filtered out by sync config","repository":"global/cilium","reference":"v1.16.3","goroutine":120,"caller":"zotregistry.dev/zot/pkg/api/routes.go:2027","time":"2024-11-21T09:57:57.023763512Z","message":"failed to sync image"}

nerctl pull public-repo.hs.com/global/cilium:v1.16.3
image

To reproduce

  1. Configuration
  2. Client tool used
  3. Seen error

Expected behavior

No response

Screenshots

No response

Additional context

No response

@clcc2019 clcc2019 added the bug Something isn't working label Nov 21, 2024
@rchincha rchincha added the rm-external Roadmap item submitted by non-maintainers label Nov 21, 2024
@rchincha
Copy link
Contributor

@clcc2019
Copy link
Author

@clcc2019

Did you look at the following? https://github.com/project-zot/zot/blob/main/examples/config-sync.json

Yes, I have tried multiple content configurations and still cannot match the image

@rchincha
Copy link
Contributor

You have duplicate entries in that config.
Just add the "prefix": "**" and see if everything is sync'ed down.
Also make sure upstream paths, repos are correct (meaning no typos etc)

@clcc2019
Copy link
Author

You have duplicate entries in that config. Just add the "prefix": "**" and see if everything is sync'ed down. Also make sure upstream paths, repos are correct (meaning no typos etc)

I have tested it and found that when on-demand synchronization is enabled, you cannot use prefix to filter repo and destination.

@andaaron
Copy link
Contributor

andaaron commented Nov 22, 2024

Destination is not a filter, it is a prefix added to the local zot image copy, a folder in zot storage where the local copy of the image resides. You also need to include this destination as a prefix in the url when you pull from zot.

Destination was implemented to differentiate between distinct images having the same name synced from different upstream registries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rm-external Roadmap item submitted by non-maintainers
Projects
None yet
Development

No branches or pull requests

3 participants