Description
Description
Periodically, the garbage collection will cleanup up an image without communicating with the blobdescriptor cache, resulting in the image being "pulled" but returning 0 bytes to the requestor.
This generates the following error:
Reproduce
Reproduction is difficult and variable. This error only happens on some of our most pulled images connected to a cluster that pulls images very frequently.
The configuration has the blobdescriptor cache set to inmemory.
Reproduction involves the following:
- Restart the container/pod
- Connect a high volume pull client
- Wait 1-2 days for the garbage collection to delete a pod that is still in the blobdescriptor cache
- Attempt to pull image and receive an error detailing how many bytes were expected but get 0 bytes.
The error only appears on a cluster using the pods as a pull through cache that frequently pulls a myriad of images.
Expected behavior
If the blob doesn't exist in the backend storage, one of two things happens:
- (Preferred) Registry pulls image from the source, and refreshes the blobs in the backend storage.
- The registry returns a 404 or another error.
registry version
3.1.2
Additional Info
The pod appears to attempt to pull from the backend storage a blob that doesn't exist. Rathering that throwing a 404 or another error, it returns a 200 with 0 bytes and the client experiences the error.
This may be related to #4939 and was thought to be fixed by #4868
A temporary workaround is to disable the blobdescriptor cache by setting the field to an empty string. This could feasibly increase latency with pulls, but prevents the mismatch between blobdescriptor cache and the backend storage.
Activity
storage: serve filesystem blobs directly from the file
storage: serve filesystem blobs directly from the file
storage: serve filesystem blobs directly from the file
storage: serve filesystem blobs directly from the file
storage: serve filesystem blobs directly from the file