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

Local registry the layers of push and pull do not match #149

Closed
Mr-lq7 opened this issue Jun 29, 2023 · 2 comments
Closed

Local registry the layers of push and pull do not match #149

Mr-lq7 opened this issue Jun 29, 2023 · 2 comments

Comments

@Mr-lq7
Copy link

Mr-lq7 commented Jun 29, 2023

First, I have a k3s environment using rancher/k3s image and use registry image as private storage. The registry.yaml is configured, the content is as follows:
image

and the docker-compose.yaml is as follows and run a registry as a pull-through cache.:
image

For example, when I enter the master node container of the k3s environment, i pull two images in turn.
i) crictl pull image1
ii)crictl pull image2
and then the layers of image1 and image2 will be stored in the docker-compose service(dockerio-registry, the path in the registry container is /var/lib/registry).

Afterwards I can pull the image from the local private storage service(dockerio-registry) in a disconnected environment, these all look fine.
But when some layers of image1 and image2 are common,something unexpected happens.

As shown earlier, I pulled image1 and then image2, some of their layers are shared. When I pull image2, some layers of image1 do not repeat to pull, up to this point it was all as expected.

But in this case, _layers/sha256/ of image2 will be incompleted. No links are created in image2 that are shared with image1 !
I execute the following commands in order:

i) crictl pull image1
ii) crictl pull image2
it works fine.
but if I execute the following commands in order:
i) crictl pull image2
ii) crictl pull image1
it will report that some layers of image2 are missing, can not pull image2 !!!
As shown in the fig:
image
the sha256:c79bxxx... also exists in image1. So when i pull image2 first, something went wrong!

Also, I try push image to the dockerio-registry.

I execute the following commands in order:
i) ctr images plain-http=true push image1
ii) ctr images plain-http=true push image2

(/var/lib/registry) links will also created in image2 that are shared with image1.

So, I guess there might be a problem with the pull-through cache policy of the registry image.

I hope to get an response, thank you very much!

@milosgajdos
Copy link
Member

Please open an issue in https://github.com/distribution/distribution.

@Mr-lq7
Copy link
Author

Mr-lq7 commented Aug 1, 2023

ok, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants