Open lictw opened 3 weeks ago
@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.
root@zot-0:/# ls -l /proc/1/root/var/lib/registry/
total 8880
-rw------- 1 root root 2097152 Aug 23 14:35 cache.db
-rw------- 1 root root 8388608 Aug 24 02:30 meta.db
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.
@lictw
after some pushes and retention intervals a real ones blobs are deleted,
^ can you post your full config (anonymized) especially wrt retention config etc. Also, zot logs are very informative. Pls also post relevant logs, will be easier to triage. What is your s3 backend?
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.
@lictw
"retention": {
"delay": "24h",
"policies": [
{
"repositories": ["devops/**"]
},
Are you seeing the same issue with all repos or only devops/
?
@rchincha with all, main repository is aplan
here, I just upload a test image into devops
. Even this test image has "predicted" dedupe blob from aplan/aggregation-manager
as you can see from logs.
@peusebiu can you pls take a look at this and triage?
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.