zot: [Bug]: Push stuck because of restoring deduped blobs
zot version
v2.1.3-rc2
Describe the bug
Push to registry is blocked because of deduplication process runing with storage locking
It takes up to 30 minites to push new tag with all image layers existing in registry
logs are full with messages:
restoring deduped blobs for digest finished successfully
To reproduce
- Configuration
{
"distSpecVersion": "1.1.0",
"storage": {
"rootDirectory": "/srv/data/zot/tmp",
"dedupe": false,
"gc": true,
"gcDelay": "2h",
"gcInterval": "1h",
"retention": {
"dryRun": false,
"delay": "2h",
"policies": [
{
"repositories": ["REDACTED/*","REDACTED/*","REDACTED/*","REDACTED/*","REDACTED/*","REDACTED/*","REDACTED/*"],
"deleteReferrers": true,
"deleteUntagged": true,
"keepTags": [{
"patterns": ["v?[0-9]{1,}.[0-9]{1,}.[0-9]{1,}.*", "latest"],
"mostRecentlyPushedCount": 50,
"mostRecentlyPulledCount": 50,
"pulledWithin": "2880h",
"pushedWithin": "2880h"
}]
}
]
},
"remoteCache": true,
"cacheDriver": {
"name": "redis",
"url": "redis://10.12.18.52:6379",
"keyprefix": "zot"
},
"storageDriver": {
"name": "s3",
"region": "us-east-1",
"bucket": "registry",
"secure": false,
"skipverify": true,
"accesskey": "REDACTED",
"secretkey": "REDACTED",
"regionEndpoint": "http://127.0.0.1:8090",
"encrypt": false,
"v4auth": true,
"forcepathstyle": true
}
},
"scheduler": {
"numWorkers": 96
},
"http": {
"compat": ["docker2s2"],
"address": "10.12.18.51",
"port": "8080",
"auth": {
"htpasswd": {
"path": "/etc/zot/htpasswd"
}
},
"accessControl": {
"groups": {
"ro": {
"users": [REDACTED]
},
"rw": {
"users": [REDACTED]
},
"devops": {
"users": ["REDACTED"]
}
},
"metrics":{
"users": ["metrics-pw","metrics"]
},
"repositories": {
"**": {
"policies": [
{
"groups": ["rw"],
"actions": ["read", "create", "update"]
},
{
"groups": ["ro"],
"actions": ["read"]
}
],
"defaultPolicy": ["read"]
}
},
"adminPolicy": {
"groups": ["devops"],
"actions": ["read", "create", "update", "delete"]
}
}
},
"cluster": {
"members": ["10.12.18.51:8080","10.12.18.52:8080","10.12.18.53:8080"],
"hashKey": "siphash-rand-str"
},
"extensions": {
"search": {
"enable": true
},
"metrics": {
"enable": true,
"prometheus": {
"path": "/metrics"
}
},
"ui": {
"enable": true
}
},
"log": {
"level": "debug",
"output": "/var/log/zot/zot.log",
"audit": "/var/log/zot/zot-audit.log"
}
}
- Client tool used docker 24.0.4
- Seen error
ac575fa18186: Retrying in 4 seconds
52b064bff28f: Retrying in 4 seconds
f6d5418577c2: Retrying in 4 seconds
20b567afaaa4: Retrying in 4 seconds
47b7ffd87a6b: Retrying in 4 seconds
ac575fa18186: Retrying in 3 seconds
52b064bff28f: Retrying in 3 seconds
f6d5418577c2: Retrying in 3 seconds
20b567afaaa4: Retrying in 3 seconds
47b7ffd87a6b: Retrying in 3 seconds
ac575fa18186: Retrying in 2 seconds
52b064bff28f: Retrying in 2 seconds
f6d5418577c2: Retrying in 2 seconds
20b567afaaa4: Retrying in 2 seconds
47b7ffd87a6b: Retrying in 2 seconds
ac575fa18186: Retrying in 1 second
52b064bff28f: Retrying in 1 second
f6d5418577c2: Retrying in 1 second
20b567afaaa4: Retrying in 1 second
47b7ffd87a6b: Retrying in 1 second
received unexpected HTTP status: 500 Internal Server Error
registry contains 103 repositories, 4900 tags, 6207 blobs in s3
Expected behavior
No response
Screenshots
Additional context
log from zot
:{"level":"info","clusterMember":"10.12.18.51:8080","clusterMemberIndex":"0","module":"http","username":"gitlab","component":"session","clientIP":"10.12.18.51:49244","method":"POST","path":"/v2/REDACTED/blobs/uploads/","statusCode":500,"latency":"5m0s","bodySize":135,"headers":{"Accept-Encoding":["gzip"],"Authorization":["******"],"Content-Length":["0"],"User-Agent":["docker/24.0.5 go/go1.20.6 git-commit/a61e2b4 kernel/5.8.0-0.bpo.2-amd64 os/linux arch/amd64 UpstreamClient(Docker-Client/27.5.0 \\(linux\\))"],"X-Forwarded-For":["REDACTED"],"X-Forwarded-Proto":["https"],"X-Real-Ip":["REDACTED"]},"goroutine":538617,"caller":"zotregistry.dev/zot/pkg/api/session.go:137","time":"2025-03-02T15:15:57.241286551Z","message":"HTTP API"}
...
{"level":"error","clusterMember":"10.12.18.51:8080","clusterMemberIndex":"0","error":"s3aws: s3aws: append to zero-size path /REDACTED/.uploads/05e9d412-007f-4287-a553-5aa7a49ab238 unsupported\ns3aws: s3aws: append to zero-size path /REDACTED/.uploads/edf88d3c-5a44-46d4-81a3-ec6570388cb1 unsupported","module":"gc","goroutine":51444,"caller":"zotregistry.dev/zot/pkg/storage/gc/gc.go:90","time":"2025-03-02T15:19:16.217060501Z","message":"failed to run GC for /REDACTED"}
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 44 (17 by maintainers)
there is another side-effect of those 500 responses: deploys get longer because image pull retries , autoscaling takes more time (becuese production uses the same registry and builds affecting production in unexpected manner)
Yes, pull from kubelet and push from gitlab. I can see it in my kibana (logs are collected from 3 zot instances in debug mode) i can see it by user names or by useragents
docker - from builders, containerd - from kubelets
by verb:
please check storage locks and 500 responses graphs
the count of builds that i and my team forced to retry manualy:
Can you open a separate feature request for the GC time window?