this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix JuiceFS btrfs cache bug, add CI dockerfiles, staging DB access

JuiceFS v1.3.1 disables disk caching on btrfs because statfs() returns
0/0 for inodes, interpreted as 100% usage. All reads hit Hetzner S3
directly, causing 503 rate limiting and stale FUSE mounts.

Patched binary from juicedata/juicefs#6675, hosted on Docker Hub
(sansself/juicefs) to avoid circular dependency with Zot on JuiceFS.

Also: ci-opake/rust-wasm dockerfiles, Loom resource bump, opake-staging
postgres access, staging basicauth rotation.

+99 -5
+27
Makefile
··· 70 70 push-ci-validate: 71 71 docker push zot.sans-self.org/infra/ci-validate:latest 72 72 73 + # CI opake image (buildah + bash for Loom) 74 + .PHONY: build-ci-opake push-ci-opake 75 + 76 + build-ci-opake: 77 + docker buildx build --platform linux/arm64 -t zot.sans-self.org/infra/ci-opake:latest -f dockerfiles/ci-opake.Dockerfile . 78 + 79 + push-ci-opake: 80 + docker push zot.sans-self.org/infra/ci-opake:latest 81 + 82 + # JuiceFS mount image (v1.3.1 + btrfs inode cache fix from juicedata/juicefs#6675) 83 + .PHONY: build-juicefs-mount push-juicefs-mount 84 + 85 + build-juicefs-mount: 86 + docker buildx build --platform linux/arm64 -t sansself/juicefs:v1.3.1-btrfs-fix -f dockerfiles/juicefs-mount.Dockerfile . 87 + 88 + push-juicefs-mount: 89 + docker push sansself/juicefs:v1.3.1-btrfs-fix 90 + 91 + # Rust + wasm-pack base image (used in Containerfile.web wasm-builder stage) 92 + .PHONY: build-rust-wasm push-rust-wasm 93 + 94 + build-rust-wasm: 95 + docker buildx build --platform linux/arm64 -t zot.sans-self.org/infra/rust-wasm:latest -f dockerfiles/rust-wasm.Dockerfile . 96 + 97 + push-rust-wasm: 98 + docker push zot.sans-self.org/infra/rust-wasm:latest 99 +
+4
dockerfiles/ci-opake.Dockerfile
··· 1 + FROM quay.io/buildah/stable:latest 2 + 3 + RUN dnf install -y --setopt=install_weak_deps=False bash curl rclone && dnf clean all \ 4 + && echo 'unqualified-search-registries = ["docker.io"]' >> /etc/containers/registries.conf
+12
dockerfiles/juicefs-mount.Dockerfile
··· 1 + FROM juicedata/mount:ce-v1.3.1 AS base 2 + 3 + FROM golang:1.23-bullseye AS builder 4 + 5 + RUN git clone --depth 1 --branch v1.3.1 https://github.com/juicedata/juicefs.git /src 6 + WORKDIR /src 7 + COPY dockerfiles/patches/juicefs-btrfs-inode-cache.patch . 8 + RUN git apply juicefs-btrfs-inode-cache.patch 9 + RUN make juicefs 10 + 11 + FROM base 12 + COPY --from=builder /src/juicefs /usr/local/bin/juicefs
+40
dockerfiles/patches/juicefs-btrfs-inode-cache.patch
··· 1 + diff --git a/pkg/chunk/disk_cache.go b/pkg/chunk/disk_cache.go 2 + index 307c843..78f5b3d 100644 3 + --- a/pkg/chunk/disk_cache.go 4 + +++ b/pkg/chunk/disk_cache.go 5 + @@ -164,12 +164,15 @@ func newCacheStore(m *cacheManagerMetrics, dir string, cacheSize, maxItems int64 6 + 7 + func (cache *cacheStore) setlimitByFreeRatio(usage DiskFreeRatio, freeRatio float32) { 8 + sizeLimit := int64(float64(1-freeRatio) * float64(usage.spaceCap)) 9 + - inodeLimit := int64(float64(1-freeRatio) * float64(usage.inodeCap)) 10 + if sizeLimit < cache.capacity { 11 + limit := cache.capacity 12 + cache.capacity = sizeLimit 13 + logger.Infof("Adjusted cache capacity based on freeratio: from %d to %d bytes", limit, cache.capacity) 14 + } 15 + + if usage.inodeCap <= 0 { 16 + + return 17 + + } 18 + + inodeLimit := int64(float64(1-freeRatio) * float64(usage.inodeCap)) 19 + if inodeLimit < cache.maxItems || cache.maxItems == 0 { 20 + limit := cache.maxItems 21 + cache.maxItems = inodeLimit 22 + @@ -331,15 +334,15 @@ func (cache *cacheStore) stats() (int64, int64) { 23 + func (cache *cacheStore) checkFreeSpace() { 24 + for cache.available() { 25 + usage := cache.curFreeRatio() 26 + - cache.stageFull = usage.br < cache.freeRatio/2 || usage.fr < cache.freeRatio/2 27 + - cache.rawFull = usage.br < cache.freeRatio || usage.fr < cache.freeRatio 28 + + cache.stageFull = usage.br < cache.freeRatio/2 || (usage.inodeCap > 0 && usage.fr < cache.freeRatio/2) 29 + + cache.rawFull = usage.br < cache.freeRatio || (usage.inodeCap > 0 && usage.fr < cache.freeRatio) 30 + if cache.rawFull && cache.eviction != "none" { 31 + logger.Tracef("Cleanup cache when check free space (%s): free ratio (%d%%), space usage (%d%%), inodes usage (%d%%)", cache.dir, int(cache.freeRatio*100), int(usage.br*100), int(usage.fr*100)) 32 + cache.Lock() 33 + cache.cleanupFull() 34 + cache.Unlock() 35 + usage = cache.curFreeRatio() 36 + - cache.rawFull = usage.br < cache.freeRatio || usage.fr < cache.freeRatio 37 + + cache.rawFull = usage.br < cache.freeRatio || (usage.inodeCap > 0 && usage.fr < cache.freeRatio) 38 + } 39 + if cache.rawFull { 40 + cache.uploadStaging()
+3
dockerfiles/rust-wasm.Dockerfile
··· 1 + FROM rust:1.88-slim-bookworm 2 + 3 + RUN cargo install wasm-pack --locked
+2 -1
juicefs-csi-values.yaml
··· 8 8 enabled: true 9 9 manageByHelm: true 10 10 mountPodPatch: 11 - - resources: 11 + - ceMountImage: sansself/juicefs:v1.3.1-btrfs-fix 12 + resources: 12 13 limits: 13 14 cpu: 1000m 14 15 memory: 1Gi
+4 -4
k8s/ci/loom-config.yaml
··· 12 12 kubernetes.io/arch: arm64 13 13 resources: 14 14 requests: 15 - cpu: "100m" 16 - memory: "128Mi" 15 + cpu: "500m" 16 + memory: "512Mi" 17 17 limits: 18 - cpu: "1" 19 - memory: "1Gi" 18 + cpu: "2" 19 + memory: "4Gi"
k8s/opake-staging/basicauth.secret

This is a binary file and will not be displayed.

+7
k8s/postgres/network-policy.yaml
··· 17 17 kubernetes.io/metadata.name: pds 18 18 ports: 19 19 - port: 5432 20 + # Opake staging → postgres 21 + - from: 22 + - namespaceSelector: 23 + matchLabels: 24 + kubernetes.io/metadata.name: opake-staging 25 + ports: 26 + - port: 5432 20 27 # Replication between primary and standby 21 28 - from: 22 29 - podSelector: