-
Notifications
You must be signed in to change notification settings - Fork 102
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]: can't download image (error for several blobs) from s3 even right after image was pushed #2625
Comments
@lictw you seem to have a cloud use case with dedupe I would refer to https://github.com/project-zot/zot/blob/main/test/blackbox/cloud_only.bats#L23 for this. Note that dedupe is global across all repos and tries to keep only one copy of a blob - hence other blobs in repos with the same hash are sized zero. However, this requires we keep a cache/metadata db, dynamodb in this case. Let us know if this didn't work for you. |
@rchincha hm, must I always to use remote cache when my storage is s3? This and this say that zot should be able to work with local cache. Even with s3 my setup has PV for cache, andzot has BoltDB files, but they are pretty new.. Does zot drop local cache at some moment? This then explains why it works for a while from scratch, and then breaks.
Also, just for understanding, if cache broken, why zot does not fix it when I upload an image? In my case I upload first, only then I try to download it, so I suggest all blobs to zot and zot should accept missing blob, but it does not. About DynamoDB, I can try to setup this, but my s3 storage is not AWS, my s3 provider does not have this DB, so it's not very convenient for me.. And zot seems does not accept any other remote DB, so there is a some problem. |
@lictw so you are using a remote storage backend (S3 compatible) and a local cache. We will look at this. |
^ can you post your full config (anonymized) especially wrt retention config etc. |
Config
Logs (debug level while pulling aplan/security-server/master:latest):
About s3 backend, it's the largest russian hosting - https://selectel.ru/en/. It has some docs in EN like this and this, and it has a compability table with AWS here, in russian, but the table (methods) should be clear. |
Are you seeing the same issue with all repos or only |
@rchincha with all, main repository is |
@peusebiu can you pls take a look at this and triage? |
Hello @lictw I tried finding the issue here with the same config as you used, but the s3 backend(I used localstack). That being said, zot doesn't drop the cache. Your retention config overlaps a bit with the sync config, but retention/gc doesn't delete blobs with content without moving the content to the next blob candidate, so that shouldn't happen. You can use this: https://github.com/br0xen/boltbrowser to look inside boltdb and check if there is any discrepancy between cache's original blob(the blob with content) and storage.
Maybe something is removing the content from that PV?
Actually we do a sort of repairing at startup but maybe it needs improvements. Thank you! |
zot version
v2.1.1 (and early)
Describe the bug
There are many images with same base (
eclipse-temurin:17-jdk-focal
for ex.) and seems that a deduplication bug happens at some time: after some pushes and retention intervals a real ones blobs are deleted, all other ones have zero size and Zot can't find the real blobs to return to client.So I build an image, sucessfully push it and immediately can't download it:
Logs:
Config:
To reproduce
I do not know what actions exactly need to be done. Once I cleared the registry completely (deleted everything on s3) and everything worked for me for a while, and then it broke again..
Expected behavior
No response
Screenshots
No response
Additional context
S3 bucket contains path
/aplan/aggregation-manager/master/blobs/sha256/cb5aedc0e1fdb7b1e0021df89491ab1ecb1d06f9ed9029843e236b44cc81d167
for ex., the file has zero size and it's pretty fresh (1 day).I also have docker.hub as mirror and it's may be interesting that this test image, that I built directly from the hub image, Zot links with mirrored image that it has. But I really use this mirrored image for most real images, so it's real base image.
The text was updated successfully, but these errors were encountered: