Compare commits

..
Author SHA1 Message Date
Chris LuandClaude Opus 5.5 cbeaa63e2e seaweed-volume: ask a delisted EC shard holder before rebuilding the shard
Mirrors Go: a complete lookup that places a shard nowhere moves its
cached holders to read hints, which fetch_one_interval tries before
reconstructing and drops once they fail. Deletes and recovery keep
using only the placed locations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:38:48 -08:00
Chris LuandClaude Opus 5.5 31fd0b834e storage: ask a delisted EC shard holder before rebuilding the shard
A complete lookup that places a shard nowhere drops its holder from the
map deletes route by. That holder may still answer, and may be the one
that journaled a needle's delete, which the other shards cannot know.
Keep it as a read hint that reads try before reconstructing and drop
once it fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:32:29 -08:00
Chris LuandClaude Opus 5.5 a604414363 seaweed-volume: a partial EC lookup puts the holders it names first
fill_shard_location_gaps took a partial reply's holders only for shards
the cache did not know, so a shard that moved while the replies stayed
partial kept its old address and a read could not reach it directly.
merge_partial_shard_locations puts the holders the reply names ahead of
the cached ones, which stay as fallback, as Go does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:52:56 -08:00
Chris LuandClaude Opus 5.5 1e0244dfc8 seaweed-volume: drop a shard the master places nowhere from the location cache
Leaving shards with no location out of the reply let a complete reply
keep a former holder's cached address for a shard the master now places
nowhere. An EC delete tried that address first: an offline peer failed
the delete without the fallback to other shard holders, and a peer that
had unmounted the volume acknowledged it without writing a tombstone.

The reply now keeps every slot and only located shards count toward its
completeness. A complete reply drops a shard it places nowhere, as Go's
delete-then-append does, and a partial reply's empty slots add nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:51:29 -08:00
Chris LuandClaude Opus 5.5 55fe8bf947 storage: a partial EC lookup puts the holders it names first
A partial reply only filled shards the cache did not know, so a shard
that moved while the replies stayed partial kept its old address: a
failed direct read marked the map stale, the next partial reply skipped
the shard again, and the read fell back to a reconstruction that the
partial outage could not serve. A partial reply now puts the holders it
names ahead of the cached ones, which stay as fallback. Other shards and
the refresh time stay as they were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:50:01 -08:00
Chris LuandClaude Opus 5.5 2dbc5263bc seaweed-volume: fill a cold EC location cache from a partial lookup
write_back_shard_locations refused a reply placing fewer than the data
shards before writing anything, so a read on a cold cache kept an empty
map and could not fetch a shard directly from a holder the master did
name. A partial now fills only the shards the cache does not know,
leaves the refresh time alone and marks the map stale, as Go does. The
scrub still refuses a partial reply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:38:36 -08:00
Chris LuandClaude Opus 5.5 d674199290 storage: fill a cold EC location cache from a partial lookup
A reply placing fewer than the data shards no longer reaches the cache
at all, so a cold cache stays empty and a read cannot go straight to a
shard whose holder is up, as it could before the guard counted placed
shards. Take the holders it names for shards the cache does not know,
without touching known shards or the refresh time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:38:36 -08:00
Chris LuandClaude Opus 5.5 e23c665523 storage: count only placed shards toward an EC lookup's completeness
The master answers every shard slot, so len(ShardIdLocations) is 32
whatever is up, and the guard that should keep a partial reply from
replacing a complete cache never fired. A reply placing fewer than the
data shards now fails the lookup and leaves the cache as it was, as the
Rust server does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:38:36 -08:00
Chris LuandClaude Opus 5.5 190aa130e2 seaweed-volume: a shard the master places nowhere is not a known location
The master answers LookupEcVolume with every shard slot it tracks, so a
shard whose holders are all down comes back with no locations. The cache
kept those entries. They overwrote the cached address of a holder that
was only restarting, counted toward the reply's data-shard guard, which
therefore always passed, and made the map look neither short nor
complete, so it was re-checked only every 7 minutes. Nothing marked it
stale meanwhile: a read never tries a shard with no address.

A shard with no location is now left out of the reply, as Go's
cachedLookupEcShardLocations does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:38:34 -08:00
1200 changed files with 7468 additions and 101356 deletions

No files matched your search

-2
View File
@@ -22,5 +22,3 @@ ignore-regex = \b[a-z]+[A-Z]\w*\b|\b[A-Z][a-z]+[A-Z]\w*\b
# sme: local variable for a *streamMutateError in mount tests
# nin: AWS S3 Vectors "$nin" filter operator literal (API-defined, cannot rename)
ignore-words-list = visibles,fo,te,ser,bject,unparseable,keep-alives,tread,anc,ue,auther,thirdparty,unknwon,atleast,sme,nin
# poligon: Yandex Disk API sandbox URL path (https://yandex.ru/dev/disk/poligon/)
uri-ignore-words-list = poligon
@@ -16,7 +16,6 @@ runs:
if: inputs.target == 'x86_64-unknown-linux-musl'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
# C deps (aws-lc-sys) must compile against musl headers, not the host
# gcc's glibc headers — glibc's C23 redirects (__isoc23_sscanf,
@@ -27,7 +26,6 @@ runs:
if: inputs.target == 'aarch64-unknown-linux-musl'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
# Disable glibc fortify source — its __memcpy_chk etc. symbols don't exist in musl
+1 -1
View File
@@ -15,7 +15,7 @@ runs:
using: composite
steps:
- name: Install cosign
uses: sigstore/cosign-installer@v4.1.4
uses: sigstore/cosign-installer@v4.1.3
- name: Sign
shell: bash
+23 -113
View File
@@ -8,44 +8,38 @@ on:
- 'go.mod'
- 'go.sum'
- '.github/workflows/binaries_dev.yml'
workflow_dispatch:
# Let an in-progress dev build finish. A new push replaces only the pending
# run; cancelling mid-build left the dev release without assets.
concurrency:
group: binaries-dev-${{ github.ref }}
cancel-in-progress: false
cancel-in-progress: true
permissions:
contents: read
jobs:
prepare:
cleanup:
permissions:
contents: write # for mknejp/delete-release-assets to delete release assets
runs-on: ubuntu-latest
outputs:
build_time: ${{ steps.build_time.outputs.value }}
steps:
- name: Ref guard
if: github.ref != 'refs/heads/master'
env:
GH_REF: ${{ github.ref }}
run: |
echo "dev builds only publish from master (got $GH_REF)" >&2
exit 1
- name: Set BUILD_TIME
id: build_time
run: |
echo "value=$(date -u +%Y%m%d-%H%M)" >> "$GITHUB_OUTPUT"
steps:
- name: Delete old release assets
uses: mknejp/delete-release-assets@v1
continue-on-error: true
with:
token: ${{ github.token }}
tag: dev
fail-if-no-assets: false
assets: |
weed-*
build_dev_linux_windows:
permissions:
contents: write # for wangyoucao577/go-release-action to upload release assets
needs: prepare
needs: cleanup
runs-on: ubuntu-latest
env:
BUILD_TIME: ${{ needs.prepare.outputs.build_time }}
strategy:
matrix:
goos: [linux, windows]
@@ -53,17 +47,15 @@ jobs:
steps:
- name: Validate BUILD_TIME
run: |
: "${BUILD_TIME:?prepare output missing}"
- name: Check out code into the Go module directory
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v2
- name: Set BUILD_TIME env
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
- name: Go Release Binaries Large Disk
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -80,7 +72,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -96,10 +87,8 @@ jobs:
build_dev_darwin:
permissions:
contents: write # for wangyoucao577/go-release-action to upload release assets
needs: [prepare, build_dev_linux_windows]
needs: build_dev_linux_windows
runs-on: ubuntu-latest
env:
BUILD_TIME: ${{ needs.prepare.outputs.build_time }}
strategy:
matrix:
goos: [darwin]
@@ -107,17 +96,15 @@ jobs:
steps:
- name: Validate BUILD_TIME
run: |
: "${BUILD_TIME:?prepare output missing}"
- name: Check out code into the Go module directory
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v2
- name: Set BUILD_TIME env
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
- name: Go Release Binaries Large Disk
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -134,7 +121,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -146,79 +132,3 @@ jobs:
project_path: weed
binary_name: weed-normal-disk
asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
prune:
needs: [prepare, build_dev_linux_windows, build_dev_darwin]
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
env:
BUILD_TIME: ${{ needs.prepare.outputs.build_time }}
RELEASE_TAG: dev
steps:
- name: Delete dev binaries from older builds
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
: "${BUILD_TIME:?BUILD_TIME is empty}"
case "$BUILD_TIME" in
[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]) ;;
*) echo "Invalid BUILD_TIME: $BUILD_TIME" >&2; exit 1 ;;
esac
release_tag="${RELEASE_TAG:-dev}"
if ! release_json=$(gh api "repos/$GITHUB_REPOSITORY/releases/tags/$release_tag" 2>&1); then
case "$release_json" in
*"Not Found"*) echo "No $release_tag release; nothing to prune"; exit 0 ;;
esac
echo "Release lookup failed: $release_json" >&2
exit 1
fi
release_id=$(jq -r '.id // empty' <<<"$release_json")
if [ -z "$release_id" ]; then
echo "Release lookup returned no id" >&2
exit 1
fi
assets_file=$(mktemp)
trap 'rm -f "$assets_file"' EXIT
if ! gh api "repos/$GITHUB_REPOSITORY/releases/$release_id/assets" --paginate \
--jq '.[] | select((.name | startswith("weed-large-disk-")) or (.name | test("^weed-[0-9]"))) | [.id, .name] | @tsv' \
> "$assets_file"; then
echo "Failed to list release assets" >&2
exit 1
fi
total=$(awk 'END{print NR+0}' "$assets_file")
matching=$(awk -v s="-$BUILD_TIME-" 'index($0,s){n++} END{print n+0}' "$assets_file")
if [ "$matching" -eq 0 ]; then
echo "No assets carry stamp $BUILD_TIME; refusing to prune" >&2
exit 1
fi
build_key=${BUILD_TIME/-/}
kept=0; newer=0; deleted=0; gone=0; failed=0
while IFS=$'\t' read -r id name || [ -n "${name:-}" ]; do
[ -n "${id:-}" ] || continue
case "$name" in
*"-$BUILD_TIME-"*) kept=$((kept+1)); continue ;;
esac
if [[ "$name" =~ -([0-9]{8})-([0-9]{4})- ]] && [ "${BASH_REMATCH[1]}${BASH_REMATCH[2]}" -gt "$build_key" ]; then
newer=$((newer+1)); continue
fi
if out=$(gh api -X DELETE "repos/$GITHUB_REPOSITORY/releases/assets/$id" </dev/null 2>&1); then
deleted=$((deleted+1))
else
case "$out" in
*"Not Found"*) gone=$((gone+1)) ;;
*) failed=$((failed+1)); echo "Failed to delete asset $name ($id): $out" >&2 ;;
esac
fi
done < "$assets_file"
[ "$((kept+newer+deleted+gone+failed))" -eq "$total" ] || { echo "Processed $((kept+newer+deleted+gone+failed)) of $total assets" >&2; exit 1; }
echo "Kept $kept assets from this build and $newer from newer builds; deleted $deleted older assets; $gone already gone; $failed failures"
[ "$failed" -eq 0 ] || { echo "::warning::prune: $failed deletions failed"; exit 1; }
-2
View File
@@ -32,7 +32,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -47,7 +46,6 @@ jobs:
- name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
-2
View File
@@ -32,7 +32,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -47,7 +46,6 @@ jobs:
- name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
-2
View File
@@ -32,7 +32,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -47,7 +46,6 @@ jobs:
- name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
-2
View File
@@ -32,7 +32,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -47,7 +46,6 @@ jobs:
- name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
-2
View File
@@ -32,7 +32,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -48,7 +47,6 @@ jobs:
- name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
-2
View File
@@ -32,7 +32,6 @@ jobs:
- name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
@@ -47,7 +46,6 @@ jobs:
- name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@279495102627de7960cbc33434ab01a12bae144b # v1.22
with:
goversion: go.mod # reads the go directive, so releases build with the toolchain go.mod declares
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
+3 -3
View File
@@ -33,7 +33,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4.39.5
uses: github/codeql-action/init@v4.39.3
# Override language selection by uncommenting this and choosing your languages
with:
languages: go
@@ -41,7 +41,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
uses: github/codeql-action/autobuild@v4.39.5
uses: github/codeql-action/autobuild@v4.39.3
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -55,4 +55,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4.39.5
uses: github/codeql-action/analyze@v4.39.3
+1 -1
View File
@@ -434,7 +434,7 @@ jobs:
output: trivy-results.sarif
exit-code: '0'
- name: Upload Trivy scan results to GitHub Security
uses: github/codeql-action/upload-sarif@v4.39.5
uses: github/codeql-action/upload-sarif@v4.39.3
if: always()
with:
sarif_file: trivy-results.sarif
@@ -515,7 +515,7 @@ jobs:
- name: Upload Trivy scan results to GitHub Security
if: always()
uses: github/codeql-action/upload-sarif@v4.39.5
uses: github/codeql-action/upload-sarif@v4.39.3
with:
sarif_file: trivy-results.sarif
category: trivy-${{ matrix.variant }}
+1 -1
View File
@@ -15,4 +15,4 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: 'Dependency Review'
uses: actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294
+4 -4
View File
@@ -31,16 +31,16 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Build weed binary
run: |
cd weed && go build -o weed .
-127
View File
@@ -1,127 +0,0 @@
name: Graph
# Builds a code knowledge graph with the open-source Graphify CLI and uploads
# it as an artifact; a published release, or a dispatch naming a tag, also
# gets it as a release asset. Code-only mode parses the repository with
# tree-sitter and needs no API key or secret. Only the release job holds a
# write token, and it runs no third-party code.
#
# A release created with the default GITHUB_TOKEN does not trigger this
# workflow; dispatch it with the tag in that case.
#
# The graph is not committed: graph.json is ~150 MiB, above GitHub's 100 MiB
# file limit.
on:
schedule:
- cron: "23 4 * * *"
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Release tag to build and attach the bundle to (empty: artifact only)"
required: false
type: string
concurrency:
group: graph-${{ github.ref }}-${{ inputs.tag }}
cancel-in-progress: true
permissions:
contents: read
env:
GRAPHIFY_VERSION: "0.9.112"
# Stable community ids across runs.
PYTHONHASHSEED: "0"
# Never call an LLM, even if a runner image ships an API key or the claude
# CLI: cluster-only auto-detects a labeling backend otherwise.
GRAPHIFY_BACKEND: "none"
TAG: ${{ github.event.release.tag_name || inputs.tag }}
jobs:
graph:
name: Build code graph
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v7
with:
ref: ${{ env.TAG && format('refs/tags/{0}', env.TAG) || '' }}
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Install graphify
run: python -m pip install "graphifyy==${GRAPHIFY_VERSION}"
# Always a full extraction: graphify update re-extracts only changed
# files, so callers in unchanged files keep edges to a function's old
# id after it moves to another file.
- name: Build the graph
run: |
# Cluster once: extract alone does not write the report or HTML.
# cluster-only names communities after their hub nodes
# (GRAPHIFY_BACKEND=none keeps it from calling an LLM).
graphify extract . --code-only --no-cluster
graphify cluster-only .
- name: Graph health
run: |
graphify diagnose multigraph --json > graph-health.json
python3 - <<'PY' >> "$GITHUB_STEP_SUMMARY"
import json
summary = json.load(open("graph-health.json")).get("summary", {})
print("### Graph health")
print(f"- nodes: {summary.get('node_count', 'n/a')}")
print(f"- edges: {summary.get('raw_edge_count', 'n/a')}")
print(f"- dangling endpoints: {summary.get('dangling_endpoint_edges', 'n/a')}")
print(f"- duplicate edges: {summary.get('exact_duplicate_edges', 'n/a')}")
PY
- name: Bundle outputs
run: |
gzip -9 -c graphify-out/graph.json > graph.json.gz
files=(graph.json.gz graphify-out/GRAPH_REPORT.md graph-health.json)
# graphify skips graph.html when it cannot aggregate a large graph.
if [ -f graphify-out/graph.html ]; then
files+=(graphify-out/graph.html)
else
echo "::warning::graphify-out/graph.html was not generated"
fi
tar -czf graph-bundle.tar.gz "${files[@]}"
- name: Upload graph artifact
uses: actions/upload-artifact@v7
with:
name: graph-${{ github.sha }}
path: graph-bundle.tar.gz
retention-days: 14
release:
name: Attach graph bundle
needs: graph
if: github.event_name == 'release' || inputs.tag != ''
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- name: Download graph artifact
uses: actions/download-artifact@v8
with:
name: graph-${{ github.sha }}
- name: Upload release asset
env:
GH_TOKEN: ${{ github.token }}
run: |
asset="graph-${TAG//\//-}.tar.gz"
mv graph-bundle.tar.gz "${asset}"
gh release upload "${TAG}" "${asset}" --clobber --repo "${GITHUB_REPOSITORY}"
-77
View File
@@ -149,83 +149,6 @@ jobs:
grep -q "terminationGracePeriodSeconds: 85$" /tmp/aio-s3-prestop-own.yaml
echo "S3 preStopSeconds renders correctly"
echo "=== Testing shareProcessNamespace ==="
for workload in filer:templates/filer/filer-statefulset.yaml s3:templates/s3/s3-deployment.yaml; do
component=${workload%%:*}
template=${workload#*:}
helm template test $CHART_DIR --show-only "$template" \
--set "$component.enabled=true" > /tmp/spn-default.yaml
test "$(grep -c 'shareProcessNamespace' /tmp/spn-default.yaml)" -eq 0
helm template test $CHART_DIR --show-only "$template" \
--set "$component.enabled=true" --set "$component.shareProcessNamespace=true" > /tmp/spn.yaml
grep -q '^ shareProcessNamespace: true$' /tmp/spn.yaml
done
echo "shareProcessNamespace renders correctly"
echo "=== Testing volumeAttributesClassName ==="
pvc_args=(--set allInOne.enabled=true --set allInOne.data.type=persistentVolumeClaim
--set admin.enabled=true --set admin.allowInsecureBind=true --set volume.dataDirs[0].name=data1)
for claim in master.data master.logs filer.data filer.logs admin.data admin.logs \
volume.idx volume.logs volume.dataDirs[0]; do
pvc_args+=(--set "$claim.type=persistentVolumeClaim" --set "$claim.size=1Gi")
done
helm template test $CHART_DIR "${pvc_args[@]}" > /tmp/vac-default.yaml
test "$(grep -c 'volumeAttributesClassName' /tmp/vac-default.yaml)" -eq 0
for claim in master.data master.logs filer.data filer.logs admin.data admin.logs \
volume.idx volume.logs volume.dataDirs[0] allInOne.data; do
pvc_args+=(--set "$claim.volumeAttributesClassName=fast")
done
helm template test $CHART_DIR "${pvc_args[@]}" > /tmp/vac.yaml
test "$(grep -c '^ *volumeAttributesClassName: "fast"$' /tmp/vac.yaml)" -eq 10
helm template test $CHART_DIR --set master.data.type=persistentVolumeClaim \
--set-string master.data.volumeAttributesClassName=null > /tmp/vac-null.yaml
grep -q '^ *volumeAttributesClassName: "null"$' /tmp/vac-null.yaml
echo "volumeAttributesClassName renders correctly"
echo "=== Testing the S3 config reloader ==="
for workload in filer.s3:templates/filer/filer-statefulset.yaml s3:templates/s3/s3-deployment.yaml; do
prefix=${workload%%:*}
template=${workload#*:}
component=${prefix%%.*}
reloader_args=(--set "$prefix.enabled=true" --set "$prefix.enableAuth=true"
--set "$prefix.existingConfigSecret=s3-identities"
--set "$component.containerSecurityContext.enabled=true"
--set "$component.containerSecurityContext.runAsUser=1000")
helm template test $CHART_DIR --show-only "$template" "${reloader_args[@]}" > /tmp/reloader-off.yaml
test "$(grep -c 's3-config-reloader\|shareProcessNamespace' /tmp/reloader-off.yaml)" -eq 0
helm template test $CHART_DIR --show-only "$template" "${reloader_args[@]}" \
--set "$prefix.configReloader.enabled=true" \
--set "$prefix.configReloader.resources.limits.memory=32Mi" > /tmp/reloader-on.yaml
python3 - /tmp/reloader-off.yaml /tmp/reloader-on.yaml <<'PYEOF'
import sys, yaml
off, on = (yaml.safe_load(open(path)) for path in sys.argv[1:])
pod = on["spec"]["template"]["spec"]
main = pod["containers"][0]
reloader = next(c for c in pod["containers"] if c["name"] == "s3-config-reloader")
assert pod["shareProcessNamespace"] is True
assert reloader["image"] == main["image"]
# It must run as the same user as SeaweedFS to signal it.
assert reloader["securityContext"] == main["securityContext"], reloader.get("securityContext")
assert {"name": "config-users", "mountPath": "/etc/sw", "readOnly": True} in reloader["volumeMounts"]
assert reloader["resources"] == {"limits": {"memory": "32Mi"}}
# Without the reloader, the checksum hashes the existing Secret, so a change to it restarts the pod.
# With it, nothing may: not the Secret, and not the values of the Secret the chart generates.
annotations = lambda d: d["spec"]["template"]["metadata"].get("annotations") or {}
assert "checksum/s3config" in annotations(off)
assert "checksum/s3config" not in annotations(on), annotations(on)
PYEOF
# A release from a chart without configReloader, upgraded with --reuse-values, has no such map.
helm template test $CHART_DIR --show-only "$template" "${reloader_args[@]}" \
--set "$prefix.configReloader=null" > /tmp/reloader-old-values.yaml
test "$(grep -c 's3-config-reloader' /tmp/reloader-old-values.yaml)" -eq 0
if helm template test $CHART_DIR --show-only "$template" \
--set "$prefix.enabled=true" --set "$prefix.configReloader.enabled=true" > /tmp/reloader-noauth.yaml 2>&1; then
echo "FAIL: $prefix.configReloader rendered without $prefix.enableAuth"; exit 1
fi
grep -q "configReloader.enabled needs" /tmp/reloader-noauth.yaml
done
echo "S3 config reloader renders correctly"
echo "=== Testing the S3 config checksum is stable across renders ==="
# s3-secret.yaml keeps its generated keys with lookup. Hashing the rendered
# Secret drew new keys for the checksum whenever lookup found nothing (on
+1 -1
View File
@@ -44,7 +44,7 @@ jobs:
- name: Run Client Unit Tests
working-directory: other/java/client
run: |
mvn test -Dtest=SeaweedReadTest,SeaweedCipherTest,FilerJwtTest
mvn test -Dtest=SeaweedReadTest,SeaweedCipherTest
- name: Run HDFS3 Configuration Tests
working-directory: other/java/hdfs3
+1 -1
View File
@@ -42,7 +42,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
cache-dependency-path: |
**/go.sum
+23 -23
View File
@@ -43,23 +43,23 @@ jobs:
matrix:
container-id: [unit-tests-1]
container:
image: golang:1.27-alpine
image: golang:1.26-alpine
options: --cpus 1.0 --memory 1g --hostname kafka-unit-${{ matrix.container-id }}
env:
GOMAXPROCS: 1
CGO_ENABLED: 0
CONTAINER_ID: ${{ matrix.container-id }}
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code
uses: actions/checkout@v7
- name: Setup Container Environment
run: |
apk add --no-cache git
@@ -88,7 +88,7 @@ jobs:
matrix:
container-id: [integration-1]
container:
image: golang:1.27-alpine
image: golang:1.26-alpine
options: --cpus 2.0 --memory 2g --ulimit nofile=1024:1024 --hostname kafka-integration-${{ matrix.container-id }}
env:
GOMAXPROCS: 2
@@ -96,16 +96,16 @@ jobs:
KAFKA_TEST_ISOLATION: "true"
CONTAINER_ID: ${{ matrix.container-id }}
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code
uses: actions/checkout@v7
- name: Setup Integration Container Environment
run: |
apk add --no-cache git procps
@@ -136,7 +136,7 @@ jobs:
matrix:
container-id: [e2e-1]
container:
image: golang:1.27-alpine
image: golang:1.26-alpine
options: --cpus 2.0 --memory 2g --hostname kafka-e2e-${{ matrix.container-id }}
env:
GOMAXPROCS: 2
@@ -150,7 +150,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
cache-dependency-path: |
**/go.sum
@@ -315,7 +315,7 @@ jobs:
matrix:
container-id: [consumer-group-1]
container:
image: golang:1.27-alpine
image: golang:1.26-alpine
options: --cpus 1.0 --memory 2g --ulimit nofile=512:512 --hostname kafka-consumer-${{ matrix.container-id }}
env:
GOMAXPROCS: 1
@@ -329,7 +329,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
cache-dependency-path: |
**/go.sum
@@ -477,7 +477,7 @@ jobs:
matrix:
container-id: [client-compat-1]
container:
image: golang:1.27-alpine
image: golang:1.26-alpine
options: --cpus 1.0 --memory 1.5g --shm-size 256m --hostname kafka-client-${{ matrix.container-id }}
env:
GOMAXPROCS: 1
@@ -491,7 +491,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
cache-dependency-path: |
**/go.sum
@@ -635,7 +635,7 @@ jobs:
matrix:
container-id: [smq-integration-1]
container:
image: golang:1.27-alpine
image: golang:1.26-alpine
options: --cpus 1.0 --memory 2g --hostname kafka-smq-${{ matrix.container-id }}
env:
GOMAXPROCS: 1
@@ -649,7 +649,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
cache-dependency-path: |
**/go.sum
@@ -796,7 +796,7 @@ jobs:
matrix:
container-id: [protocol-1]
container:
image: golang:1.27-alpine
image: golang:1.26-alpine
options: --cpus 1.0 --memory 1g --tmpfs /tmp:exec --hostname kafka-protocol-${{ matrix.container-id }}
env:
GOMAXPROCS: 1
@@ -804,16 +804,16 @@ jobs:
KAFKA_PROTOCOL_ISOLATION: "true"
CONTAINER_ID: ${{ matrix.container-id }}
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code
uses: actions/checkout@v7
- name: Setup Protocol Container Environment
run: |
apk add --no-cache git procps
+4 -4
View File
@@ -42,15 +42,15 @@ jobs:
path: test/plugin_workers/volume_balance
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Run plugin worker tests
run: go test -v ./${{ matrix.path }}
+8 -8
View File
@@ -39,6 +39,7 @@ permissions:
issues: write
env:
GO_VERSION: '1.26'
TIMEOUT: '45m'
jobs:
@@ -60,11 +61,10 @@ jobs:
- name: Clean up stale FUSE mounts
uses: ./.github/actions/cleanup-stale-fuse-mounts
- name: Set up Go
id: setup-go
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ${{ env.GO_VERSION }}
cache: ${{ runner.environment == 'github-hosted' }}
cache-dependency-path: |
go.sum
@@ -532,7 +532,7 @@ jobs:
const report = fs.readFileSync(reportPath, 'utf8');
const comment = `## POSIX Compliance Test Results
**Go Version:** ${{ steps.setup-go.outputs.go-version }}
**Go Version:** ${{ env.GO_VERSION }}
**FUSE Version:** ${{ matrix.fuse-version }}
**Test Type:** ${{ github.event.inputs.test_type || 'full' }}
@@ -570,7 +570,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ${{ env.GO_VERSION }}
cache: ${{ runner.environment == 'github-hosted' }}
- name: Install macFUSE
@@ -623,7 +623,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ${{ env.GO_VERSION }}
cache: ${{ runner.environment == 'github-hosted' }}
- name: Install security analysis tools
@@ -680,7 +680,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ${{ env.GO_VERSION }}
cache: ${{ runner.environment == 'github-hosted' }}
- name: Install dependencies
@@ -733,7 +733,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ${{ env.GO_VERSION }}
cache: ${{ runner.environment == 'github-hosted' }}
- name: Install dependencies
+4 -4
View File
@@ -38,16 +38,16 @@ jobs:
run:
working-directory: test/postgres
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code
uses: actions/checkout@v7
- name: Configure Docker Hub mirror
run: |
echo '{"registry-mirrors": ["https://mirror.gcr.io"]}' | sudo tee /etc/docker/daemon.json
+20 -113
View File
@@ -7,43 +7,32 @@ on:
- 'seaweed-volume/**'
- 'seaweed-common/**'
- '.github/workflows/rust_binaries_dev.yml'
workflow_dispatch:
# Serialize dev builds of the shared "dev" release without cancelling a run.
concurrency:
group: rust-binaries-dev-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
jobs:
prepare:
cleanup:
permissions:
contents: write
runs-on: ubuntu-latest
outputs:
build_time: ${{ steps.build_time.outputs.value }}
steps:
- name: Ref guard
if: github.ref != 'refs/heads/master'
env:
GH_REF: ${{ github.ref }}
run: |
echo "dev builds only publish from master (got $GH_REF)" >&2
exit 1
- name: Set BUILD_TIME
id: build_time
run: |
echo "value=$(date -u +%Y%m%d-%H%M)" >> "$GITHUB_OUTPUT"
- name: Delete old Rust volume dev assets
uses: mknejp/delete-release-assets@v1
continue-on-error: true
with:
token: ${{ github.token }}
tag: dev
fail-if-no-assets: false
assets: |
weed-volume-*
build-rust-volume-dev-linux:
permissions:
contents: write
needs: prepare
needs: cleanup
runs-on: ubuntu-24.04
env:
BUILD_TIME: ${{ needs.prepare.outputs.build_time }}
strategy:
matrix:
include:
@@ -51,11 +40,6 @@ jobs:
asset_suffix: linux-amd64
steps:
- name: Validate BUILD_TIME
run: |
: "${BUILD_TIME:?prepare output missing}"
- uses: actions/checkout@v7
- name: Install Rust toolchain
@@ -73,6 +57,9 @@ jobs:
restore-keys: |
rust-dev-${{ matrix.target }}-
- name: Set BUILD_TIME
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> "$GITHUB_ENV"
- name: Build Rust volume server (large disk)
env:
SEAWEEDFS_COMMIT: ${{ github.sha }}
@@ -109,10 +96,8 @@ jobs:
build-rust-volume-dev-darwin:
permissions:
contents: write
needs: [prepare, build-rust-volume-dev-linux]
needs: build-rust-volume-dev-linux
runs-on: macos-latest
env:
BUILD_TIME: ${{ needs.prepare.outputs.build_time }}
strategy:
matrix:
include:
@@ -122,11 +107,6 @@ jobs:
asset_suffix: darwin-amd64
steps:
- name: Validate BUILD_TIME
run: |
: "${BUILD_TIME:?prepare output missing}"
- uses: actions/checkout@v7
- name: Install Rust toolchain
@@ -146,6 +126,9 @@ jobs:
restore-keys: |
rust-dev-${{ matrix.target }}-
- name: Set BUILD_TIME
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> "$GITHUB_ENV"
- name: Build Rust volume server (large disk)
env:
SEAWEEDFS_COMMIT: ${{ github.sha }}
@@ -178,79 +161,3 @@ jobs:
weed-volume-${{ env.BUILD_TIME }}-${{ matrix.asset_suffix }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
prune:
needs: [prepare, build-rust-volume-dev-linux, build-rust-volume-dev-darwin]
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
env:
BUILD_TIME: ${{ needs.prepare.outputs.build_time }}
RELEASE_TAG: dev
steps:
- name: Delete Rust dev binaries from older builds
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
: "${BUILD_TIME:?BUILD_TIME is empty}"
case "$BUILD_TIME" in
[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]) ;;
*) echo "Invalid BUILD_TIME: $BUILD_TIME" >&2; exit 1 ;;
esac
release_tag="${RELEASE_TAG:-dev}"
if ! release_json=$(gh api "repos/$GITHUB_REPOSITORY/releases/tags/$release_tag" 2>&1); then
case "$release_json" in
*"Not Found"*) echo "No $release_tag release; nothing to prune"; exit 0 ;;
esac
echo "Release lookup failed: $release_json" >&2
exit 1
fi
release_id=$(jq -r '.id // empty' <<<"$release_json")
if [ -z "$release_id" ]; then
echo "Release lookup returned no id" >&2
exit 1
fi
assets_file=$(mktemp)
trap 'rm -f "$assets_file"' EXIT
if ! gh api "repos/$GITHUB_REPOSITORY/releases/$release_id/assets" --paginate \
--jq '.[] | select(.name | startswith("weed-volume-")) | [.id, .name] | @tsv' \
> "$assets_file"; then
echo "Failed to list release assets" >&2
exit 1
fi
total=$(awk 'END{print NR+0}' "$assets_file")
matching=$(awk -v s="-$BUILD_TIME-" 'index($0,s){n++} END{print n+0}' "$assets_file")
if [ "$matching" -eq 0 ]; then
echo "No assets carry stamp $BUILD_TIME; refusing to prune" >&2
exit 1
fi
build_key=${BUILD_TIME/-/}
kept=0; newer=0; deleted=0; gone=0; failed=0
while IFS=$'\t' read -r id name || [ -n "${name:-}" ]; do
[ -n "${id:-}" ] || continue
case "$name" in
*"-$BUILD_TIME-"*) kept=$((kept+1)); continue ;;
esac
if [[ "$name" =~ -([0-9]{8})-([0-9]{4})- ]] && [ "${BASH_REMATCH[1]}${BASH_REMATCH[2]}" -gt "$build_key" ]; then
newer=$((newer+1)); continue
fi
if out=$(gh api -X DELETE "repos/$GITHUB_REPOSITORY/releases/assets/$id" </dev/null 2>&1); then
deleted=$((deleted+1))
else
case "$out" in
*"Not Found"*) gone=$((gone+1)) ;;
*) failed=$((failed+1)); echo "Failed to delete asset $name ($id): $out" >&2 ;;
esac
fi
done < "$assets_file"
[ "$((kept+newer+deleted+gone+failed))" -eq "$total" ] || { echo "Processed $((kept+newer+deleted+gone+failed)) of $total assets" >&2; exit 1; }
echo "Kept $kept assets from this build and $newer from newer builds; deleted $deleted older assets; $gone already gone; $failed failures"
[ "$failed" -eq 0 ] || { echo "::warning::prune: $failed deletions failed"; exit 1; }
-220
View File
@@ -1,220 +0,0 @@
name: "S3 digest and FIPS matrix"
# Runs the S3 suites in every digest mode with both volume servers and JWT
# signing on, so the sha256 digest and GODEBUG=fips140=only stay working:
# md5 GODEBUG=fips140=off, the default digest
# sha256 GODEBUG=fips140=on with the filer's -digest=sha256
# fips140only GODEBUG=fips140=only, built with GOFIPS140=v1.0.0
# test/s3/digest_matrix/start_cluster.sh starts each cell's cluster.
on:
push:
branches: [ master ]
paths:
- 'weed/s3api/**'
- 'weed/filer/**'
- 'weed/server/**'
- 'weed/operation/**'
- 'weed/storage/**'
- 'weed/security/**'
- 'weed/util/**'
- 'weed/command/**'
- 'weed/pb/**'
- 'seaweed-volume/**'
- 'seaweed-common/**'
- 'test/s3/digest_matrix/**'
- 'test/s3/compatibility/**'
- 'test/s3/etag/**'
- 'test/s3/checksum/**'
- 'docker/compose/s3.json'
- 'docker/compose/s3tests.conf'
- 'go.mod'
- 'go.sum'
- '.github/workflows/s3-digest-matrix.yml'
pull_request:
branches: [ master ]
paths:
- 'weed/s3api/**'
- 'weed/filer/**'
- 'weed/server/**'
- 'weed/operation/**'
- 'weed/storage/**'
- 'weed/security/**'
- 'weed/util/**'
- 'weed/command/**'
- 'weed/pb/**'
- 'seaweed-volume/**'
- 'seaweed-common/**'
- 'test/s3/digest_matrix/**'
- 'test/s3/compatibility/**'
- 'test/s3/etag/**'
- 'test/s3/checksum/**'
- 'docker/compose/s3.json'
- 'docker/compose/s3tests.conf'
- 'go.mod'
- 'go.sum'
- '.github/workflows/s3-digest-matrix.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.event_name == 'push' && github.ref) || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')) }}
permissions:
contents: read
jobs:
build:
name: Build weed (GOFIPS140) and weed-volume
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
cache: ${{ runner.environment == 'github-hosted' }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Fingerprint build toolchain
id: toolchain
run: echo "fingerprint=$(getconf GNU_LIBC_VERSION | tr ' ' '-')-rustc-$(rustc -V | awk '{print $2}')" >> "$GITHUB_OUTPUT"
- name: Cache cargo registry and target
if: runner.environment == 'github-hosted'
uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
seaweed-volume/target
key: rust-${{ steps.toolchain.outputs.fingerprint }}-${{ hashFiles('seaweed-volume/Cargo.lock', 'seaweed-common/Cargo.lock') }}
restore-keys: |
rust-${{ steps.toolchain.outputs.fingerprint }}-
# GOFIPS140=v1.0.0 links the frozen Go Cryptographic Module, which the
# fips140only cells need; the other cells set GODEBUG to off or on.
- name: Build weed
run: |
cd weed
CGO_ENABLED=0 GOFIPS140=v1.0.0 go build -tags s3tests -buildvcs=false -o weed .
go version -m weed | grep GOFIPS140
- name: Build weed-volume
run: cd seaweed-volume && cargo build --release
- name: Package binaries
run: tar cf digest-matrix-binaries.tar weed/weed seaweed-volume/target/release/weed-volume
- uses: actions/upload-artifact@v7
with:
name: digest-matrix-binaries
if-no-files-found: error
retention-days: 1
path: digest-matrix-binaries.tar
suites:
name: S3 suites (${{ matrix.digest }}, ${{ matrix.volume }} volume server)
needs: build
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
digest: [ md5, sha256, fips140only ]
volume: [ go, rust ]
# s3_digest names the ETag digest for the Go suites. ceph_deselect
# drops ceph tests whose answer the mode changes on purpose:
# test_object_write_check_etag expects MD5("bar") as the ETag, and
# under fips140=only SSE-C is refused with 501 before its headers are
# compared, so the SSE-C conflict tests get 501 where they expect 400.
include:
- digest: md5
s3_digest: md5
- digest: sha256
s3_digest: sha256
ceph_deselect: --deselect s3tests/functional/test_s3.py::test_object_write_check_etag
- digest: fips140only
s3_digest: sha256
ceph_deselect: >-
--deselect s3tests/functional/test_s3.py::test_object_write_check_etag
--deselect s3tests/functional/test_s3.py::test_put_obj_enc_conflict_c_s3
--deselect s3tests/functional/test_s3.py::test_put_obj_enc_conflict_c_kms
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
cache: ${{ runner.environment == 'github-hosted' }}
- uses: actions/setup-python@v7
with:
python-version: '3.10'
# The same s3-tests checkout and fixes as the "Ceph S3 tests" workflow.
- name: Clone s3-tests
run: |
git clone https://github.com/ceph/s3-tests.git
cd s3-tests
sudo apt-get update -qq
sudo apt-get install -y -qq libxml2-dev libxslt1-dev zlib1g-dev
python3 -m pip install -r requirements.txt
python3 -m pip install tox
python3 -m pip install -e .
cd ..
S3_TESTS_PATH=s3-tests python3 test/s3/compatibility/fix_s3_tests_bucket_conflicts.py
sed -i "s/assert prefixes == \['foo%2B1\/', 'foo\/', 'quux%20ab\/'\]/assert prefixes == \['foo\/', 'foo%2B1\/', 'quux%20ab\/'\]/" s3-tests/s3tests/functional/test_s3.py
sed -i "/# request PartNumber out of range/,+4{s/assert status == 400/assert status == 416/; s/assert error_code == 'InvalidPart'/assert error_code == 'InvalidPartNumber'/}" s3-tests/s3tests/functional/test_s3.py
- uses: actions/download-artifact@v8
with:
name: digest-matrix-binaries
- name: Restore binaries
run: |
tar xf digest-matrix-binaries.tar
chmod +x weed/weed seaweed-volume/target/release/weed-volume
- name: Start the cluster
env:
DIGEST_MODE: ${{ matrix.digest }}
VOLUME_SERVER: ${{ matrix.volume }}
WEED: ${{ github.workspace }}/weed/weed
WEED_VOLUME: ${{ github.workspace }}/seaweed-volume/target/release/weed-volume
WORK_DIR: /tmp/digest-matrix
S3_CONFIG: ${{ github.workspace }}/docker/compose/s3.json
run: bash test/s3/digest_matrix/start_cluster.sh
- name: Run the basic ceph s3-tests
working-directory: s3-tests
env:
S3TEST_CONF: ${{ github.workspace }}/docker/compose/s3tests.conf
run: |
mapfile -t tests < <(grep -v '^[[:space:]]*#' "$GITHUB_WORKSPACE/test/s3/compatibility/s3tests_basic.txt")
# shellcheck disable=SC2086 # the deselect list is separate arguments
tox -- "${tests[@]}" ${{ matrix.ceph_deselect }}
- name: Run the etag and checksum Go suites
env:
S3_ENDPOINT: http://127.0.0.1:8000
S3_DIGEST: ${{ matrix.s3_digest }}
S3_FIPS140_ONLY: ${{ matrix.digest == 'fips140only' && '1' || '0' }}
S3_ACCESS_KEY: some_access_key1
S3_SECRET_KEY: some_secret_key1
run: go test -count=1 -timeout 10m ./test/s3/etag/ ./test/s3/checksum/
- name: Stop the cluster
if: always()
run: xargs kill < /tmp/digest-matrix/pids 2>/dev/null || true
- name: Upload server logs on failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: digest-matrix-logs-${{ matrix.digest }}-${{ matrix.volume }}
path: /tmp/digest-matrix/*.log
retention-days: 3
+2 -2
View File
@@ -45,7 +45,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
- name: Set up Python ${{ matrix.python-version }}
@@ -153,7 +153,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
- name: Run Go unit tests
-69
View File
@@ -1,69 +0,0 @@
name: "S3 rclone fstests"
on:
push:
branches: [ master ]
paths:
- 'weed/s3api/**'
- 'weed/filer/**'
- 'weed/server/**'
- 'weed/command/mini.go'
- 'go.mod'
- 'go.sum'
- 'test/s3/rclone_fstests/**'
- '.github/workflows/s3-rclone-tests.yml'
pull_request:
branches: [ master ]
paths:
- 'weed/s3api/**'
- 'weed/filer/**'
- 'weed/server/**'
- 'weed/command/mini.go'
- 'go.mod'
- 'go.sum'
- 'test/s3/rclone_fstests/**'
- '.github/workflows/s3-rclone-tests.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.event_name == 'push' && github.ref) || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')) }}
permissions:
contents: read
jobs:
s3-rclone-fstests:
name: rclone fstests (S3 backend)
runs-on: ubuntu-24.04
timeout-minutes: 40
steps:
- name: Check out code
uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
cache: ${{ runner.environment == 'github-hosted' }}
- name: Test the result checker
working-directory: test/s3/rclone_fstests
run: python3 -m unittest -v test_check_results
- name: Run rclone fstests
working-directory: test/s3/rclone_fstests
run: make test
- name: Show server log on failure
if: failure()
working-directory: test/s3/rclone_fstests
run: tail -200 weed-test.log || true
- name: Upload results
if: always()
uses: actions/upload-artifact@v7
with:
name: s3-rclone-fstests-results
path: test/s3/rclone_fstests/results.jsonl
if-no-files-found: ignore
retention-days: 7
+184 -3
View File
@@ -197,9 +197,190 @@ jobs:
}
trap cleanup EXIT
# test/s3/compatibility/s3tests_basic.txt is shared with s3-digest-matrix.yml.
mapfile -t basic_tests < <(grep -v '^[[:space:]]*#' "$GITHUB_WORKSPACE/test/s3/compatibility/s3tests_basic.txt")
tox -- "${basic_tests[@]}"
tox -- \
s3tests/functional/test_s3.py::test_bucket_list_empty \
s3tests/functional/test_s3.py::test_bucket_list_distinct \
s3tests/functional/test_s3.py::test_bucket_list_many \
s3tests/functional/test_s3.py::test_bucket_listv2_many \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_basic \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_basic \
s3tests/functional/test_s3.py::test_bucket_listv2_encoding_basic \
s3tests/functional/test_s3.py::test_bucket_list_encoding_basic \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_prefix \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_prefix \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_prefix_ends_with_delimiter \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_prefix_ends_with_delimiter \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_alt \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_alt \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_prefix_underscore \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_prefix_underscore \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_percentage \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_percentage \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_whitespace \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_whitespace \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_dot \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_dot \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_unreadable \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_unreadable \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_empty \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_empty \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_none \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_none \
s3tests/functional/test_s3.py::test_bucket_listv2_delimiter_not_exist \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_not_exist \
s3tests/functional/test_s3.py::test_bucket_list_delimiter_not_skip_special \
s3tests/functional/test_s3.py::test_bucket_list_prefix_delimiter_basic \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_basic \
s3tests/functional/test_s3.py::test_bucket_list_prefix_delimiter_alt \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_alt \
s3tests/functional/test_s3.py::test_bucket_list_prefix_delimiter_prefix_not_exist \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_prefix_not_exist \
s3tests/functional/test_s3.py::test_bucket_list_prefix_delimiter_delimiter_not_exist \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_delimiter_not_exist \
s3tests/functional/test_s3.py::test_bucket_list_prefix_delimiter_prefix_delimiter_not_exist \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_prefix_delimiter_not_exist \
s3tests/functional/test_s3.py::test_bucket_listv2_fetchowner_notempty \
s3tests/functional/test_s3.py::test_bucket_listv2_fetchowner_defaultempty \
s3tests/functional/test_s3.py::test_bucket_listv2_fetchowner_empty \
s3tests/functional/test_s3.py::test_bucket_list_prefix_basic \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_basic \
s3tests/functional/test_s3.py::test_bucket_list_prefix_alt \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_alt \
s3tests/functional/test_s3.py::test_bucket_list_prefix_empty \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_empty \
s3tests/functional/test_s3.py::test_bucket_list_prefix_none \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_none \
s3tests/functional/test_s3.py::test_bucket_list_prefix_not_exist \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_not_exist \
s3tests/functional/test_s3.py::test_bucket_list_prefix_unreadable \
s3tests/functional/test_s3.py::test_bucket_listv2_prefix_unreadable \
s3tests/functional/test_s3.py::test_bucket_list_maxkeys_one \
s3tests/functional/test_s3.py::test_bucket_listv2_maxkeys_one \
s3tests/functional/test_s3.py::test_bucket_list_maxkeys_zero \
s3tests/functional/test_s3.py::test_bucket_listv2_maxkeys_zero \
s3tests/functional/test_s3.py::test_bucket_list_maxkeys_none \
s3tests/functional/test_s3.py::test_bucket_listv2_maxkeys_none \
s3tests/functional/test_s3.py::test_bucket_list_unordered \
s3tests/functional/test_s3.py::test_bucket_listv2_unordered \
s3tests/functional/test_s3.py::test_bucket_list_maxkeys_invalid \
s3tests/functional/test_s3.py::test_bucket_list_marker_none \
s3tests/functional/test_s3.py::test_bucket_list_marker_empty \
s3tests/functional/test_s3.py::test_bucket_listv2_continuationtoken_empty \
s3tests/functional/test_s3.py::test_bucket_listv2_continuationtoken \
s3tests/functional/test_s3.py::test_bucket_listv2_both_continuationtoken_startafter \
s3tests/functional/test_s3.py::test_bucket_list_marker_unreadable \
s3tests/functional/test_s3.py::test_bucket_listv2_startafter_unreadable \
s3tests/functional/test_s3.py::test_bucket_list_marker_not_in_list \
s3tests/functional/test_s3.py::test_bucket_listv2_startafter_not_in_list \
s3tests/functional/test_s3.py::test_bucket_list_marker_after_list \
s3tests/functional/test_s3.py::test_bucket_listv2_startafter_after_list \
s3tests/functional/test_s3.py::test_bucket_list_return_data \
s3tests/functional/test_s3.py::test_bucket_list_objects_anonymous \
s3tests/functional/test_s3.py::test_bucket_listv2_objects_anonymous \
s3tests/functional/test_s3.py::test_bucket_list_objects_anonymous_fail \
s3tests/functional/test_s3.py::test_bucket_listv2_objects_anonymous_fail \
s3tests/functional/test_s3.py::test_bucket_list_long_name \
s3tests/functional/test_s3.py::test_bucket_list_special_prefix \
s3tests/functional/test_s3.py::test_bucket_delete_notexist \
s3tests/functional/test_s3.py::test_bucket_create_delete \
s3tests/functional/test_s3.py::test_object_read_not_exist \
s3tests/functional/test_s3.py::test_multi_object_delete \
s3tests/functional/test_s3.py::test_multi_objectv2_delete \
s3tests/functional/test_s3.py::test_object_head_zero_bytes \
s3tests/functional/test_s3.py::test_object_write_check_etag \
s3tests/functional/test_s3.py::test_object_write_cache_control \
s3tests/functional/test_s3.py::test_object_write_expires \
s3tests/functional/test_s3.py::test_put_obj_enc_conflict_c_s3 \
s3tests/functional/test_s3.py::test_put_obj_enc_conflict_c_kms \
s3tests/functional/test_s3.py::test_put_obj_enc_conflict_s3_kms \
s3tests/functional/test_s3.py::test_put_obj_enc_conflict_bad_enc_kms \
s3tests/functional/test_s3.py::test_object_content_encoding_aws_chunked \
s3tests/functional/test_s3.py::test_object_write_read_update_read_delete \
s3tests/functional/test_s3.py::test_object_metadata_replaced_on_put \
s3tests/functional/test_s3.py::test_object_write_file \
s3tests/functional/test_s3.py::test_post_object_invalid_date_format \
s3tests/functional/test_s3.py::test_post_object_no_key_specified \
s3tests/functional/test_s3.py::test_post_object_missing_signature \
s3tests/functional/test_s3.py::test_post_object_condition_is_case_sensitive \
s3tests/functional/test_s3.py::test_post_object_expires_is_case_sensitive \
s3tests/functional/test_s3.py::test_post_object_missing_expires_condition \
s3tests/functional/test_s3.py::test_post_object_missing_conditions_list \
s3tests/functional/test_s3.py::test_post_object_upload_size_limit_exceeded \
s3tests/functional/test_s3.py::test_post_object_missing_content_length_argument \
s3tests/functional/test_s3.py::test_post_object_invalid_content_length_argument \
s3tests/functional/test_s3.py::test_post_object_upload_size_below_minimum \
s3tests/functional/test_s3.py::test_post_object_empty_conditions \
s3tests/functional/test_s3.py::test_get_object_ifmatch_good \
s3tests/functional/test_s3.py::test_get_object_ifnonematch_good \
s3tests/functional/test_s3.py::test_get_object_ifmatch_failed \
s3tests/functional/test_s3.py::test_get_object_ifnonematch_failed \
s3tests/functional/test_s3.py::test_get_object_ifmodifiedsince_good \
s3tests/functional/test_s3.py::test_get_object_ifmodifiedsince_failed \
s3tests/functional/test_s3.py::test_get_object_ifunmodifiedsince_failed \
s3tests/functional/test_s3.py::test_get_checksum_object_attributes \
s3tests/functional/test_s3.py::test_bucket_head \
s3tests/functional/test_s3.py::test_bucket_head_notexist \
s3tests/functional/test_s3.py::test_object_raw_authenticated \
s3tests/functional/test_s3.py::test_object_raw_authenticated_bucket_acl \
s3tests/functional/test_s3.py::test_object_raw_authenticated_object_acl \
s3tests/functional/test_s3.py::test_object_raw_authenticated_object_gone \
s3tests/functional/test_s3.py::test_object_raw_get_x_amz_expires_out_range_zero \
s3tests/functional/test_s3.py::test_object_anon_put \
s3tests/functional/test_s3.py::test_object_put_authenticated \
s3tests/functional/test_s3.py::test_bucket_recreate_overwrite_acl \
s3tests/functional/test_s3.py::test_bucket_recreate_new_acl \
s3tests/functional/test_s3.py::test_buckets_create_then_list \
s3tests/functional/test_s3.py::test_buckets_list_ctime \
s3tests/functional/test_s3.py::test_list_buckets_invalid_auth \
s3tests/functional/test_s3.py::test_list_buckets_bad_auth \
s3tests/functional/test_s3.py::test_bucket_create_naming_good_contains_period \
s3tests/functional/test_s3.py::test_bucket_create_naming_good_contains_hyphen \
s3tests/functional/test_s3.py::test_bucket_list_special_prefix \
s3tests/functional/test_s3.py::test_object_copy_zero_size \
s3tests/functional/test_s3.py::test_object_copy_same_bucket \
s3tests/functional/test_s3.py::test_object_copy_to_itself \
s3tests/functional/test_s3.py::test_object_copy_diff_bucket \
s3tests/functional/test_s3.py::test_object_copy_canned_acl \
s3tests/functional/test_s3.py::test_object_copy_bucket_not_found \
s3tests/functional/test_s3.py::test_object_copy_key_not_found \
s3tests/functional/test_s3.py::test_multipart_copy_small \
s3tests/functional/test_s3.py::test_multipart_copy_without_range \
s3tests/functional/test_s3.py::test_multipart_copy_special_names \
s3tests/functional/test_s3.py::test_multipart_copy_multiple_sizes \
s3tests/functional/test_s3.py::test_multipart_get_part \
s3tests/functional/test_s3.py::test_multipart_upload \
s3tests/functional/test_s3.py::test_multipart_upload_empty \
s3tests/functional/test_s3.py::test_multipart_upload_multiple_sizes \
s3tests/functional/test_s3.py::test_multipart_upload_contents \
s3tests/functional/test_s3.py::test_multipart_upload_overwrite_existing_object \
s3tests/functional/test_s3.py::test_multipart_upload_size_too_small \
s3tests/functional/test_s3.py::test_multipart_resend_first_finishes_last \
s3tests/functional/test_s3.py::test_multipart_upload_resend_part \
s3tests/functional/test_s3.py::test_multipart_upload_missing_part \
s3tests/functional/test_s3.py::test_multipart_upload_incorrect_etag \
s3tests/functional/test_s3.py::test_abort_multipart_upload \
s3tests/functional/test_s3.py::test_list_multipart_upload \
s3tests/functional/test_s3.py::test_atomic_read_1mb \
s3tests/functional/test_s3.py::test_atomic_read_4mb \
s3tests/functional/test_s3.py::test_atomic_read_8mb \
s3tests/functional/test_s3.py::test_atomic_write_1mb \
s3tests/functional/test_s3.py::test_atomic_write_4mb \
s3tests/functional/test_s3.py::test_atomic_write_8mb \
s3tests/functional/test_s3.py::test_atomic_dual_write_1mb \
s3tests/functional/test_s3.py::test_atomic_dual_write_4mb \
s3tests/functional/test_s3.py::test_atomic_dual_write_8mb \
s3tests/functional/test_s3.py::test_atomic_multipart_upload_write \
s3tests/functional/test_s3.py::test_ranged_request_response_code \
s3tests/functional/test_s3.py::test_ranged_big_request_response_code \
s3tests/functional/test_s3.py::test_ranged_request_skip_leading_bytes_response_code \
s3tests/functional/test_s3.py::test_ranged_request_return_trailing_bytes_response_code \
s3tests/functional/test_s3.py::test_copy_object_ifmatch_good \
s3tests/functional/test_s3.py::test_copy_object_ifnonematch_failed \
s3tests/functional/test_s3.py::test_copy_object_ifmatch_failed \
s3tests/functional/test_s3.py::test_copy_object_ifnonematch_good \
s3tests/functional/test_s3.py::test_lifecycle_set \
s3tests/functional/test_s3.py::test_lifecycle_get \
s3tests/functional/test_s3.py::test_lifecycle_set_filter
# The expiration tests race the lifecycle worker's meta-log replay;
# under the suite's write flood a shard can trail an object's PUT
@@ -40,7 +40,7 @@ jobs:
- uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
go-version: ^1.26
cache: ${{ runner.environment == 'github-hosted' }}
- name: Build SeaweedFS
+4 -4
View File
@@ -31,16 +31,16 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Build weed binary
run: |
cd weed && go build -o weed .
@@ -31,16 +31,16 @@ jobs:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Set up Go 1.x
uses: actions/setup-go@v7
with:
cache: ${{ runner.environment == 'github-hosted' }}
go-version-file: 'go.mod'
go-version: ^1.26
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v7
- name: Build weed binary
run: |
cd weed && go build -o weed .
-3
View File
@@ -151,6 +151,3 @@ __pycache__/
/test/s3vectors/weed-worker
/test/s3vectors/weed-volume
.pytest_cache/
# Graphify code graph (generated by .github/workflows/graph.yml)
graphify-out/
+1 -11
View File
@@ -36,7 +36,6 @@ Table of Contents
* [Docker Compose](#docker-compose)
* [Kubernetes with Helm](#kubernetes-with-helm)
* [Build from source](#build-from-source)
* [Development builds](#development-builds)
* [Scale out](#scale-out)
* [Why SeaweedFS](#why-seaweedfs)
* [Fast](#fast)
@@ -88,7 +87,7 @@ AWS_ACCESS_KEY_ID=admin AWS_SECRET_ACCESS_KEY=secret \
The same process also runs the master, a volume server, the filer, WebDAV, the Iceberg REST catalog, and the Admin UI. Add `S3_TABLE_BUCKET=warehouse` to also create an Iceberg table bucket, or `warehouse:LANCE` for a Lance one. Drop the AWS keys to run without authentication for development.
`weed mini` binds the Admin UI/API and WebDAV to `-ip.bind` like its other components, even without authentication, so use it on a trusted network or set `WEED_ADMIN_PASSWORD` or `https.admin` mTLS. Pass `-admin.allowInsecureBind=false` or `-webdav.allowInsecureBind=false` to keep an unauthenticated Admin or WebDAV on loopback. The Admin worker gRPC control plane stays on loopback; remote workers must opt in with `-admin.worker.ip=<address>` and should configure `grpc.admin` mTLS.
Without Admin authentication or mTLS, `weed mini` binds the Admin UI/API and its worker gRPC control plane to loopback rather than `-ip.bind`. Set `WEED_ADMIN_PASSWORD` or configure `https.admin` mTLS to keep the network bind. Remote workers must opt in with `-admin.worker.ip=<address>` and should configure `grpc.admin` mTLS. `-admin.allowInsecureBind` restores the legacy unauthenticated network bind and should only be used on an isolated network.
> macOS: if the binary is quarantined, run `xattr -d com.apple.quarantine ./weed` first.
@@ -176,15 +175,6 @@ cd seaweedfs/weed && make install
`weed` lands in `$GOPATH/bin`. [Getting Started][GettingStarted] covers running master, volume, filer, and S3 as separate processes.
## Development builds ##
Each dev build workflow publishes its latest successful build of `master`:
- **Binaries**: the [`dev` release](https://github.com/seaweedfs/seaweedfs/releases/tag/dev) has Linux amd64, Windows amd64, and macOS amd64/arm64 archives named `weed-<yyyymmdd-HHMM>-<linux|windows|darwin>-<arch>.tar.gz` (`.zip` on Windows) and `weed-large-disk-<yyyymmdd-HHMM>-<linux|windows|darwin>-<arch>`, each with an `.md5` checksum. The Rust volume server is published there too as `weed-volume-*` for Linux amd64 (glibc) and macOS amd64/arm64. The Go archives contain `weed-normal-disk` or `weed-large-disk` (`.exe` on Windows) rather than `weed`, and the Rust archives contain `weed-volume-normal` or `weed-volume-large-disk` rather than `weed-volume`, so rename or symlink the one you want. The `.md5` files are published for the Go archives only.
- **Containers**: `docker pull chrislusf/seaweedfs:dev` or `ghcr.io/chrislusf/seaweedfs:dev`, built for `linux/amd64` and `linux/arm64`. The [dev compose file](docker/seaweedfs-dev-compose.yml) runs the Docker Hub image as master, volume, filer, S3, WebDAV, and admin.
The timestamp in a binary name is the UTC start time of the run that built it. The Go binaries, the Rust volume server, and the `:dev` image come from three separate path-filtered workflows, so they can carry different timestamps and lag `master` by hours, or much longer when their paths were not touched. The release can list more than one timestamp for a while, for example after a failed or retried run; use the newest one for your platform. The `dev` release is marked pre-release, so it does not appear under [releases/latest](https://github.com/seaweedfs/seaweedfs/releases/latest); these builds come from `master`, can break at any commit, and are not recommended for production.
## Scale out ##
Capacity is a volume server. Start one on any machine with disk and point it at the master:
+2 -15
View File
@@ -278,24 +278,11 @@ automatic vacuum or another request is running does nothing and gets
### Delete a collection
```bash
curl -X DELETE "http://localhost:9333/col/delete?collection=benchmark"
curl "http://localhost:9333/col/delete?collection=benchmark"
```
Deletes all volumes of the collection, including erasure-coded shards.
`204 No Content` on success. Only the `DELETE` method is accepted; any other
method gets `405 Method Not Allowed`.
The `collection` parameter is required: a request without it, or with an
empty value, gets `400 Bad Request`. To delete the default (empty-named)
collection, name it explicitly with `collection=_default` or
`collection=_default_`, the keywords `weed shell collection.delete` accepts.
If a collection is literally named a keyword, that name deletes it, and when
it exists next to the default collection the request gets
`400 Bad Request`; use the other keyword for the default collection. If both
keyword names are literal collections next to the default collection, both
keywords get `400 Bad Request`; delete the default collection with
`weed shell` `collection.delete -collection _default -apply`, where the
keywords always mean the default collection.
`204 No Content` on success.
### Health
+1 -4
View File
@@ -169,10 +169,7 @@ func Run(args []string) int {
}
func runWithOptions(opts *Options) bool {
if err := util.LoadSecurityConfigurationOrError(); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
return false
}
util.LoadConfiguration("security", false)
// Validate options.
if opts.MasterAddr == "" {
-6
View File
@@ -13,7 +13,6 @@ import (
"github.com/peterh/liner"
"github.com/seaweedfs/seaweedfs/weed/query/engine"
"github.com/seaweedfs/seaweedfs/weed/util"
flag "github.com/seaweedfs/seaweedfs/weed/util/fla9"
"github.com/seaweedfs/seaweedfs/weed/util/grace"
"github.com/seaweedfs/seaweedfs/weed/util/sqlutil"
@@ -107,11 +106,6 @@ func Run(args []string) int {
}
func runWithOptions(opts *Options) bool {
if err := util.LoadSecurityConfigurationOrError(); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
return false
}
// Initialize SQL engine with master address for service discovery.
sqlEngine := engine.NewSQLEngine(opts.Master)
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.27 AS builder
FROM golang:1.26 AS builder
RUN apt-get update && \
apt-get install -y build-essential wget ca-certificates && \
+1 -1
View File
@@ -1,6 +1,6 @@
# Pin the builder to the host arch and cross-compile the (CGO-free) Go binary,
# so arm64/arm/386 targets skip QEMU emulation of the whole compile.
FROM --platform=$BUILDPLATFORM golang:1.27-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.26-alpine AS builder
RUN apk add git g++ fuse
RUN mkdir -p /go/src/github.com/seaweedfs/
ARG BRANCH=${BRANCH:-master}
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.27 AS builder
FROM golang:1.26 AS builder
RUN apt-get update
RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.27 AS builder
FROM golang:1.26 AS builder
RUN apt-get update
RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev
+1 -3
View File
@@ -21,9 +21,7 @@ docker compose -f seaweedfs-compose.yml -p seaweedfs up
```
## Try the latest development image
The compose file below uses `chrislusf/seaweedfs:dev`, built from `master`. It is a development image, not a stable release, and can lag `master` by hours or more; the `org.opencontainers.image.revision` label records the commit it was built from, and pinning by digest keeps that exact build. See [Development builds](../README.md#development-builds) for the `dev` binaries and image details.
## Try latest tip
```bash
+1 -6
View File
@@ -2,12 +2,7 @@
# Enable FIPS 140-3 mode by default (Go 1.24+)
# To disable: docker run -e GODEBUG=fips140=off ...
# For strict mode: docker run -e GODEBUG=fips140=only ...
# The default goes first: Go applies the last of repeated GODEBUG settings, so
# the caller's fips140 value wins.
# Transparent huge pages are a host-wide setting this image cannot change; to
# turn them off for this process only, append GODEBUG=disablethp=1.
export GODEBUG="fips140=on${GODEBUG:+,$GODEBUG}"
export GODEBUG="${GODEBUG:+$GODEBUG,}fips140=on"
# Fix permissions for mounted volumes
# If /data is mounted from host, it might have different ownership
-157
View File
@@ -1,157 +0,0 @@
# Yandex Disk as a remote storage
SeaweedFS can mount a Yandex Disk and mirror buckets to it, the same way it uses
S3, Google Cloud Storage, or Azure Blob Storage. The storage type is `yandex`.
Yandex Disk has no buckets: a **top-level folder under `yandex.root` plays the
bucket**, and the folder holds the objects. A file's modification time and
content encoding, which the Disk API cannot store natively, travel as custom
resource properties (`seaweedfs_modified`, `seaweedfs_content_encoding`). The
client also reads `rclone_modified`, so objects uploaded by rclone keep their
mtime.
## Limitations to know first
- The public Disk API has **no multipart upload**: an object is one PUT. Very
large objects are limited by the plan's maximum file size (see `GET /` quota)
and need a long HTTP timeout.
- Writes are expensive: one upload is an upload-link request, the PUT, a
metadata PATCH, and a stat.
- Yandex applies rate limits; the client retries 423, 429, 5xx and 509 with a
backoff, the sync retries a failed upload from a fresh reader.
- The Disk API lists one folder per request, so `remote.cache` and
`remote.copy.local`, which walk a whole tree, cost one request per folder.
- S3 keys that contain characters Yandex rejects in a path fail; there is no
key-encoding layer. S3 keys are not folders: a prefix that only appears as
part of object names is created on demand.
- This is a consumer product: it fits backups and small mirrors, not millions
of objects or a high request rate.
## 1. Register an OAuth app
1. Open <https://oauth.yandex.ru/client/new> and create an app.
2. Pick the **Web services** platform.
3. Set the redirect URI to `https://oauth.yandex.ru/verification_code`. That
page shows the authorization code (or the token) for the operator to copy,
so no browser is needed on the server.
4. Grant the app the permissions you need:
- `cloud_api:disk.write` — write anywhere on the disk (needed for buckets
and for `-yandex.root` outside the app folder),
- `cloud_api:disk.read` — read the disk,
- `cloud_api:disk.info` — read the quota,
- `cloud_api:disk.app_folder` — app folder only; then the configuration
needs `-yandex.app_folder=true`.
5. Copy the **ClientID** (and the **Client secret** if you want a refreshable
token).
A Yandex Mail account is required for a working Disk subscription; a token
issued for an account without one fails with
`403 DiskUnsupportedUserAccountTypeError`.
## 2. Get a token
### Refreshable token (recommended)
```bash
# 1. print the authorization url and keep the app credentials
weed shell -master=... <<< "remote.configure -name=disk -type=yandex \
-yandex.client_id=<client id> -yandex.client_secret=<client secret> -yandex.oauth_url"
# 2. open the printed url, allow the app, copy the code from the page
# 3. store the token
weed shell -master=... <<< "remote.configure -name=disk -yandex.code=<code>"
```
The stored value is a token JSON document
(`{"access_token","refresh_token","token_type","expiry"}`, the same shape
rclone stores), so a token can also be copied from an existing rclone
configuration.
### Debug token (one year, no refresh)
Open
`https://oauth.yandex.ru/authorize?response_type=token&client_id=<client id>`
in a browser, allow the app, and copy the token. Then:
```bash
weed shell -master=... <<< "remote.configure -name=disk -type=yandex -yandex.token=<token>"
```
To try the backend without registering an app, the Disk API polygon
(<https://yandex.ru/dev/disk/poligon/>) issues a one-year token for its own
OAuth app: sign in, click "Получить OAuth-токен", allow the access, and copy
`access_token` from the address the page lands on. That token cannot be
refreshed; use the code flow above for anything long-lived.
## 3. Configure
```bash
remote.configure -name=disk -type=yandex -yandex.token=<token> [-yandex.root=/seaweedfs]
```
| flag | meaning |
| --- | --- |
| `-yandex.token` | token JSON or a bare access token |
| `-yandex.client_id`, `-yandex.client_secret` | OAuth app credentials, needed to refresh the token and for `-yandex.code` |
| `-yandex.root` | folder that holds the buckets, default `/` |
| `-yandex.app_folder` | the token only reaches the app folder: paths are addressed under `app:` |
| `-yandex.trash` | move deleted files to the trash instead of deleting them permanently (the trash keeps occupying quota) |
| `-yandex.endpoint` | override the API endpoint, e.g. for a proxy (default `https://cloud-api.yandex.net/v1/disk`); it must be `https`, plain `http` is accepted on a loopback host only, since every request carries the OAuth token |
A dedicated root (`-yandex.root=/seaweedfs`) is recommended: with the default
`/`, `remote.mount.buckets` treats every top-level folder of the disk,
personal folders included, as a bucket.
## 4. Mount or mirror
```bash
# mount one folder as a local directory
remote.mount -dir=/buckets/photos -remote=disk/photos
# mount every folder under the root as a bucket and pull its metadata
remote.mount.buckets -remote=disk -apply
# pull remote changes into the local metadata later
remote.meta.sync -dir=/buckets/photos
# mirror local buckets to the disk
weed filer.remote.gateway -filer=<filer host>:<filer port> -createBucketAt=disk
```
`weed filer.remote.sync -filer=... -dir=/buckets` uploads changes made under
the mounted directories.
Deleting a local bucket deletes its remote folder only when that folder is
empty, the same rule S3 and GCS apply to a bucket: a Disk API delete is
recursive, and the folder may hold files SeaweedFS never saw.
## Token lifetime and refresh
An access token and its refresh token both live about a year. The client
refreshes the access token when it expires or when the API answers 401, and
uses the new refresh token Yandex returns. The refreshed token is kept in
memory only: a client cannot write the configuration back to the filer, so
every restart, and every other process using the same configuration, starts
again from the stored refresh token. Yandex does not document whether that
token stays valid once a newer one has been issued, so after a refresh a
restart can fail with `invalid_grant`. Then, or when the stored token nears
the end of its year, issue a new one with `-yandex.oauth_url` and
`-yandex.code` above. Yandex recommends refreshing a long-lived token every
three months.
## Not covered
- `weed filer.backup` and the legacy `weed/replication/sink` sinks have no
Yandex backend; use `filer.remote.sync` / `filer.remote.gateway`.
- The Rust volume server (`seaweed-volume`) supports only S3-compatible remote
storage; a Yandex remote cannot back a tiered volume there.
## Troubleshooting
- `403 DiskUnsupportedUserAccountTypeError` — the account has no Yandex Mail /
Disk subscription.
- `401` on every request — the token is wrong or revoked; reissue it.
- `invalid_grant` while refreshing — the refresh token expired or was rotated
elsewhere; reissue it.
- `500` right after an upload — Yandex finalizes an upload asynchronously; the
client retries the stat, and a retry of the whole upload succeeds.
+250 -244
View File
@@ -1,119 +1,93 @@
module github.com/seaweedfs/seaweedfs
go 1.27.4
go 1.26.6
require (
cloud.google.com/go/kms v1.36.1
cloud.google.com/go v0.123.0 // indirect
cloud.google.com/go/pubsub v1.51.1
cloud.google.com/go/storage v1.69.0
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.24.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.14.1
github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.10.0
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.8.3
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/Jille/raft-grpc-transport v1.6.1
github.com/Shopify/sarama v1.38.1
github.com/ThreeDotsLabs/watermill v1.5.3
github.com/a-h/templ v0.3.1100
github.com/apache/arrow-go/v18 v18.9.0
github.com/apache/cassandra-gocql-driver/v2 v2.1.2
github.com/apache/iceberg-go v0.7.0
github.com/apple/foundationdb/bindings/go v0.0.0-20250911184653-27f7192f47c3
github.com/arangodb/go-driver v1.6.9
github.com/aws/aws-sdk-go v1.55.8
github.com/aws/aws-sdk-go-v2 v1.48.1
github.com/aws/aws-sdk-go-v2/config v1.33.9
github.com/aws/aws-sdk-go-v2/credentials v1.20.9
github.com/aws/aws-sdk-go-v2/service/s3 v1.114.10
github.com/aws/aws-sdk-go-v2/service/sts v1.51.6
github.com/aws/smithy-go v1.28.10
github.com/beorn7/perks v1.0.1 // indirect
github.com/bwmarrin/snowflake v0.3.0
github.com/cenkalti/backoff/v4 v4.3.0
github.com/cespare/xxhash/v2 v2.3.0
github.com/cognusion/imaging v1.0.4
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.7.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dustin/go-humanize v1.1.0
github.com/eapache/go-resiliency v1.6.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c // indirect
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4
github.com/fluent/fluent-logger-golang v1.10.1
github.com/getsentry/sentry-go v0.50.0
github.com/go-ldap/ldap/v3 v3.4.14
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect
github.com/fsnotify/fsnotify v1.10.1 // indirect
github.com/go-redsync/redsync/v4 v4.18.0
github.com/go-sql-driver/mysql v1.10.1
github.com/golang-jwt/jwt/v5 v5.3.1
github.com/go-zookeeper/zk v1.0.4 // indirect
github.com/golang/protobuf v1.5.4
github.com/golang/snappy v1.0.0
github.com/google/btree v1.1.3
github.com/google/flatbuffers/go v0.0.0-20230108230133-3b8644d32c50
github.com/google/uuid v1.6.0
github.com/google/wire v0.7.0 // indirect
github.com/googleapis/gax-go/v2 v2.27.0 // indirect
github.com/gorilla/mux v1.8.1
github.com/gorilla/sessions v1.4.0
github.com/hashicorp/go-metrics v0.7.0
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/hashicorp/raft v1.8.0
github.com/hashicorp/raft-boltdb/v2 v2.4.2
github.com/hashicorp/vault/api v1.23.0
github.com/jackc/pgx/v5 v5.13.0
github.com/jhump/protoreflect v1.19.0
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/jackc/pgx/v5 v5.10.0
github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
github.com/jinzhu/copier v0.4.0
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12
github.com/k0kubun/pp v3.0.1+incompatible
github.com/karlseguin/ccache/v2 v2.0.8
github.com/klauspost/compress v1.20.5
github.com/klauspost/compress v1.20.3
github.com/klauspost/reedsolomon v1.14.2
github.com/kurin/blazer v0.5.3
github.com/linkedin/goavro/v2 v2.15.0
github.com/linxGnu/grocksdb v1.11.1
github.com/minio/crc64nvme v1.1.1
github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4
github.com/mailru/easyjson v0.9.2 // indirect
github.com/mattn/go-isatty v0.0.24 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/olivere/elastic/v7 v7.0.32
github.com/orcaman/concurrent-map/v2 v2.0.1
github.com/parquet-go/parquet-go v0.33.0
github.com/peterh/liner v1.2.3
github.com/pierrec/lz4/v4 v4.1.33
github.com/pkg/sftp v1.13.12
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/posener/complete v1.2.3
github.com/pquerna/cachecontrol v0.2.0
github.com/prometheus/client_golang v1.24.1
github.com/prometheus/client_model v0.6.3
github.com/prometheus/common v0.71.0 // indirect
github.com/prometheus/procfs v0.23.0
github.com/rabbitmq/amqp091-go v1.17.0
github.com/rclone/rclone v1.75.1
github.com/rdleal/intervalst v1.5.0
github.com/redis/go-redis/v9 v9.23.0
github.com/schollz/progressbar/v3 v3.19.1
github.com/seaweedfs/cockroachdb-parser v0.0.0-20260225204133-2f342c5ea564
github.com/seaweedfs/go-fuse/v2 v2.9.5
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/seaweedfs/goexif v1.0.3
github.com/seaweedfs/raft v1.2.4
github.com/shirou/gopsutil/v4 v4.26.10
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/viper v1.21.0
github.com/stretchr/testify v1.12.1
github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965
github.com/tarantool/go-option v1.1.0
github.com/tarantool/go-tarantool/v3 v3.0.2
github.com/testcontainers/testcontainers-go v0.45.0
github.com/tidwall/gjson v1.20.0
github.com/tidwall/match v1.2.0
github.com/tikv/client-go/v2 v2.0.7
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tsuna/gohbase v0.0.0-20201125011725-348991136365
github.com/twmb/avro v1.9.0
github.com/twpayne/go-geom v1.6.1
github.com/tylertreat/BoomFilters v0.0.0-20210315201527-1a82519a3e43
github.com/valyala/bytebufferpool v1.0.0
github.com/viant/ptrie v1.0.1
github.com/winfsp/cgofuse v1.6.1-0.20260126094232-f2c4fccdb286
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.2.0
github.com/xeipuuv/gojsonschema v1.2.0
github.com/ydb-platform/ydb-go-sdk-auth-environ v0.5.3
github.com/ydb-platform/ydb-go-sdk/v3 v3.157.1
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
go.etcd.io/etcd/api/v3 v3.7.3
go.etcd.io/etcd/client/pkg/v3 v3.7.4
go.etcd.io/etcd/client/v3 v3.7.3
go.mongodb.org/mongo-driver v1.17.10
go.uber.org/atomic v1.12.0
go.yaml.in/yaml/v3 v3.0.6
go.mongodb.org/mongo-driver v1.17.9
go.opencensus.io v0.24.0 // indirect
gocloud.dev v0.49.0
gocloud.dev/pubsub/natspubsub v0.49.0
gocloud.dev/pubsub/rabbitpubsub v0.47.0
@@ -121,40 +95,214 @@ require (
golang.org/x/exp v0.0.0-20261014143641-f0251eb4aa3e
golang.org/x/image v0.46.0
golang.org/x/net v0.62.0
golang.org/x/oauth2 v0.38.0
golang.org/x/sync v0.25.0
golang.org/x/sys v0.50.0
golang.org/x/term v0.48.0
golang.org/x/time v0.16.0
golang.org/x/tools/godoc v0.1.0-deprecated
golang.org/x/oauth2 v0.37.0
golang.org/x/sys v0.49.0
golang.org/x/text v0.43.0 // indirect
golang.org/x/tools v0.52.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
google.golang.org/api v0.310.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b
google.golang.org/genproto v0.0.0-20261019180522-ce908d29299b // indirect
google.golang.org/grpc v1.86.0-dev.0.20261027044109-d619b5d02089
google.golang.org/grpc/security/advancedtls v1.0.0
google.golang.org/protobuf v1.36.12
modernc.org/sqlite v1.61.1
gopkg.in/inf.v0 v0.9.1 // indirect
modernc.org/b v1.0.0 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.12.1 // indirect
modernc.org/sqlite v1.60.1
)
require (
cloud.google.com/go/kms v1.36.1
github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.10.0
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/Jille/raft-grpc-transport v1.6.1
github.com/ThreeDotsLabs/watermill v1.5.3
github.com/a-h/templ v0.3.1100
github.com/apache/arrow-go/v18 v18.8.0
github.com/apache/cassandra-gocql-driver/v2 v2.1.2
github.com/apache/iceberg-go v0.7.0
github.com/apple/foundationdb/bindings/go v0.0.0-20250911184653-27f7192f47c3
github.com/arangodb/go-driver v1.6.9
github.com/aws/aws-sdk-go-v2 v1.48.0
github.com/aws/aws-sdk-go-v2/config v1.33.9
github.com/aws/aws-sdk-go-v2/credentials v1.20.9
github.com/aws/aws-sdk-go-v2/service/s3 v1.114.10
github.com/cespare/xxhash/v2 v2.3.0
github.com/cognusion/imaging v1.0.4
github.com/fluent/fluent-logger-golang v1.10.1
github.com/getsentry/sentry-go v0.50.0
github.com/go-ldap/ldap/v3 v3.4.14
github.com/golang-jwt/jwt/v5 v5.3.1
github.com/google/flatbuffers/go v0.0.0-20230108230133-3b8644d32c50
github.com/hashicorp/go-metrics v0.7.0
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/hashicorp/raft v1.8.0
github.com/hashicorp/raft-boltdb/v2 v2.4.2
github.com/hashicorp/vault/api v1.23.0
github.com/jhump/protoreflect v1.18.1
github.com/linkedin/goavro/v2 v2.15.0
github.com/minio/crc64nvme v1.1.1
github.com/orcaman/concurrent-map/v2 v2.0.1
github.com/parquet-go/parquet-go v0.32.0
github.com/pkg/sftp v1.13.12
github.com/rabbitmq/amqp091-go v1.16.0
github.com/rclone/rclone v1.75.1
github.com/rdleal/intervalst v1.5.0
github.com/redis/go-redis/v9 v9.23.0
github.com/schollz/progressbar/v3 v3.19.1
github.com/seaweedfs/go-fuse/v2 v2.9.4
github.com/shirou/gopsutil/v4 v4.26.10
github.com/tarantool/go-option v1.1.0
github.com/tarantool/go-tarantool/v3 v3.0.2
github.com/testcontainers/testcontainers-go v0.45.0
github.com/tikv/client-go/v2 v2.0.7
github.com/twmb/avro v1.9.0
github.com/xeipuuv/gojsonschema v1.2.0
github.com/ydb-platform/ydb-go-sdk-auth-environ v0.5.3
github.com/ydb-platform/ydb-go-sdk/v3 v3.155.1
go.etcd.io/etcd/client/pkg/v3 v3.7.3
go.uber.org/atomic v1.12.0
go.yaml.in/yaml/v3 v3.0.6
golang.org/x/sync v0.24.0
golang.org/x/tools/godoc v0.1.0-deprecated
google.golang.org/grpc/security/advancedtls v1.0.0
)
require github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
require (
cloud.google.com/go/longrunning v1.3.0 // indirect
cloud.google.com/go/pubsub/v2 v2.7.0 // indirect
dario.cat/mergo v1.0.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/internal v0.1.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20261006220739-8c912ac31dd4 // indirect
github.com/FilenCloudDienste/filen-sdk-go v0.0.39 // indirect
github.com/ProtonMail/gopenpgp/v3 v3.4.1 // indirect
github.com/RoaringBitmap/roaring/v2 v2.26.0 // indirect
github.com/a1ex3/zstd-seekable-format-go/pkg v0.10.0 // indirect
github.com/adrg/xdg v0.5.3 // indirect
github.com/anchore/go-lzo v0.1.1 // indirect
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
github.com/apache/thrift v0.24.0 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.10.4 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/bazelbuild/rules_go v0.46.0 // indirect
github.com/biogo/store v0.0.0-20201120204734-aad293a2328f // indirect
github.com/bits-and-blooms/bitset v1.24.4 // indirect
github.com/blevesearch/snowballstem v0.9.0 // indirect
github.com/boombuler/barcode v1.1.0 // indirect
github.com/buger/jsonparser v1.2.0 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
github.com/cockroachdb/errors v1.14.0 // indirect
github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/version v0.0.0-20250314144055-3860cd14adf2 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v1.0.0-rc.4 // indirect
github.com/cpuguy83/dockercfg v0.3.2 // indirect
github.com/dave/dst v0.27.2 // indirect
github.com/diskfs/go-diskfs v1.9.4 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/go-connections v0.8.2 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dromara/dongle v1.0.1 // indirect
github.com/geoarrow/geoarrow-go v0.0.0-20260403143023-f54751c3e3a1 // indirect
github.com/gin-gonic/gin v1.11.0 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.8 // indirect
github.com/go-git/go-billy/v5 v5.9.0 // indirect
github.com/goccy/go-yaml v1.18.0 // indirect
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/gopherjs/gopherjs v1.17.2 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.7 // indirect
github.com/hashicorp/hcl v1.0.1-vault-7 // indirect
github.com/internxt/rclone-adapter v0.0.0-20260708165336-dd6561bacfa2 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/puddle/v2 v2.2.2 // indirect
github.com/jaegertracing/jaeger v1.47.0 // indirect
github.com/jhump/protoreflect/v2 v2.0.0-beta.1 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.12.3 // indirect
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
github.com/lpar/calendar v0.2.0 // indirect
github.com/magiconair/properties v1.18.12 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/go-archive v0.3.3 // indirect
github.com/moby/moby/api v1.56.1 // indirect
github.com/moby/moby/client v0.6.2 // indirect
github.com/moby/patternmatcher v0.6.1 // indirect
github.com/moby/sys/sequential v0.7.0 // indirect
github.com/moby/sys/user v0.4.1 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
github.com/moby/term v0.5.2 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/oklog/ulid/v2 v2.1.2 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/openzipkin/zipkin-go v0.4.3 // indirect
github.com/parquet-go/bitpack v1.0.0 // indirect
github.com/parquet-go/jsonlite v1.0.0 // indirect
github.com/petermattis/goid v0.0.0-20260113132338-7c7de50cc741 // indirect
github.com/pierrre/geohash v1.0.0 // indirect
github.com/pquerna/otp v1.5.0 // indirect
github.com/quic-go/qpack v0.6.0 // indirect
github.com/rclone/Proton-API-Bridge v1.0.5 // indirect
github.com/rclone/go-proton-api v1.0.4 // indirect
github.com/rogpeppe/go-internal v1.15.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/smarty/assertions v1.15.0 // indirect
github.com/sony/gobreaker/v2 v2.4.0 // indirect
github.com/stretchr/objx v0.5.3 // indirect
github.com/substrait-io/substrait v0.87.0 // indirect
github.com/substrait-io/substrait-go/v8 v8.1.1 // indirect
github.com/substrait-io/substrait-protobuf/go v0.85.0 // indirect
github.com/twpayne/go-geom v1.6.1 // indirect
github.com/twpayne/go-kml/v3 v3.2.1 // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/ulikunitz/xz v0.5.15 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/zeebo/xxh3 v1.1.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.47.0 // indirect
go.opentelemetry.io/otel/exporters/zipkin v1.45.0 // indirect
go.opentelemetry.io/otel/log v1.47.0 // indirect
go.opentelemetry.io/proto/otlp v1.11.1 // indirect
go.uber.org/mock v0.5.2 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
golang.org/x/mod v0.42.0 // indirect
gonum.org/v1/gonum v0.17.0 // indirect
)
require (
cel.dev/expr v0.25.3 // indirect
cloud.google.com/go v0.123.0 // indirect
cloud.google.com/go/auth v0.24.1 // indirect
cloud.google.com/go/auth/oauth2adapt v0.3.0 // indirect
cloud.google.com/go/compute/metadata v0.10.0 // indirect
cloud.google.com/go/iam v1.14.0 // indirect
cloud.google.com/go/longrunning v1.3.0 // indirect
cloud.google.com/go/monitoring v1.31.0 // indirect
cloud.google.com/go/pubsub/v2 v2.7.0 // indirect
dario.cat/mergo v1.0.2 // indirect
filippo.io/edwards25519 v1.2.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.24.0
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.14.1
github.com/Azure/azure-sdk-for-go/sdk/internal v1.13.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.8.3
github.com/Azure/azure-sdk-for-go/sdk/storage/azfile v1.7.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/internal v0.1.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20261006220739-8c912ac31dd4 // indirect
github.com/Azure/go-ntlmssp v0.1.1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.10.1 // indirect
github.com/FilenCloudDienste/filen-sdk-go v0.0.39 // indirect
github.com/Files-com/files-sdk-go/v3 v3.3.194 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.62.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.62.0 // indirect
@@ -165,17 +313,10 @@ require (
github.com/ProtonMail/gluon v0.17.1-0.20230724134000-308be39be96e // indirect
github.com/ProtonMail/go-crypto v1.4.1 // indirect
github.com/ProtonMail/go-srp v0.0.7 // indirect
github.com/ProtonMail/gopenpgp/v3 v3.4.1 // indirect
github.com/PuerkitoBio/goquery v1.12.0 // indirect
github.com/RoaringBitmap/roaring/v2 v2.26.0 // indirect
github.com/a1ex3/zstd-seekable-format-go/pkg v0.10.0 // indirect
github.com/abbot/go-http-auth v0.4.0 // indirect
github.com/adrg/xdg v0.5.3 // indirect
github.com/anchore/go-lzo v0.1.1 // indirect
github.com/andybalholm/brotli v1.3.0 // indirect
github.com/andybalholm/brotli v1.2.7 // indirect
github.com/andybalholm/cascadia v1.3.4 // indirect
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
github.com/apache/thrift v0.25.0 // indirect
github.com/appscode/go-querystring v0.0.0-20170504095604-0126cfb3f1dc // indirect
github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.27 // indirect
@@ -188,81 +329,42 @@ require (
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.11.13 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.12 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.20.12 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.10.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sns v1.47.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sqs v1.52.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.38.4 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.43.4 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/bazelbuild/rules_go v0.46.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/biogo/store v0.0.0-20201120204734-aad293a2328f // indirect
github.com/bits-and-blooms/bitset v1.24.4 // indirect
github.com/blevesearch/snowballstem v0.9.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.51.6
github.com/aws/smithy-go v1.28.9
github.com/boltdb/bolt v1.3.1 // indirect
github.com/boombuler/barcode v1.1.0 // indirect
github.com/bradenaw/juniper v0.15.3 // indirect
github.com/buengese/sgzip v0.1.1 // indirect
github.com/buger/jsonparser v1.2.0 // indirect
github.com/calebcase/tmpfile v1.0.3 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/chilts/sid v0.0.0-20190607042430-660e94789ec9 // indirect
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
github.com/cloudflare/circl v1.6.4 // indirect
github.com/cloudinary/cloudinary-go/v2 v2.16.0 // indirect
github.com/cloudsoda/go-smb2 v0.0.0-20260701064823-d8c5600d73b8 // indirect
github.com/cloudsoda/sddl v0.0.0-20250224235906-926454e91efc // indirect
github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 // indirect
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
github.com/cockroachdb/errors v1.14.0 // indirect
github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/version v0.0.0-20250314144055-3860cd14adf2 // indirect
github.com/colinmarc/hdfs/v2 v2.4.0 // indirect
github.com/containerd/errdefs v1.0.0 // indirect
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/platforms v1.0.0-rc.4 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.7.0 // indirect
github.com/cpuguy83/dockercfg v0.3.2 // indirect
github.com/creasty/defaults v1.8.0 // indirect
github.com/cronokirby/saferith v0.33.1-0.20250226174546-1f11f94ce488 // indirect
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
github.com/d4l3k/messagediff v1.2.1 // indirect
github.com/dave/dst v0.27.2 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/diskfs/go-diskfs v1.9.4 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/go-connections v0.8.2 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dromara/dongle v1.0.1 // indirect
github.com/dropbox/dropbox-sdk-go-unofficial/v6 v6.4.0 // indirect
github.com/eapache/go-resiliency v1.6.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/ebitengine/purego v0.11.2 // indirect
github.com/elastic/gosigar v0.14.3 // indirect
github.com/emersion/go-message v0.18.2 // indirect
github.com/emersion/go-vcard v0.0.0-20260618161152-d854b7e0e2d3 // indirect
github.com/envoyproxy/go-control-plane/envoy v1.40.1-0.20261014170222-9c4befd3c419 // indirect
github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c // indirect
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect
github.com/fatih/color v1.19.0 // indirect
github.com/felixge/httpsnoop v1.1.0 // indirect
github.com/flynn/noise v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.10.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.13 // indirect
github.com/geoarrow/geoarrow-go v0.0.0-20260403143023-f54751c3e3a1 // indirect
github.com/geoffgarside/ber v1.2.0 // indirect
github.com/gin-gonic/gin v1.11.0 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.8 // indirect
github.com/go-chi/chi/v5 v5.4.0 // indirect
github.com/go-darwin/apfs v0.0.0-20211011131704-f84b94dbf348 // indirect
github.com/go-git/go-billy/v5 v5.9.0 // indirect
github.com/go-jose/go-jose/v4 v4.1.6 // indirect
github.com/go-logr/logr v1.4.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
@@ -274,225 +376,129 @@ require (
github.com/go-playground/validator/v10 v10.30.3 // indirect
github.com/go-resty/resty/v2 v2.17.2 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/go-zookeeper/zk v1.0.4 // indirect
github.com/goccy/go-json v0.12.0 // indirect
github.com/goccy/go-yaml v1.18.0 // indirect
github.com/goccy/go-json v0.11.2 // indirect
github.com/gofrs/flock v0.13.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/golang/geo v0.0.0-20210211234256-740aa86cb551 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/s2a-go v0.1.11 // indirect
github.com/google/wire v0.7.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.24 // indirect
github.com/googleapis/gax-go/v2 v2.27.0 // indirect
github.com/gopherjs/gopherjs v1.17.2 // indirect
github.com/gorilla/schema v1.4.1 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
github.com/gorilla/sessions v1.4.0
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.31.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-msgpack/v2 v2.1.5 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/go-secure-stdlib/parseutil v0.2.0 // indirect
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect
github.com/hashicorp/go-sockaddr v1.0.7 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.1-vault-7 // indirect
github.com/internxt/rclone-adapter v0.0.0-20260708165336-dd6561bacfa2 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/puddle/v2 v2.2.3 // indirect
github.com/jaegertracing/jaeger v1.47.0 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/goidentity/v6 v6.0.1 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/jhump/protoreflect/v2 v2.0.0-beta.1 // indirect
github.com/jlaffaye/ftp v0.2.1-0.20251026020404-6602e981a1bb // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jonboulle/clockwork v0.5.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/jtolio/noiseconn v0.0.0-20231127013910-f6d9ecbf1de7 // indirect
github.com/jzelinskie/whirlpool v0.0.0-20201016144138-0675e54bb004 // indirect
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
github.com/klauspost/cpuid/v2 v2.4.2 // indirect
github.com/k0kubun/pp v3.0.1+incompatible
github.com/klauspost/cpuid/v2 v2.4.0 // indirect
github.com/koofr/go-httpclient v0.0.0-20240520111329-e20f8f203988 // indirect
github.com/koofr/go-koofrclient v0.0.0-20221207135200-cbd7fc9ad6a6 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lanrat/extsort v1.4.2 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/lib/pq v1.12.3 // indirect
github.com/lithammer/shortuuid/v3 v3.0.7 // indirect
github.com/lpar/calendar v0.2.0 // indirect
github.com/lufia/plan9stats v0.0.0-20260627054121-477a66015f15 // indirect
github.com/magiconair/properties v1.18.12 // indirect
github.com/mailru/easyjson v0.9.2 // indirect
github.com/mattn/go-colorable v0.1.15 // indirect
github.com/mattn/go-isatty v0.0.24 // indirect
github.com/mattn/go-runewidth v0.0.31 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/go-archive v0.3.3 // indirect
github.com/moby/moby/api v1.56.1 // indirect
github.com/moby/moby/client v0.6.2 // indirect
github.com/moby/patternmatcher v0.6.1 // indirect
github.com/moby/sys/sequential v0.7.0 // indirect
github.com/moby/sys/user v0.4.1 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
github.com/moby/term v0.5.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4
github.com/montanaflynn/stats v0.7.1 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nats-io/nats.go v1.54.0 // indirect
github.com/nats-io/nkeys v0.4.16 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/ncruces/go-strftime v1.1.0 // indirect
github.com/ncruces/go-strftime v1.0.0 // indirect
github.com/ncw/swift/v2 v2.0.5 // indirect
github.com/nxadm/tail v1.4.11 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/oklog/ulid/v2 v2.1.2 // indirect
github.com/onsi/ginkgo/v2 v2.23.3 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.1 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/openzipkin/zipkin-go v0.4.3 // indirect
github.com/oracle/oci-go-sdk/v65 v65.121.0 // indirect
github.com/panjf2000/ants/v2 v2.12.1 // indirect
github.com/parquet-go/bitpack v1.1.1 // indirect
github.com/parquet-go/jsonlite v1.5.7 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pelletier/go-toml/v2 v2.4.3 // indirect
github.com/pengsrc/go-shared v0.2.1-0.20190131101655-1999055a4a14 // indirect
github.com/petermattis/goid v0.0.0-20260113132338-7c7de50cc741 // indirect
github.com/philhofer/fwd v1.2.0 // indirect
github.com/pierrre/geohash v1.0.0 // indirect
github.com/pierrec/lz4/v4 v4.1.33
github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c // indirect
github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c // indirect
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989 // indirect
github.com/pingcap/kvproto v0.0.0-20230403051650-e166ae588106 // indirect
github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/xattr v0.4.12 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10
github.com/power-devops/perfstat v0.0.0-20260805114148-88456608a4f6 // indirect
github.com/pquerna/otp v1.5.0 // indirect
github.com/prometheus/common v0.71.0 // indirect
github.com/putdotio/go-putio/putio v0.0.0-20200123120452-16d982cac2b8 // indirect
github.com/quic-go/qpack v0.6.0 // indirect
github.com/rclone/Proton-API-Bridge v1.0.5 // indirect
github.com/rclone/go-proton-api v1.0.4 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/relvacode/iso8601 v1.7.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rfjakob/eme v1.2.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.15.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
github.com/sagikazarmark/locafero v0.11.0 // indirect
github.com/samber/lo v1.53.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/seaweedfs/cockroachdb-parser v0.0.0-20260225204133-2f342c5ea564
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect
github.com/smarty/assertions v1.15.0 // indirect
github.com/sony/gobreaker v1.0.0 // indirect
github.com/sony/gobreaker/v2 v2.4.0 // indirect
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
github.com/spacemonkeygo/monkit/v3 v3.0.25-0.20251022131615-eb24eb109368 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/spiffe/go-spiffe/v2 v2.9.0 // indirect
github.com/stretchr/objx v0.5.3 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/substrait-io/substrait v0.87.0 // indirect
github.com/substrait-io/substrait-go/v8 v8.1.1 // indirect
github.com/substrait-io/substrait-protobuf/go v0.85.0 // indirect
github.com/t3rm1n4l/go-mega v0.0.0-20260717075258-c6acd6a5bd04 // indirect
github.com/tarantool/go-iproto v1.1.0 // indirect
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tikv/pd/client v0.0.0-20230329114254-1948c247c2b1 // indirect
github.com/tinylib/msgp v1.6.4 // indirect
github.com/tklauser/go-sysconf v0.4.0 // indirect
github.com/tklauser/numcpus v0.12.0 // indirect
github.com/twmb/murmur3 v1.1.8 // indirect
github.com/twpayne/go-kml/v3 v3.2.1 // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/ulikunitz/xz v0.5.15 // indirect
github.com/unknwon/goconfig v1.0.0 // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/winfsp/cgofuse v1.6.1-0.20260126094232-f2c4fccdb286
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/yandex-cloud/go-genproto v0.0.0-20240819112322-98a264d392f6 // indirect
github.com/ydb-platform/ydb-go-genproto v0.0.0-20260810122915-65bfd5c4b705 // indirect
github.com/ydb-platform/ydb-go-yc v0.12.5 // indirect
github.com/ydb-platform/ydb-go-yc-metadata v0.6.2 // indirect
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
github.com/yunify/qingstor-sdk-go/v3 v3.2.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
github.com/zeebo/blake3 v0.2.4 // indirect
github.com/zeebo/errs v1.4.0 // indirect
github.com/zeebo/xxh3 v1.1.0 // indirect
go.etcd.io/bbolt v1.5.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.47.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.72.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.72.0 // indirect
go.opentelemetry.io/otel v1.47.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.47.0 // indirect
go.opentelemetry.io/otel/exporters/zipkin v1.45.0 // indirect
go.opentelemetry.io/otel/log v1.47.0 // indirect
go.opentelemetry.io/otel/metric v1.47.0 // indirect
go.opentelemetry.io/otel/sdk v1.47.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.47.0 // indirect
go.opentelemetry.io/otel/trace v1.47.0 // indirect
go.opentelemetry.io/proto/otlp v1.11.1 // indirect
go.uber.org/mock v0.5.2 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.28.0 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
golang.org/x/mod v0.42.0 // indirect
golang.org/x/text v0.43.0 // indirect
golang.org/x/tools v0.52.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
gonum.org/v1/gonum v0.17.0 // indirect
google.golang.org/genproto v0.0.0-20261019180522-ce908d29299b // indirect
golang.org/x/term v0.47.0
golang.org/x/time v0.16.0
google.golang.org/genproto/googleapis/api v0.0.0-20261019180522-ce908d29299b // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/validator.v2 v2.0.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/b v1.0.0 // indirect
modernc.org/libc v1.79.0 // indirect
modernc.org/mathutil v1.7.1 // indirect
modernc.org/memory v1.12.1 // indirect
modernc.org/libc v1.77.1 // indirect
moul.io/http2curl/v2 v2.3.0 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
storj.io/common v0.0.0-20260629224719-ba1bff0a7846 // indirect
+60 -60
View File
@@ -142,8 +142,8 @@ github.com/alexbrainman/sspi v0.0.0-20250919150558-7d374ff0d59e h1:4dAU9FXIyQktp
github.com/alexbrainman/sspi v0.0.0-20250919150558-7d374ff0d59e/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4=
github.com/anchore/go-lzo v0.1.1 h1:IwL/fvkdtlIrYIXck6WxZ3nb8WjjHziYYmGxlooyOnM=
github.com/anchore/go-lzo v0.1.1/go.mod h1:3kLx0bve2oN1iDwgM1U5zGku1Tfbdb0No5qp1eL1fIk=
github.com/andybalholm/brotli v1.3.0 h1:IdkhjSe/+34U+fP7FSR2Q6Poj1hnHUa2GoWmzXJd6qY=
github.com/andybalholm/brotli v1.3.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
github.com/andybalholm/brotli v1.2.7 h1:UgafRPGMam5ySHfRkhthMqOFA6IFoeF3D7mWIDLjG5A=
github.com/andybalholm/brotli v1.2.7/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
github.com/andybalholm/cascadia v1.3.4 h1:vM2lgh0Vru9Vwyfm4cQqWP2HHMW0u0+2PAW7Q38Qufg=
github.com/andybalholm/cascadia v1.3.4/go.mod h1:BLRmbRjpEtNKieZOCCvYj4RqN+KRA41GBe/5O+G93kM=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
@@ -151,14 +151,14 @@ github.com/antithesishq/antithesis-sdk-go v0.6.0-default-no-op h1:kpBdlEPbRvff0m
github.com/antithesishq/antithesis-sdk-go v0.6.0-default-no-op/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E=
github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ=
github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw=
github.com/apache/arrow-go/v18 v18.9.0 h1:o+CdPvv7G7tXRc3UCq7sAkMOEEzvPFhunnWPMtIDZeQ=
github.com/apache/arrow-go/v18 v18.9.0/go.mod h1:QbEIuSG88lfEwkBfq1OKoZ5/aFXLObsS2awz9F5OKak=
github.com/apache/arrow-go/v18 v18.8.0 h1:BLOzbPv7bxMPgXPacAg6HQjnxupYsZzC4tf+FkqPU/M=
github.com/apache/arrow-go/v18 v18.8.0/go.mod h1:uJCFfCwq0KsxCmsCfQg4ft+LsW+iHYzAXiSDh5ug/8U=
github.com/apache/cassandra-gocql-driver/v2 v2.1.2 h1:lu/p0Db2av18enHJvWJQoChLssI0P+AR06STq4VdvCc=
github.com/apache/cassandra-gocql-driver/v2 v2.1.2/go.mod h1:QH/asJjB3mHvY6Dot6ZKMMpTcOrWJ8i9GhsvG1g0PK4=
github.com/apache/iceberg-go v0.7.0 h1:bTD6Pb4uM4sWcMfIx0/cV1haHMc84r+CvPieUqYzD4I=
github.com/apache/iceberg-go v0.7.0/go.mod h1:oGz5MX3/m3GDc6acsrwbdHChj28jZH8MVDWqUrW6WQQ=
github.com/apache/thrift v0.25.0 h1:6LLlvoPjy8Cc/0b5TYRcTR3RZa2W0at3WQRcOkDwVGs=
github.com/apache/thrift v0.25.0/go.mod h1:4lwyToijD9T70w7GlevFk7FnpY60Wv8I8krMkF6FkAo=
github.com/apache/thrift v0.24.0 h1:zy31L1a49QTNB2bG1BBfMXol3yJrTH975G3pPubQVLQ=
github.com/apache/thrift v0.24.0/go.mod h1:zPt6WxgvTOM6hF92y8C+MkEM5LMxZuk4JcQOiU4Esvs=
github.com/apple/foundationdb/bindings/go v0.0.0-20250911184653-27f7192f47c3 h1:WZaTKNHCfcw7fWSR6/RKnCldVzvYZC+Y20Su4lffEIg=
github.com/apple/foundationdb/bindings/go v0.0.0-20250911184653-27f7192f47c3/go.mod h1:OMVSB21p9+xQUIqlGizHPZfjK+SHws1ht+ZytVDoz9U=
github.com/appscode/go-querystring v0.0.0-20170504095604-0126cfb3f1dc h1:LoL75er+LKDHDUfU5tRvFwxH0LjPpZN8OoG8Ll+liGU=
@@ -171,8 +171,8 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ
github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4=
github.com/aws/aws-sdk-go v1.55.8 h1:JRmEUbU52aJQZ2AjX4q4Wu7t4uZjOu71uyNmaWlUkJQ=
github.com/aws/aws-sdk-go v1.55.8/go.mod h1:ZkViS9AqA6otK+JBBNH2++sx1sgxrPKcSzPPvQkUtXk=
github.com/aws/aws-sdk-go-v2 v1.48.1 h1:j6ro6IvbxUe8BCulc/6uWMrhmx6+i5HNIc1GZEJRT9k=
github.com/aws/aws-sdk-go-v2 v1.48.1/go.mod h1:HP8Jzg1FDurJomtx40YM0eiLoJrwjjZ9X+4BNpy4OXc=
github.com/aws/aws-sdk-go-v2 v1.48.0 h1:tFU7EJVm7MfyaXLsXdYTZ0Vd6vwt9OljCyqq0gqk0Mc=
github.com/aws/aws-sdk-go-v2 v1.48.0/go.mod h1:oeKU5p+TQBnpeLmU42WZLWvzv+ORLn+74n4QVLnm/Z0=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.27 h1:3dMP9eEmHVosFN1QiD24IJBKVY8m6iUfVYXqRCT118Q=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.27/go.mod h1:KH4PKcqtjy1m0656eqQV2v53xE04ddJzuNloEKqlHkI=
github.com/aws/aws-sdk-go-v2/config v1.33.9 h1:Hv6bcQUJVnmuWaKjqD6Ot8sE75NrWsWV20oGT5aWle0=
@@ -213,8 +213,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.43.4 h1:j6c+HA4AoS0EBEjArPjavFEB
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.43.4/go.mod h1:RhghaXUk9q66VtOQUX1FdPddQuHnqQZzbB0fEYXmPRA=
github.com/aws/aws-sdk-go-v2/service/sts v1.51.6 h1:BVjKrtRUtSYKztBCCfE1oAB+d3ViKcW2cKZfserOqMQ=
github.com/aws/aws-sdk-go-v2/service/sts v1.51.6/go.mod h1:eSukFLeLkPMm+1OxDR+F0joauZdyBkF47Ow7MqjZiJw=
github.com/aws/smithy-go v1.28.10 h1:SfPnj8fGCVAI/P5YC4/1JjuMsucbPp2dROnSTYNo2PE=
github.com/aws/smithy-go v1.28.10/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
github.com/aws/smithy-go v1.28.9 h1:zkZ058OpNX0iGTK24b+ZUEQSMc11CBA6oO7xtKZfzkY=
github.com/aws/smithy-go v1.28.9/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=
github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=
github.com/bazelbuild/rules_go v0.46.0 h1:CTefzjN/D3Cdn3rkrM6qMWuQj59OBcuOjyIp3m4hZ7s=
@@ -544,8 +544,8 @@ github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlnd
github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw=
github.com/go-zookeeper/zk v1.0.4 h1:DPzxraQx7OrPyXq2phlGlNSIyWEsAox0RJmjTseMV6I=
github.com/go-zookeeper/zk v1.0.4/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw=
github.com/goccy/go-json v0.12.0 h1:pD+oWouAiz4yruwXIt/iT+lOMeyhr1aTtxzaMP/RgVI=
github.com/goccy/go-json v0.12.0/go.mod h1:3NdmfEkZlB7YI5UFw/qdFKq8XN1aiWR0YyRPWZNQltY=
github.com/goccy/go-json v0.11.2 h1:jdZv93Tt4ioR8yW1CoNsvSxrcZlCXAUU1aZXN7gpXUA=
github.com/goccy/go-json v0.11.2/go.mod h1:3NdmfEkZlB7YI5UFw/qdFKq8XN1aiWR0YyRPWZNQltY=
github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw=
@@ -615,8 +615,8 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc=
github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0=
github.com/google/pprof v0.0.0-20261016150608-1facf8f91b50 h1:PlNWJRxu5APSV0pWqfIsZ0qt9OOGHSWfZQ4zvx+WgWs=
github.com/google/pprof v0.0.0-20261016150608-1facf8f91b50/go.mod h1:yUo1AMMpsPIDFGuwDK8nLcf8+vvAd5l2O6JDZ6hpwrM=
github.com/google/pprof v0.0.0-20260802141513-ef3492d7dac3 h1:LMLX+LgTNWpfvCBdFebv6EsYotImrt/Ppc5cXIriCSo=
github.com/google/pprof v0.0.0-20260802141513-ef3492d7dac3/go.mod h1:jl5iWTm0/hd5PjEYEOuwAJ57L/CibdZfrqZ5XA5GrCk=
github.com/google/s2a-go v0.1.11 h1:7v1V1TraNGP63WptsAkNqr2w8jgm4vM6A6qx6Lsw9iM=
github.com/google/s2a-go v0.1.11/go.mod h1:pz4tyvwXvJLLbyrkh6FW1eS2zPUXMaTmyNhYtyP2tNw=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
@@ -722,10 +722,10 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
github.com/jackc/pgx/v5 v5.13.0 h1:Hl08k64maU0nrRyVUEbwCnK6/gT0EhMrtAqBHz9/gA4=
github.com/jackc/pgx/v5 v5.13.0/go.mod h1:u2Fi6no03HCSBYE+ZVdLxbwdu3xyi2vU+K/YNJioSds=
github.com/jackc/puddle/v2 v2.2.3 h1:f8HoREISb3l5eO9coPgK7U3hKLhWGokOFVcThl5jrao=
github.com/jackc/puddle/v2 v2.2.3/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
github.com/jackc/pgx/v5 v5.10.0 h1:VhSvgU2jSli8o3AqIEOTJr7rZwAEUVo4E4XhR94Zfr0=
github.com/jackc/pgx/v5 v5.10.0/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4=
github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo=
github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
github.com/jaegertracing/jaeger v1.47.0 h1:XXxTMO+GxX930gxKWsg90rFr6RswkCRIW0AgWFnTYsg=
github.com/jaegertracing/jaeger v1.47.0/go.mod h1:mHU/OHFML51CijQql4+rLfgPOcIb9MhxOMn+RKQwrJc=
github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8=
@@ -740,8 +740,8 @@ github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh6
github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs=
github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY=
github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc=
github.com/jhump/protoreflect v1.19.0 h1:YhKbE78JrjfngcCZfZTIV7rQQGndyqll6fXfaqiOEg4=
github.com/jhump/protoreflect v1.19.0/go.mod h1:I2yar2oJEMf0k4EMryPzfV0tvGwN/SejJziYBOpETQo=
github.com/jhump/protoreflect v1.18.1 h1:h4odAaLg9wyn7yHxMF7sSkJ7JfLwK1oy37/1Pi212GE=
github.com/jhump/protoreflect v1.18.1/go.mod h1:I2yar2oJEMf0k4EMryPzfV0tvGwN/SejJziYBOpETQo=
github.com/jhump/protoreflect/v2 v2.0.0-beta.1 h1:Dw1rslK/VotaUGYsv53XVWITr+5RCPXfvvlGrM/+B6w=
github.com/jhump/protoreflect/v2 v2.0.0-beta.1/go.mod h1:D9LBEowZyv8/iSu97FU2zmXG3JxVTmNw21mu63niFzU=
github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8=
@@ -782,10 +782,10 @@ github.com/keybase/go-keychain v0.0.1/go.mod h1:PdEILRW3i9D8JcdM+FmY6RwkHGnhHxXw
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46/go.mod h1:yyMNCyc/Ib3bDTKd379tNMpB/7/H5TjM2Y9QJ5THLbE=
github.com/klauspost/compress v1.20.5 h1:rJj5VjH4xQxbnLphg6eqUcDxRFCw1jpMdDY9qXlrwSs=
github.com/klauspost/compress v1.20.5/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI=
github.com/klauspost/cpuid/v2 v2.4.2 h1:xRw7IZEsAgVCp6trS/DgWbTAqpixhmywgVgBjYGg1bQ=
github.com/klauspost/cpuid/v2 v2.4.2/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU=
github.com/klauspost/compress v1.20.3 h1:zWNoFqq/lSuYQRim3dUXlXeA0IqwuZGicdG5ZTfY5j4=
github.com/klauspost/compress v1.20.3/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI=
github.com/klauspost/cpuid/v2 v2.4.0 h1:S6Hrbc7+ywsr0r+RLapfGBHfyefhCTwEh3A0tV913Dw=
github.com/klauspost/cpuid/v2 v2.4.0/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU=
github.com/klauspost/reedsolomon v1.14.2 h1:SafJYwpBBQBI6amHUygcjxZjXeN2HpiENHQDwuPWCCQ=
github.com/klauspost/reedsolomon v1.14.2/go.mod h1:yjqqjgMTQkBUHSG97/rm4zipffCNbCiZcB3kTqr++sQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@@ -919,8 +919,8 @@ github.com/nats-io/nkeys v0.4.16 h1:rd5oAuLOb8mnAycB0xleuEBNS1pVVnN0fv/FF34Eypg=
github.com/nats-io/nkeys v0.4.16/go.mod h1:llLgWoI0o4z/Q57q2R1kHfmocyhGV6VG/U18Glg1Afs=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/ncruces/go-strftime v1.1.0 h1:vtPmPWMkb539RGV9WpWT9EwJGvrOCKvMNI4obWL47Hk=
github.com/ncruces/go-strftime v1.1.0/go.mod h1:yVaq7iwCN09vHRrKBrrflXT0M9tTMG2KmZ9Fj7xeG/g=
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/ncw/swift/v2 v2.0.5 h1:9o5Gsd7bInAFEqsGPcaUdsboMbqf8lnNtxqWKFT9iz8=
github.com/ncw/swift/v2 v2.0.5/go.mod h1:cbAO76/ZwcFrFlHdXPjaqWZ9R7Hdar7HpjRXBfbjigk=
github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
@@ -955,12 +955,12 @@ github.com/orcaman/concurrent-map/v2 v2.0.1 h1:jOJ5Pg2w1oeB6PeDurIYf6k9PQ+aTITr/
github.com/orcaman/concurrent-map/v2 v2.0.1/go.mod h1:9Eq3TG2oBe5FirmYWQfYO5iH1q0Jv47PLaNK++uCdOM=
github.com/panjf2000/ants/v2 v2.12.1 h1:BWvU2wHpyXWxhhNXsGB6JXLCNbshyLd1QxvoAmZnu10=
github.com/panjf2000/ants/v2 v2.12.1/go.mod h1:tSQuaNQ6r6NRhPt+IZVUevvDyFMTs+eS4ztZc52uJTY=
github.com/parquet-go/bitpack v1.1.1 h1:mygqlCBk/rnvtqqP5Oy7IkIPAxZ3bDM7V4yce/ms6pE=
github.com/parquet-go/bitpack v1.1.1/go.mod h1:XnVk9TH+O40eOOmvpAVZ7K2ocQFrQwysLMnc6M/8lgs=
github.com/parquet-go/jsonlite v1.5.7 h1:FxIrc2MBZ9QLpljM1+3F3JuCuug+BWOt8Yx+S4o3bl8=
github.com/parquet-go/jsonlite v1.5.7/go.mod h1:ZIyft0+sSdvgTu2m6RpqxWx/F3UBNtF3ammevxDJcoE=
github.com/parquet-go/parquet-go v0.33.0 h1:iDe13lcW6t0mnZWPqKqWccNa5GdP/L9GNNyzlr8JqNY=
github.com/parquet-go/parquet-go v0.33.0/go.mod h1:zl2XMxzSXZ5UYGfTLK0kvW0ifgVMPJ6I+/zmNnsOSh4=
github.com/parquet-go/bitpack v1.0.0 h1:AUqzlKzPPXf2bCdjfj4sTeacrUwsT7NlcYDMUQxPcQA=
github.com/parquet-go/bitpack v1.0.0/go.mod h1:XnVk9TH+O40eOOmvpAVZ7K2ocQFrQwysLMnc6M/8lgs=
github.com/parquet-go/jsonlite v1.0.0 h1:87QNdi56wOfsE5bdgas0vRzHPxfJgzrXGml1zZdd7VU=
github.com/parquet-go/jsonlite v1.0.0/go.mod h1:nDjpkpL4EOtqs6NQugUsi0Rleq9sW/OtC1NnZEnxzF0=
github.com/parquet-go/parquet-go v0.32.0 h1:NWDqTUHfrCS4cJP/Fj2HlxvqsrVedWG3sayMkf+znzM=
github.com/parquet-go/parquet-go v0.32.0/go.mod h1:navtkAYr2LGoJVp141oXPlO/sxLvaOe3la2JEoD8+rg=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
@@ -1049,8 +1049,8 @@ github.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8=
github.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII=
github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw=
github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU=
github.com/rabbitmq/amqp091-go v1.17.0 h1:6KmTqrnJq93cGIE3Q3UnXgsqw6NtLu8MNfFoIbfBAIQ=
github.com/rabbitmq/amqp091-go v1.17.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
github.com/rabbitmq/amqp091-go v1.16.0 h1:1O8oQqnj9hLACoo6CVMgn57z2pLWXvgemhh4GsquV+Y=
github.com/rabbitmq/amqp091-go v1.16.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
github.com/rclone/Proton-API-Bridge v1.0.5 h1:K1++Qtk3PvgkiCCiv6Pahju1TMOzKY6VSwiwT7XLAVc=
github.com/rclone/Proton-API-Bridge v1.0.5/go.mod h1:vCeOPhlXzevN0AFojgh1zsjhetiShy/ArvJ/xkFUDWk=
github.com/rclone/go-proton-api v1.0.4 h1:AJW0e9pB4j0hVK4WqyGErFwaI+5MUQWPCtj5FYYxtPg=
@@ -1100,8 +1100,8 @@ github.com/schollz/progressbar/v3 v3.19.1 h1:iv8BgwOvdML/S3p84uBpy/IMigv4U9594vP
github.com/schollz/progressbar/v3 v3.19.1/go.mod h1:LFL7jqimKxfhero4K1eCkUr/6R39AgQeiPCJtlTWIW8=
github.com/seaweedfs/cockroachdb-parser v0.0.0-20260225204133-2f342c5ea564 h1:TgxPraf1NmF6XTcUG53ULpLQrKvhtUJxQ3hyekxSDNQ=
github.com/seaweedfs/cockroachdb-parser v0.0.0-20260225204133-2f342c5ea564/go.mod h1:JSKCh6uCHBz91lQYFYHCyTrSVIPge4SUFVn28iwMNB0=
github.com/seaweedfs/go-fuse/v2 v2.9.5 h1:qz3tuAGbUJOPJtaxyP35xW3JT23utywXKer0hoTiJPU=
github.com/seaweedfs/go-fuse/v2 v2.9.5/go.mod h1:zABdmWEa6A0bwaBeEOBUeUkGIZlxUhcdv+V1Dcc/U/I=
github.com/seaweedfs/go-fuse/v2 v2.9.4 h1:ACyloiuopdhRSjdLLeSWbsVaemMPskORaRF01TY6GyM=
github.com/seaweedfs/go-fuse/v2 v2.9.4/go.mod h1:zABdmWEa6A0bwaBeEOBUeUkGIZlxUhcdv+V1Dcc/U/I=
github.com/seaweedfs/goexif v1.0.3 h1:ve/OjI7dxPW8X9YQsv3JuVMaxEyF9Rvfd04ouL+Bz30=
github.com/seaweedfs/goexif v1.0.3/go.mod h1:Oni780Z236sXpIQzk1XoJlTwqrJ02smEin9zQeff7Fk=
github.com/seaweedfs/raft v1.2.4 h1:lEBQ9seDSGrJNs2WitMgfYpaDxLgh9qukm1IJTEV1hk=
@@ -1317,8 +1317,8 @@ github.com/ydb-platform/ydb-go-genproto v0.0.0-20260810122915-65bfd5c4b705 h1:7V
github.com/ydb-platform/ydb-go-genproto v0.0.0-20260810122915-65bfd5c4b705/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I=
github.com/ydb-platform/ydb-go-sdk-auth-environ v0.5.3 h1:A48PcmIETWwbEMIGwndv52uME6J1eJ28MBgF7HVR74o=
github.com/ydb-platform/ydb-go-sdk-auth-environ v0.5.3/go.mod h1:oRGF+67GWLbtNzqGygsPIUsjXmsRXD1KS5m3o5ppm2k=
github.com/ydb-platform/ydb-go-sdk/v3 v3.157.1 h1:eaf2VLTwta3VO0+K9+rUd1yWtXU6C5WxZx7v/sdbz/Y=
github.com/ydb-platform/ydb-go-sdk/v3 v3.157.1/go.mod h1:dJXJ1u00IqO8Vsph8fWmYj8b1E7jyphnvJPqA69emBY=
github.com/ydb-platform/ydb-go-sdk/v3 v3.155.1 h1:ZMByYe53zZ9R1o23fxJsbNhjzKFQkzpXm6uGj8gWHXQ=
github.com/ydb-platform/ydb-go-sdk/v3 v3.155.1/go.mod h1:dJXJ1u00IqO8Vsph8fWmYj8b1E7jyphnvJPqA69emBY=
github.com/ydb-platform/ydb-go-yc v0.12.5 h1:qYIeU1N6a92FaDA0+/vR55l5IzRF50MeLZwUWwvy2xQ=
github.com/ydb-platform/ydb-go-yc v0.12.5/go.mod h1:DlSltVQKEdXJotaAYwoHzMGDF9EJw5S3hg3LXe/5yYw=
github.com/ydb-platform/ydb-go-yc-metadata v0.6.2 h1:CZFawwHjLcjsxcl/g0dGIXbI2r41okPGLCydF4qTHcc=
@@ -1351,12 +1351,12 @@ go.etcd.io/bbolt v1.5.0 h1:S7GAl7Fxv12yohbwFfIbQCGDWbQbtDGPET4P/bD4lxU=
go.etcd.io/bbolt v1.5.0/go.mod h1:mkltfYE5aUHQxUct9N9V+Kp7aSjFqjgrhcXIS70Lrdk=
go.etcd.io/etcd/api/v3 v3.7.3 h1:2tumepXe+wi7Wab64uUO71K7ISQyUWLGC1DJbbc59sY=
go.etcd.io/etcd/api/v3 v3.7.3/go.mod h1:HOR9Qn4gb/1/hVAmYprmlLpvTe6ZgfgNS9Z/+Ty65po=
go.etcd.io/etcd/client/pkg/v3 v3.7.4 h1:633yLMDAQHWqLTRMxUNuZfOy6a4REJPcA3juoMRx5qU=
go.etcd.io/etcd/client/pkg/v3 v3.7.4/go.mod h1:I1lMmoiq2SF4Wg0Gru7uXMovS1eEo6wwAxcFPFPk/v0=
go.etcd.io/etcd/client/pkg/v3 v3.7.3 h1:5zMwNu3ycrzCeA5NwOfQbxFRhqq974chq1DrYMua4QI=
go.etcd.io/etcd/client/pkg/v3 v3.7.3/go.mod h1:/OhzqYrF0U7d1NOk55VMyUQGbYD1WoIe4bJwxb47wOk=
go.etcd.io/etcd/client/v3 v3.7.3 h1:UrXcetgkuSEocaBlQlulQRJlXLEnUAHuBRbHh0lue1Q=
go.etcd.io/etcd/client/v3 v3.7.3/go.mod h1:DcPxpqcpV8WIaRi/2waPCx0/Uq8rQUweDJaDYZk1gEE=
go.mongodb.org/mongo-driver v1.17.10 h1:kdAgQvu8TROXZpSkJQd5wzfaNCCrMbpZyKFtQ6qkPCE=
go.mongodb.org/mongo-driver v1.17.10/go.mod h1:LlOhpH5NUEfhxcAwG0UEkMqwYcc4JU18gtCdGudk/tQ=
go.mongodb.org/mongo-driver v1.17.9 h1:IexDdCuuNJ3BHrELgBlyaH9p60JXAvdzWR128q+U5tU=
go.mongodb.org/mongo-driver v1.17.9/go.mod h1:LlOhpH5NUEfhxcAwG0UEkMqwYcc4JU18gtCdGudk/tQ=
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
@@ -1501,8 +1501,8 @@ golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY=
golang.org/x/net v0.62.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.38.0 h1:uW7XQbcu1eoiQS7uMJvLOjPMl04bTbmY1VeRPxvbspI=
golang.org/x/oauth2 v0.38.0/go.mod h1:IxwZNxUULJmpBFf9K/9NTMSIfZZuvuTy1gGxhigP/58=
golang.org/x/oauth2 v0.37.0 h1:JUlcxA8oAtauLfiH8FX2/FkAWHAdi0QtGCGc+hofE98=
golang.org/x/oauth2 v0.37.0/go.mod h1:IxwZNxUULJmpBFf9K/9NTMSIfZZuvuTy1gGxhigP/58=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -1514,8 +1514,8 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.25.0 h1:dJnifr0nMV8/SBnBvdo4eSGGnrc3O4FFx6IqvtLcmRs=
golang.org/x/sync v0.25.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA=
golang.org/x/sync v0.24.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1557,8 +1557,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.50.0 h1:dkKZEFTEKaLr1sjhs0WiKqoi8Jj5nHbS3Njmx1UoMJs=
golang.org/x/sys v0.50.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA=
golang.org/x/sys v0.49.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
@@ -1567,8 +1567,8 @@ golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/term v0.48.0 h1:G6UU1eiSB8nl3DzeUGt7Mg+2SctI8tPS6Z5/mBt6cOk=
golang.org/x/term v0.48.0/go.mod h1:BRDLHCZr2SUjIeBHHpRyQeC9xzSAVbzY2rvKgafnHf4=
golang.org/x/term v0.47.0 h1:cpyOwQkr2Nzxe2p6KnrTG7Ei2wtzjsuSjhpXXepZ/BM=
golang.org/x/term v0.47.0/go.mod h1:efAfAuG6RKABvg1ArGebRkvX6LXul14SM67o2e4mUCY=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
@@ -1705,20 +1705,20 @@ honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
modernc.org/b v1.0.0 h1:vpvqeyp17ddcQWF29Czawql4lDdABCDRbXRAS4+aF2o=
modernc.org/b v1.0.0/go.mod h1:uZWcZfRj1BpYzfN9JTerzlNUnnPsV9O2ZA8JsRcubNg=
modernc.org/cc/v4 v4.30.3 h1:aDq8gIX1X7+VFgO/JYYji6pLWL2H4tv3g8WatT3KCys=
modernc.org/cc/v4 v4.30.3/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI=
modernc.org/ccgo/v4 v4.37.0 h1:BAuJCUtIHIxFIYaFhqXIw5YaoMBlNCUlFovejHfMip4=
modernc.org/ccgo/v4 v4.37.0/go.mod h1:/8627VhwWtAbqUXmPORxFQU5SgLrAx2jl9seLw9GBhY=
modernc.org/cc/v4 v4.29.7 h1:q+NXGJ0bK3b4TXFYQQVr9pYETGnmwFWkrUzJnMya/Tg=
modernc.org/cc/v4 v4.29.7/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI=
modernc.org/ccgo/v4 v4.36.1 h1:ZNIUZAryN0UgnJwtyxrdEzcFc3yD4Cu4AzjfPXsLsIE=
modernc.org/ccgo/v4 v4.36.1/go.mod h1:rrtGc2QkS239nYb/mQNuBMyjq3/y3ZXWbBjPoV3wqzA=
modernc.org/fileutil v1.4.0 h1:j6ZzNTftVS054gi281TyLjHPp6CPHr2KCxEXjEbD6SM=
modernc.org/fileutil v1.4.0/go.mod h1:EqdKFDxiByqxLk8ozOxObDSfcVOv/54xDs/DUHdvCUU=
modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI=
modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito=
modernc.org/gc/v3 v3.2.0 h1:/Y3LGDMQaoYf55PebP1qsZ5FDGgAZyG1RYKEHeQzh1o=
modernc.org/gc/v3 v3.2.0/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY=
modernc.org/gc/v3 v3.1.5 h1:21ldfPfRYE31Tb7B3mwAK8gy1AxP4+dKjrOQPfqakoc=
modernc.org/gc/v3 v3.1.5/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY=
modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks=
modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI=
modernc.org/libc v1.79.0 h1:9Dvvv++bAMSkSuBzuOFAatbTV5OIoq6Y6FohmD3e7q8=
modernc.org/libc v1.79.0/go.mod h1:uT3kR61NsbeKJSLqq83GJwSnZMVLlSjyAz4DfTaBy1M=
modernc.org/libc v1.77.1 h1:Ct8j47QtiZ1Enj2DtFXQtUqrPCAjdCmPjtCuvrYQ0Hs=
modernc.org/libc v1.77.1/go.mod h1:87/pZ4L6nD1zqW4nItuS12YO7hN1igAah34xjnQo/W0=
modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
@@ -1728,8 +1728,8 @@ modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg=
modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns=
modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w=
modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE=
modernc.org/sqlite v1.61.1 h1:TBEE49wz7VlxS+qXRXMQiPUZYOXHJ4ku83daYv1fe04=
modernc.org/sqlite v1.61.1/go.mod h1:f4gr5tbpx2umklaT/QVtbi/50hNdM+4ng+2zMo8KXJ0=
modernc.org/sqlite v1.60.1 h1:/blz53O951KWFOso4QQvEs/Fq6cDBKLtMVrYNSeJVKw=
modernc.org/sqlite v1.60.1/go.mod h1:1dIoEagfDE72QytD5scH1lxARtaUgKgHC/NuApA27r0=
modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0=
modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A=
+2 -2
View File
@@ -1,6 +1,6 @@
apiVersion: v1
description: SeaweedFS
name: seaweedfs
appVersion: "4.56"
appVersion: "4.54"
# Dev note: Trigger a helm chart release by `git tag -a helm-<version>`
version: 4.56.0
version: 4.54.0
+1 -58
View File
@@ -122,18 +122,6 @@ https://github.com/rancher/local-path-provisioner
you can use ANY storage class you like, just update the correct storage-class
for your deployment.
Every claim the chart creates also takes an optional `volumeAttributesClassName`
next to its `storageClass` (for example `master.data.volumeAttributesClassName`
or `volume.dataDirs[].volumeAttributesClassName`), to set provisioned
performance such as IOPS and throughput through a
[VolumeAttributesClass](https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/).
It needs Kubernetes 1.34+, or 1.31+ with the `VolumeAttributesClass` feature gate.
`volumeClaimTemplates` cannot be changed on an existing StatefulSet, and a new
template only reaches claims created after it. To set it on a release that
already exists, patch `spec.volumeAttributesClassName` on each existing claim,
and delete the StatefulSet with `--cascade=orphan` before the upgrade so the
upgrade can apply the new template.
### Master data: hostPath vs a claim
The master's `-mdir` holds its Raft log and snapshots, and with them the
@@ -342,47 +330,6 @@ applies. Rotating a key in the Secret takes effect on the next pod restart, as
with any other environment variable. The COSI driver parses the config itself
and does not resolve these references.
#### Reload identities without a restart
The chart hashes `existingConfigSecret` into the filer and S3 pod templates when it renders,
so the first Helm upgrade after the Secret's content changes restarts those pods, and every
identity change briefly takes S3 down, completely so with a single filer. SeaweedFS also
reloads the identities file on SIGHUP, which `configReloader` uses instead:
```yaml
filer:
s3:
enabled: true
enableAuth: true
existingConfigSecret: my-s3-identities
configReloader:
enabled: true
```
`s3.configReloader` does the same for the standalone S3 gateway. With it:
- An `s3-config-reloader` sidecar checks the mounted identities file every second, and
sends SIGHUP to SeaweedFS when it changes and once when it starts. Kubelet updates the
file at its next sync of the pod. Secret volumes are eventually consistent, so there is no
fixed bound: with the kubelet's default settings (a one-minute sync period and the `Watch`
Secret change detection strategy) it typically takes up to about 90 seconds, and changing
an annotation on the pod usually brings it down to seconds. Other kubelet settings can make
it slower. Until the file is updated, a revoked identity keeps working.
- Changes to the content of `existingConfigSecret` no longer restart the pod: the chart
leaves `checksum/s3config` off it. Adding, changing, disabling and deleting identities
apply without a restart. Other files in the Secret, such as an audit log config, still
need one, and so do changes to the values the chart generates its own Secret from, such
as `s3.credentials`.
- Every reload also re-creates the KMS providers configured in the identities file. The
`local` provider keeps its keys in memory, so a reload replaces them, as a restart does;
use another provider for objects that must stay readable.
- The pod shares its process namespace (see [Sharing the process namespace](#sharing-the-process-namespace)),
so the sidecar can see SeaweedFS. It uses the component's image and container security
context, because it must run as the same user as SeaweedFS to signal it. If it can't
signal SeaweedFS, it logs a warning.
The all-in-one deployment does not have this option.
## Admin Component
The admin component provides a modern web-based administration interface for managing SeaweedFS clusters. It includes:
@@ -682,10 +629,6 @@ The volume servers do not require client certificates, because kubelet probes ca
`commonLabels` adds labels to the metadata of every object the chart creates. It may be a map or a template string rendering to one. The chart's own labels cannot be overridden, and pods (see `podLabels`) and `volumeClaimTemplates` are left unchanged.
## Sharing the process namespace
`filer.shareProcessNamespace` and `s3.shareProcessNamespace` let the containers in the filer and S3 pods see each other's processes, so a sidecar can signal SeaweedFS, for example with SIGHUP to reload the S3 identities file. SeaweedFS is then no longer PID 1 in its container, and every container in the pod can read the other containers' processes and files through `/proc`. Both are off by default.
## Pod and container security contexts
Pod and container security contexts are configurable independently for every built-in workload and remain empty by default for backwards compatibility. The examples in `values.yaml` show how to enable a `RuntimeDefault` seccomp profile, disable privilege escalation and privileged mode, drop all Linux capabilities, and use a read-only root filesystem.
@@ -786,7 +729,7 @@ global:
The engine registers its pod address with the masters and stores indexes through the filers and volume servers. Both Go and Rust volume servers use the same setup. The maintenance worker builds and updates ANN indexes; queries can scan data before indexing completes. Enabling filer write signing also requires clients writing directly to the filer HTTP API to supply a signed JWT.
The bundled engine images support Linux amd64 and arm64. Use `vector.imageOverride` to select a compatible engine build, `vector.masters` for an external cluster, and `vector.resources` to set memory and CPU limits. The engine sizes its caches to a quarter of its memory limit.
The bundled engine images support Linux amd64 and arm64. Use `vector.imageOverride` to select a compatible engine build, `vector.masters` for an external cluster, and `vector.resources` to set memory and CPU limits. The cache defaults to 512 MiB and is configured with `vector.readCacheMB`.
`global.seaweedfs.enableSecurity` provisions and mounts the vector certificate and shared security configuration. With external certificates, provide the `<fullname>-vector-cert` secret (`my-seaweedfs-vector-cert` for release `my`). `fullname` follows `seaweedfs.fullname`, including `fullnameOverride`, `nameOverride`, and DNS-name truncation. Provide this secret alongside the existing CA and client secrets.
@@ -189,10 +189,6 @@ spec:
{{- else }}
-masters={{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master.{{ include "seaweedfs.namespace" $ }}:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }} \
{{- end }}
{{- /* admin lists the filers and S3 gateways the workers use from this group */}}
{{- if .Values.filer.filerGroup }}
-filerGroup={{ .Values.filer.filerGroup }} \
{{- end }}
{{- if $urlPrefix }}
-urlPrefix={{ $urlPrefix }} \
{{- end }}
@@ -359,9 +355,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.admin.data.storageClass }}
{{- with .Values.admin.data.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.admin.data.size }}
@@ -376,9 +369,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.admin.logs.storageClass }}
{{- with .Values.admin.logs.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.admin.logs.size }}
@@ -22,9 +22,6 @@ spec:
{{- if .Values.allInOne.data.storageClass }}
storageClassName: {{ .Values.allInOne.data.storageClass }}
{{- end }}
{{- with .Values.allInOne.data.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.allInOne.data.size | default "10Gi" }}
@@ -4,10 +4,6 @@
{{- if .Values.filer.s3.enabled }}
{{- $s3PreStopSeconds = .Values.filer.s3.preStopSeconds | int }}
{{- end }}
{{- $s3ConfigReloader := (.Values.filer.s3.configReloader | default dict).enabled }}
{{- if and $s3ConfigReloader (not (and .Values.filer.s3.enabled .Values.filer.s3.enableAuth)) }}
{{- fail "filer.s3.configReloader.enabled needs filer.s3.enabled and filer.s3.enableAuth: it reloads the identities file they mount" }}
{{- end }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
@@ -54,11 +50,8 @@ spec:
{{- end }}
{{- $podAnnotations := mergeOverwrite (deepCopy (.Values.podAnnotations | default dict)) (.Values.filer.podAnnotations | default dict) }}
{{- if .Values.filer.s3.existingConfigSecret }}
{{- /* With the config reloader, a change to the existing Secret is applied by SIGHUP, so nothing in it may restart the pod. */}}
{{- if not $s3ConfigReloader }}
{{- $configSecret := (lookup "v1" "Secret" (include "seaweedfs.namespace" .) .Values.filer.s3.existingConfigSecret) | default dict }}
{{- $_ := set $podAnnotations "checksum/s3config" ($configSecret | toYaml | sha256sum) }}
{{- end }}
{{- else }}
{{- $_ := set $podAnnotations "checksum/s3config" (include "seaweedfs.s3.configChecksum" .) }}
{{- end }}
@@ -89,9 +82,6 @@ spec:
schedulerName: {{ .Values.filer.schedulerName | quote }}
{{- end }}
enableServiceLinks: false
{{- if or .Values.filer.shareProcessNamespace $s3ConfigReloader }}
shareProcessNamespace: true
{{- end }}
{{- if .Values.filer.initContainers }}
initContainers:
{{ tpl .Values.filer.initContainers . | nindent 8 | trim }}
@@ -407,9 +397,6 @@ spec:
{{- if .Values.filer.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.filer.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if $s3ConfigReloader }}
{{- include "seaweedfs.s3.configReloaderContainer" (dict "root" $ "image" (include "seaweedfs.filer.image" .) "port" .Values.filer.s3.port "resources" .Values.filer.s3.configReloader.resources "securityContext" .Values.filer.containerSecurityContext) | nindent 8 }}
{{- end }}
{{- if .Values.filer.sidecars }}
{{- include "seaweedfs.tplvalues.render" (dict "value" .Values.filer.sidecars "context" $) | nindent 8 }}
{{- end }}
@@ -510,9 +497,6 @@ spec:
{{- if .Values.filer.storageClass }}
storageClassName: {{ .Values.filer.storageClass }}
{{- end }}
{{- with .Values.filer.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
{{- end }}
{{- $pvc_exists := include "seaweedfs.filer.pvc_exists" . -}}
{{- if $pvc_exists }}
@@ -529,9 +513,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.filer.data.storageClass }}
{{- with .Values.filer.data.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.filer.data.size }}
@@ -548,9 +529,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.filer.logs.storageClass }}
{{- with .Values.filer.logs.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.filer.logs.size }}
@@ -340,9 +340,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.master.data.storageClass }}
{{- with .Values.master.data.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.master.data.size }}
@@ -359,9 +356,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.master.logs.storageClass }}
{{- with .Values.master.logs.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ .Values.master.logs.size }}
@@ -1,10 +1,6 @@
{{- include "seaweedfs.compat" . -}}
{{- if .Values.s3.enabled }}
{{- $preStopSeconds := .Values.s3.preStopSeconds | int }}
{{- $s3ConfigReloader := (.Values.s3.configReloader | default dict).enabled }}
{{- if and $s3ConfigReloader (not .Values.s3.enableAuth) }}
{{- fail "s3.configReloader.enabled needs s3.enableAuth: it reloads the identities file that mounts" }}
{{- end }}
{{- $minGracePeriod := add $preStopSeconds 15 }}
{{- if and (gt $preStopSeconds 0) (lt (.Values.s3.terminationGracePeriodSeconds | int) $minGracePeriod) }}
{{- fail (printf "s3.terminationGracePeriodSeconds (%v) must be at least %d: the gateway keeps serving for s3.preStopSeconds (%d) after SIGTERM, then gives in-flight requests up to 15s to finish; add the time any s3.lifecycle.preStop hook takes" .Values.s3.terminationGracePeriodSeconds $minGracePeriod $preStopSeconds) -}}
@@ -51,11 +47,8 @@ spec:
{{- end }}
{{- $podAnnotations := mergeOverwrite (deepCopy (.Values.podAnnotations | default dict)) (.Values.s3.podAnnotations | default dict) }}
{{- if .Values.s3.existingConfigSecret }}
{{- /* With the config reloader, a change to the existing Secret is applied by SIGHUP, so nothing in it may restart the pod. */}}
{{- if not $s3ConfigReloader }}
{{- $configSecret := (lookup "v1" "Secret" (include "seaweedfs.namespace" .) .Values.s3.existingConfigSecret) | default dict }}
{{- $_ := set $podAnnotations "checksum/s3config" ($configSecret | toYaml | sha256sum) }}
{{- end }}
{{- else }}
{{- $_ := set $podAnnotations "checksum/s3config" (include "seaweedfs.s3.configChecksum" .) }}
{{- end }}
@@ -85,9 +78,6 @@ spec:
schedulerName: {{ .Values.s3.schedulerName | quote }}
{{- end }}
enableServiceLinks: false
{{- if or .Values.s3.shareProcessNamespace $s3ConfigReloader }}
shareProcessNamespace: true
{{- end }}
{{- if .Values.s3.serviceAccountName }}
serviceAccountName: {{ .Values.s3.serviceAccountName | quote }}
{{- end }}
@@ -272,9 +262,6 @@ spec:
{{- if .Values.s3.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.s3.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if $s3ConfigReloader }}
{{- include "seaweedfs.s3.configReloaderContainer" (dict "root" $ "image" (include "seaweedfs.s3.image" .) "port" .Values.s3.port "resources" .Values.s3.configReloader.resources "securityContext" .Values.s3.containerSecurityContext) | nindent 8 }}
{{- end }}
{{- if .Values.s3.sidecars }}
{{- include "seaweedfs.tplvalues.render" (dict "value" .Values.s3.sidecars "context" $) | nindent 8 }}
{{- end }}
@@ -269,20 +269,15 @@ true
{{- end -}}
{{- end -}}
{{/* The S3 service's Lance namespace URL, for a worker pinned before 4.56; empty when it serves none */}}
{{/* Lance namespace URL the worker's Lance container maintains; empty when unreachable */}}
{{- define "seaweedfs.worker.lanceNamespaceUrl" -}}
{{- if and .Values.s3.enabled .Values.s3.lancePort -}}
{{- if .Values.worker.namespaceUrl -}}
{{- .Values.worker.namespaceUrl -}}
{{- else if and .Values.s3.enabled .Values.s3.lancePort -}}
{{- printf "http://%s.%s:%d" (include "seaweedfs.componentName" (list . "s3")) (include "seaweedfs.namespace" .) (int .Values.s3.lancePort) -}}
{{- end -}}
{{- end -}}
{{/* "true" when the worker runs its Lance container: an S3 gateway of this release serves a Lance namespace, or the worker serves an external admin, which names its cluster's */}}
{{- define "seaweedfs.worker.lanceEnabled" -}}
{{- if or (include "seaweedfs.worker.lanceNamespaceUrl" .) .Values.filer.s3.enabled .Values.worker.adminServer -}}
true
{{- end -}}
{{- end -}}
{{/* Return the proper volume image */}}
{{- define "seaweedfs.volume.image" -}}
{{- if .Values.volume.imageOverride -}}
@@ -789,65 +784,6 @@ on install.
| toJson | sha256sum -}}
{{- end -}}
{{/*
The s3-config-reloader sidecar of the filer and S3 pods. It checks the mounted identities file every
second and sends SIGHUP to SeaweedFS when it changes, so SeaweedFS loads it again without a restart.
It only signals once SeaweedFS listens on its S3 port, because SeaweedFS registers the reload when it
starts serving S3, and it sends one SIGHUP when it starts, which catches changes made while it was not
running. It needs the pod's process namespace to see SeaweedFS, and the same user to signal it, so it
uses the component's image and container security context.
Usage: include "seaweedfs.s3.configReloaderContainer" (dict "root" $ "image" <image> "port" <S3 port>
"resources" <resources> "securityContext" <the component's containerSecurityContext>)
*/}}
{{- define "seaweedfs.s3.configReloaderContainer" -}}
- name: s3-config-reloader
image: {{ .image }}
imagePullPolicy: {{ default "IfNotPresent" .root.Values.global.seaweedfs.imagePullPolicy }}
command:
- /bin/sh
- -c
- |
config_file=/etc/sw/seaweedfs_s3_config
# /proc/net/tcp lists ports in hex, and 0A is the state LISTEN.
s3_port=$(printf '%04X' {{ .port }})
last_hash=""
warned=""
while sleep 1; do
current_hash=$(sha256sum "$config_file" 2>/dev/null | cut -d' ' -f1)
if [ -z "$current_hash" ] || [ "$current_hash" = "$last_hash" ]; then
continue
fi
if ! grep -qE ":$s3_port [0-9A-F]+:[0-9A-F]+ 0A " /proc/net/tcp /proc/net/tcp6 2>/dev/null; then
continue
fi
signalled=""
for process_dir in /proc/[0-9]*; do
if [ "$(cat "$process_dir/comm" 2>/dev/null)" = "weed" ] && kill -HUP "${process_dir#/proc/}" 2>/dev/null; then
echo "S3 config changed (sha256 $current_hash), sent SIGHUP to weed (PID ${process_dir#/proc/})"
signalled=1
fi
done
if [ -n "$signalled" ]; then
last_hash=$current_hash
warned=""
elif [ -z "$warned" ]; then
echo "S3 config changed, but no weed process is visible: the pod must share its process namespace, and the sidecar must run as the same user as SeaweedFS" >&2
warned=1
fi
done
volumeMounts:
- name: config-users
mountPath: /etc/sw
readOnly: true
{{- with .resources }}
resources:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .securityContext.enabled }}
securityContext: {{- omit .securityContext "enabled" | toYaml | nindent 4 }}
{{- end }}
{{- end -}}
{{/* Master ConfigMap checksum, ignoring commonLabels so labels do not roll the pods */}}
{{- define "seaweedfs.master.configChecksum" -}}
{{- $context := merge (dict "Values" (omit .Values "commonLabels")) (omit . "Values") -}}
@@ -104,7 +104,7 @@
{{- if .Values.worker.metricsPort }}
{{- $ports = append $ports .Values.worker.metricsPort }}
{{- end }}
{{- if and .Values.worker.lanceMetricsPort (include "seaweedfs.worker.lanceEnabled" .) }}
{{- if and .Values.worker.lanceMetricsPort (include "seaweedfs.worker.lanceNamespaceUrl" .) }}
{{- $ports = append $ports .Values.worker.lanceMetricsPort }}
{{- end }}
{{- $targets = append $targets (dict "component" "worker" "ports" $ports) }}
@@ -56,9 +56,13 @@ spec:
- 'case "$POD_IP" in *:*) POD_IP="[$POD_IP]";; esac; exec /usr/bin/weed-vector --listen="$POD_IP:{{ .Values.vector.port }}" "$@"'
- vector
- {{ printf "--masters=%s" (.Values.vector.masters | default $masters) | quote }}
- {{ printf "--read-cache-mb=%d" (int .Values.vector.readCacheMB) | quote }}
{{- if .Values.filer.filerGroup }}
- {{ printf "--filer-group=%s" .Values.filer.filerGroup | quote }}
{{- end }}
{{- if .Values.vector.nprobes }}
- {{ printf "--nprobes=%d" (int .Values.vector.nprobes) | quote }}
{{- end }}
{{- if include "seaweedfs.securityConfigEnabled" . }}
- --security-toml=/etc/seaweedfs/security.toml
{{- end }}
@@ -412,9 +412,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ $dir.storageClass }}
{{- with $dir.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ $dir.size }}
@@ -433,9 +430,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ $volume.idx.storageClass }}
{{- with $volume.idx.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ $volume.idx.size }}
@@ -452,9 +446,6 @@ spec:
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ $volume.logs.storageClass }}
{{- with $volume.logs.volumeAttributesClassName }}
volumeAttributesClassName: {{ . | quote }}
{{- end }}
resources:
requests:
storage: {{ $volume.logs.size }}
@@ -228,7 +228,7 @@ spec:
{{- if .Values.worker.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.worker.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if include "seaweedfs.worker.lanceEnabled" . }}
{{- if include "seaweedfs.worker.lanceNamespaceUrl" . }}
- name: worker-lance
image: {{ template "seaweedfs.worker.image" . }}
imagePullPolicy: {{ default "IfNotPresent" .Values.global.seaweedfs.imagePullPolicy }}
@@ -237,21 +237,13 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
{{- /* only a worker pinned before 4.56 reads these; later ones learn the cluster from admin */}}
{{- with include "seaweedfs.worker.lanceNamespaceUrl" . }}
- name: WEED_LANCE_NAMESPACE
value: {{ . | quote }}
{{- end }}
- name: WEED_MASTERS
value: {{ include "seaweedfs.masterServerArg" . | quote }}
{{- if .Values.filer.filerGroup }}
- name: WEED_FILER_GROUP
value: {{ .Values.filer.filerGroup | quote }}
{{- end }}
{{- /* the URL crosses a shell line; metacharacters must arrive as data, not syntax */}}
- name: LANCE_NAMESPACE_URL
value: {{ include "seaweedfs.worker.lanceNamespaceUrl" . | quote }}
{{- $mergedExtraEnvironmentVars := dict }}
{{- include "seaweedfs.mergeExtraEnvironmentVars" (dict "global" .Values.global.seaweedfs "component" .Values.worker "target" $mergedExtraEnvironmentVars) }}
{{- /* a duplicate would win over the chart's value and change --id or the cluster */}}
{{- $mergedExtraEnvironmentVars = omit $mergedExtraEnvironmentVars "POD_NAME" "WEED_LANCE_NAMESPACE" "WEED_MASTERS" "WEED_FILER_GROUP" }}
{{- /* a duplicate would win over the chart's value and change --id or --namespace */}}
{{- $mergedExtraEnvironmentVars = omit $mergedExtraEnvironmentVars "POD_NAME" "LANCE_NAMESPACE_URL" }}
{{- range $key := keys $mergedExtraEnvironmentVars | sortAlpha }}
{{- $value := index $mergedExtraEnvironmentVars $key }}
- name: {{ $key }}
@@ -280,6 +272,11 @@ spec:
{{- else }}
--admin={{ template "seaweedfs.fullname" . }}-admin.{{ include "seaweedfs.namespace" . }}:{{ .Values.admin.port }}{{ if .Values.admin.grpcPort }}.{{ .Values.admin.grpcPort }}{{ end }} \
{{- end }}
--namespace="$LANCE_NAMESPACE_URL" \
--masters={{ include "seaweedfs.masterServerArg" . }} \
{{- if .Values.filer.filerGroup }}
--filer-group={{ .Values.filer.filerGroup }} \
{{- end }}
{{- if .Values.global.seaweedfs.enableSecurity }}
--tls-ca=/usr/local/share/ca-certificates/ca/tls.crt \
--tls-cert=/usr/local/share/ca-certificates/worker/tls.crt \
@@ -302,7 +299,7 @@ spec:
- name: ca-cert
readOnly: true
mountPath: /usr/local/share/ca-certificates/ca/
{{- /* grpc.client, which the worker dials the filers with */}}
{{- /* grpc.client, which the worker dials the masters and filers with */}}
- name: client-cert
readOnly: true
mountPath: /usr/local/share/ca-certificates/client/
@@ -345,7 +342,7 @@ spec:
{{- include "seaweedfs.tplvalues.render" (dict "value" .Values.worker.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
{{- include "seaweedfs.tmpDirVolume" (list . .Values.worker.containerSecurityContext (tpl (.Values.worker.extraVolumeMounts | default "") .) (tpl (.Values.worker.extraVolumes | default "") .) (ne (include "seaweedfs.worker.lanceEnabled" .) "")) | nindent 8 }}
{{- include "seaweedfs.tmpDirVolume" (list . .Values.worker.containerSecurityContext (tpl (.Values.worker.extraVolumeMounts | default "") .) (tpl (.Values.worker.extraVolumes | default "") .) (ne (include "seaweedfs.worker.lanceNamespaceUrl" .) "")) | nindent 8 }}
{{- if eq .Values.worker.data.type "hostPath" }}
- name: worker-data
hostPath:
@@ -13,7 +13,7 @@ metadata:
{{- with include "seaweedfs.commonLabels" $ }}{{ . | nindent 4 }}{{ end }}
spec:
clusterIP: None # Headless service
{{- $lanceMetrics := and .Values.worker.lanceMetricsPort (include "seaweedfs.worker.lanceEnabled" .) }}
{{- $lanceMetrics := and .Values.worker.lanceMetricsPort (include "seaweedfs.worker.lanceNamespaceUrl" .) }}
{{- if or .Values.worker.metricsPort $lanceMetrics }}
ports:
{{- if .Values.worker.metricsPort }}
@@ -1,6 +1,6 @@
{{- include "seaweedfs.compat" . -}}
{{- if .Values.worker.enabled }}
{{- $lanceMetrics := and .Values.worker.lanceMetricsPort (include "seaweedfs.worker.lanceEnabled" .) }}
{{- $lanceMetrics := and .Values.worker.lanceMetricsPort (include "seaweedfs.worker.lanceNamespaceUrl" .) }}
{{- if or .Values.worker.metricsPort $lanceMetrics }}
{{- if .Values.global.seaweedfs.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1
+7 -41
View File
@@ -151,14 +151,12 @@ master:
# Enter any extra configuration for master.toml here.
# It may be a multi-line string.
# volumeAttributesClassName (optional) needs Kubernetes 1.34+, or 1.31+ with the VolumeAttributesClass feature gate.
# You may use ANY storage-class, example with local-path-provisioner
# Annotations are optional.
# data:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
# volumeAttributesClassName: "my-attributes-class"
# annotations:
# "key": "value"
#
@@ -186,7 +184,6 @@ master:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
# volumeAttributesClassName: "my-attributes-class"
# annotations:
# "key": "value"
@@ -419,7 +416,6 @@ volume:
# extraArgs: ["-customFlag", "value", "-anotherFlag"]
extraArgs: []
# volumeAttributesClassName (optional) needs Kubernetes 1.34+, or 1.31+ with the VolumeAttributesClass feature gate.
# For each data disk you may use ANY storage-class, example with local-path-provisioner
# Annotations are optional.
# dataDirs:
@@ -427,7 +423,6 @@ volume:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
# volumeAttributesClassName: "my-attributes-class"
# annotations:
# "key": "value"
# maxVolumes: 0 # If set to zero on non-windows OS, the limit will be auto configured. (default "7")
@@ -482,7 +477,6 @@ volume:
# type: "persistentVolumeClaim"
# size: "20Gi"
# storageClass: "local-path-provisioner"
# volumeAttributesClassName: "my-attributes-class"
#
# or
#
@@ -805,16 +799,12 @@ filer:
storage: 25Gi
# storageClass is the class of storage which defaults to null (the Kube cluster will pick the default).
storageClass: null
# volumeAttributesClassName is the VolumeAttributesClass of the enablePVC claim; null leaves it unset.
volumeAttributesClassName: null
# volumeAttributesClassName (optional) needs Kubernetes 1.34+, or 1.31+ with the VolumeAttributesClass feature gate.
# You may use ANY storage-class, example with local-path-provisioner
# Annotations are optional.
# data:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
# volumeAttributesClassName: "my-attributes-class"
# annotations:
# "key": "value"
#
@@ -838,7 +828,6 @@ filer:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
# volumeAttributesClassName: "my-attributes-class"
# annotations:
# "key": "value"
@@ -867,11 +856,6 @@ filer:
extraVolumes: ""
extraVolumeMounts: ""
# Share one process namespace between the containers of the filer pod, so a
# sidecar can see and signal the filer process, for example to reload its
# configuration with SIGHUP. The filer is then no longer PID 1.
shareProcessNamespace: false
# Labels to be added to the filer pods
podLabels: {}
@@ -1107,13 +1091,6 @@ filer:
# set to the name of an existing kubernetes Secret with the s3 json config file
# should have a secret key called seaweedfs_s3_config with an inline json configure
existingConfigSecret: null
# Reload the identities file without restarting the filer: a sidecar sends
# SIGHUP to SeaweedFS when kubelet updates the mounted config Secret, and the
# pod no longer restarts when the content of existingConfigSecret changes.
# Needs enableAuth, and turns on shareProcessNamespace. See the README.
configReloader:
enabled: false
resources: {}
# To provide explicit credentials for the S3 gateway, set them under
# the top-level s3.credentials key (not filer.s3.credentials).
# The s3-secret.yaml template only reads from .Values.s3.credentials.
@@ -1184,7 +1161,7 @@ s3:
# Set to a port number to enable, or 0/null to disable
icebergPort: null
# Lance Namespace port; weed serves 9101 by default, 0 disables it
# (and the worker's Lance container)
# (and, unless worker.namespaceUrl points elsewhere, the worker's Lance container)
lancePort: 9101
loggingOverrideLevel: null
# enable user & permission to s3 (need to inject to all services)
@@ -1192,13 +1169,6 @@ s3:
# set to the name of an existing kubernetes Secret with the s3 json config file
# should have a secret key called seaweedfs_s3_config with an inline json config
existingConfigSecret: null
# Reload the identities file without restarting the gateway: a sidecar sends
# SIGHUP to SeaweedFS when kubelet updates the mounted config Secret, and the
# pod no longer restarts when the content of existingConfigSecret changes.
# Needs enableAuth, and turns on shareProcessNamespace. See the README.
configReloader:
enabled: false
resources: {}
# Optionally provide explicit credentials for the S3 gateway.
# When set, these are used in the generated s3 secret instead of
# auto-generating random credentials.
@@ -1258,11 +1228,6 @@ s3:
extraVolumes: ""
extraVolumeMounts: ""
# Share one process namespace between the containers of the s3 pod, so a
# sidecar can see and signal the gateway process, for example to reload its
# configuration with SIGHUP. The gateway is then no longer PID 1.
shareProcessNamespace: false
# Labels to be added to the s3 pods
podLabels: {}
@@ -1644,12 +1609,10 @@ admin:
extraArgs: []
# Storage configuration
# volumeAttributesClassName (optional) needs Kubernetes 1.34+, or 1.31+ with the VolumeAttributesClass feature gate.
data:
type: "emptyDir" # Options: "hostPath", "persistentVolumeClaim", "emptyDir", "existingClaim"
size: "10Gi"
storageClass: ""
volumeAttributesClassName: ""
hostPathPrefix: /storage
claimName: ""
annotations: {}
@@ -1658,7 +1621,6 @@ admin:
type: "emptyDir" # Options: "hostPath", "persistentVolumeClaim", "emptyDir", "existingClaim"
size: "5Gi"
storageClass: ""
volumeAttributesClassName: ""
hostPathPrefix: /storage
claimName: ""
annotations: {}
@@ -1812,6 +1774,8 @@ vector:
port: 8090
metricsPort: 0
masters: ""
readCacheMB: 512
nprobes: null
extraArgs: []
extraEnvironmentVars: {}
podLabels: {}
@@ -1868,7 +1832,7 @@ worker:
# The lance_* jobs run in their own container, /usr/bin/weed-worker.
# amd64/arm64 only; pin mixed clusters with worker.affinity/nodeSelector.
# Admin tells it the filers and the S3 gateways' Lance namespaces; it reads
# It keeps tables through the filers the masters list and reads
# security.toml. The Lance namespace knows it by a token derived from
# jwt.filer_signing.key, which the chart renders only with
# global.seaweedfs.securityConfig.jwtSigning.filerWrite: true. When S3 has
@@ -1877,6 +1841,9 @@ worker:
# HTTP writes, so clients writing to the filer's HTTP API directly need a JWT
# signed with that key.
# Lance namespace URL override; empty derives it from s3.lancePort.
namespaceUrl: ""
# Metrics port for the Lance worker container; the Go worker keeps metricsPort
lanceMetricsPort: 9328
@@ -2154,7 +2121,6 @@ allInOne:
claimName: seaweedfs-data-pvc # Name of the PVC to use (for existingClaim type)
size: null # Size of the PVC (null defaults to 10Gi for persistentVolumeClaim type)
storageClass: null # Storage class for the PVC (null uses cluster default)
volumeAttributesClassName: null # VolumeAttributesClass for the PVC; needs Kubernetes 1.34+, or 1.31+ with the feature gate
# accessModes for the PVC. Default is ["ReadWriteOnce"].
# For multi-replica deployments, use ["ReadWriteMany"] with a compatible storage class.
accessModes: []
+1020 -1060
View File
File diff suppressed because it is too large. Load diff

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 53 KiB

@@ -42,26 +42,12 @@ public class FileChunkManifest {
// avoid deprecated chunk.getFileId()
resolvedChunks.add(t.toBuilder().setFileId(FilerClient.toFileId(t.getFid())).build());
}
dataChunks.addAll(resolveChunkManifest(filerClient, cutToManifestSpan(chunk, resolvedChunks)));
dataChunks.addAll(resolveChunkManifest(filerClient, resolvedChunks));
}
return dataChunks;
}
// A truncate may have shortened a manifest and left the chunks it holds whole.
static List<FilerProto.FileChunk> cutToManifestSpan(FilerProto.FileChunk manifest, List<FilerProto.FileChunk> held) {
long end = manifest.getOffset() + manifest.getSize();
List<FilerProto.FileChunk> cut = new ArrayList<>(held.size());
for (FilerProto.FileChunk chunk : held) {
if (chunk.getOffset() + chunk.getSize() <= end) {
cut.add(chunk);
} else if (chunk.getOffset() < end) {
cut.add(chunk.toBuilder().setSize(end - chunk.getOffset()).build());
}
}
return cut;
}
private static byte[] fetchChunk(final FilerClient filerClient, FilerProto.FileChunk chunk) throws IOException {
String vid = "" + chunk.getFid().getVolumeId();
@@ -1,102 +0,0 @@
package seaweedfs.client;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.StandardCharsets;
import java.security.GeneralSecurityException;
import java.util.Base64;
// Credentials for a filer's own HTTP port: [filer.basic_auth], [jwt.filer_signing] and
// [jwt.filer_signing.read]. Each FilerClient starts from its own copy of the security.toml values.
public final class FilerCredentials {
private static final long DEFAULT_SIGNING_EXPIRES_AFTER_SECONDS = 10;
private static final long DEFAULT_READ_SIGNING_EXPIRES_AFTER_SECONDS = 60;
private volatile String basicAuthUser = "";
private volatile String basicAuthPassword = "";
private volatile String basicAuthHeaderValue;
private volatile String signingKey = "";
private volatile long signingExpiresAfterSeconds = DEFAULT_SIGNING_EXPIRES_AFTER_SECONDS;
private volatile String readSigningKey = "";
private volatile long readSigningExpiresAfterSeconds = DEFAULT_READ_SIGNING_EXPIRES_AFTER_SECONDS;
public FilerCredentials() {
}
public FilerCredentials(FilerCredentials other) {
synchronized (other) {
basicAuthUser = other.basicAuthUser;
basicAuthPassword = other.basicAuthPassword;
basicAuthHeaderValue = other.basicAuthHeaderValue;
signingKey = other.signingKey;
signingExpiresAfterSeconds = other.signingExpiresAfterSeconds;
readSigningKey = other.readSigningKey;
readSigningExpiresAfterSeconds = other.readSigningExpiresAfterSeconds;
}
}
// A null argument keeps the current value. Like the filer, an empty password turns
// Basic Auth off and an empty user is allowed.
public synchronized void setBasicAuth(String user, String password) {
if (user != null) {
basicAuthUser = user;
}
if (password != null) {
basicAuthPassword = password;
}
basicAuthHeaderValue = basicAuthPassword.isEmpty() ? null
: FilerSecurityContext.encodeBasicAuth(basicAuthUser, basicAuthPassword);
}
// A null key or expiresAfterSeconds <= 0 keeps the current value; an empty key turns signing off.
public synchronized void setJwtSigningKey(String key, long expiresAfterSeconds) {
if (key != null) {
signingKey = key;
}
if (expiresAfterSeconds > 0) {
signingExpiresAfterSeconds = expiresAfterSeconds;
}
}
// Same as setJwtSigningKey, for the read key.
public synchronized void setJwtReadSigningKey(String key, long expiresAfterSeconds) {
if (key != null) {
readSigningKey = key;
}
if (expiresAfterSeconds > 0) {
readSigningExpiresAfterSeconds = expiresAfterSeconds;
}
}
// Returns the Authorization header value for an HTTP request addressed to the filer:
// a filer JWT for the access level when its key is set, else [filer.basic_auth], else
// [basic_auth]; null when none is configured. The filer reads GET and HEAD with the read key.
public String getAuthorizationHeaderValue(boolean isWrite) {
String key = isWrite ? signingKey : readSigningKey;
if (!key.isEmpty()) {
return "BEARER " + genJwtForFilerServer(key.getBytes(StandardCharsets.UTF_8),
isWrite ? signingExpiresAfterSeconds : readSigningExpiresAfterSeconds);
}
String basicAuth = basicAuthHeaderValue;
if (basicAuth != null) {
return basicAuth;
}
return FilerSecurityContext.getBasicAuthHeaderValue();
}
// Mints an HS256 token with only an "exp" claim, like security.GenJwtForFilerServer.
static String genJwtForFilerServer(byte[] signingKey, long expiresAfterSeconds) {
Base64.Encoder encoder = Base64.getUrlEncoder().withoutPadding();
long exp = System.currentTimeMillis() / 1000 + expiresAfterSeconds;
String signingInput = encoder.encodeToString("{\"alg\":\"HS256\",\"typ\":\"JWT\"}".getBytes(StandardCharsets.UTF_8))
+ "." + encoder.encodeToString(("{\"exp\":" + exp + "}").getBytes(StandardCharsets.UTF_8));
try {
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(signingKey, "HmacSHA256"));
return signingInput + "." + encoder.encodeToString(mac.doFinal(signingInput.getBytes(StandardCharsets.UTF_8)));
} catch (GeneralSecurityException e) {
throw new IllegalStateException("cannot sign filer jwt", e);
}
}
}
@@ -50,7 +50,6 @@ public class FilerGrpcClient {
private String replication = "";
private int volumeServerAccess = VOLUME_SERVER_ACCESS_DIRECT;
private String filerAddress;
private final FilerCredentials filerCredentials = new FilerCredentials(FilerSecurityContext.getFilerCredentials());
public FilerGrpcClient(String host, int port, int grpcPort, String cn) {
this(host, port, grpcPort, cn, sslContext);
@@ -155,11 +154,6 @@ public class FilerGrpcClient {
return SeaweedFilerGrpc.newFutureStub(getChannel());
}
// Credentials for this client's requests to the filer's HTTP port; changes affect only this client.
public FilerCredentials getFilerCredentials() {
return filerCredentials;
}
public void setAccessVolumeServerDirectly() {
this.volumeServerAccess = VOLUME_SERVER_ACCESS_DIRECT;
}
@@ -189,18 +183,9 @@ public class FilerGrpcClient {
case VOLUME_SERVER_ACCESS_PUBLIC_URL:
return String.format("%s://%s/%s", protocol, publicUrl, chunkId);
case VOLUME_SERVER_ACCESS_FILER_PROXY:
return proxyChunkUrlPrefix() + chunkId;
return String.format("%s://%s/?proxyChunkId=%s", protocol, this.filerAddress, chunkId);
default:
return String.format("%s://%s/%s", protocol, url, chunkId);
}
}
// Reports whether a chunk URL addresses this client's filer chunk proxy rather than a volume server.
public boolean isProxyChunkUrl(String url) {
return isAccessVolumeServerByFilerProxy() && url != null && url.startsWith(proxyChunkUrlPrefix());
}
private String proxyChunkUrlPrefix() {
return String.format("%s://%s/?proxyChunkId=", protocol, this.filerAddress);
}
}
@@ -43,8 +43,6 @@ public abstract class FilerSecurityContext extends SslContext {
// volume/proxy HTTP requests. Precomputed so per-chunk requests don't re-encode.
private static volatile String basicAuthHeaderValue;
private static final FilerCredentials filerCredentials = new FilerCredentials();
static {
String securityFileName = "security.toml";
@@ -66,11 +64,6 @@ public abstract class FilerSecurityContext extends SslContext {
basicAuthHeaderValue = computeBasicAuthHeaderValue(
toml.getString("basic_auth.username"), toml.getString("basic_auth.password"));
filerCredentials.setBasicAuth(toml.getString("filer.basic_auth.user"), toml.getString("filer.basic_auth.password"));
filerCredentials.setJwtSigningKey(toml.getString("jwt.filer_signing.key"),
toml.getLong("jwt.filer_signing.expires_after_seconds", 0L));
filerCredentials.setJwtReadSigningKey(toml.getString("jwt.filer_signing.read.key"),
toml.getLong("jwt.filer_signing.read.expires_after_seconds", 0L));
grpcTrustCertCollectionFilePath = toml.getString("grpc.ca");
logger.debug("loading gRPC ca from {}", grpcTrustCertCollectionFilePath);
@@ -93,7 +86,7 @@ public abstract class FilerSecurityContext extends SslContext {
}
}
if (toml.getBoolean("https.client.enabled", false)) {
if (toml.getBoolean("https.client.enabled")) {
httpTrustCertCollectionFilePath = toml.getString("https.client.ca");
logger.debug("loading HTTP ca from {}", httpTrustCertCollectionFilePath);
httpClientCertChainFilePath = toml.getString("https.client.cert");
@@ -153,20 +146,11 @@ public abstract class FilerSecurityContext extends SslContext {
return basicAuthHeaderValue;
}
// The filer credentials read from security.toml; each FilerClient copies them.
static FilerCredentials getFilerCredentials() {
return filerCredentials;
}
private static String computeBasicAuthHeaderValue(String username, String password) {
if (Strings.isNullOrEmpty(username)) {
return null;
}
return encodeBasicAuth(username, password == null ? "" : password);
}
static String encodeBasicAuth(String username, String password) {
String credentials = username + ":" + password;
String credentials = username + ":" + (password == null ? "" : password);
return "Basic " + Base64.getEncoder().encodeToString(credentials.getBytes(StandardCharsets.UTF_8));
}
@@ -136,7 +136,7 @@ public class SeaweedRead {
for (FilerProto.Location location : locations.getLocationsList()) {
String url = filerClient.getChunkUrl(chunkView.fileId, location.getUrl(), location.getPublicUrl());
try {
byte[] fetched = doFetchOneFullChunkData(filerClient, chunkView, url);
byte[] fetched = doFetchOneFullChunkData(chunkView, url);
// An empty (or null) body for a chunk we are reading from is never
// valid; treat it as a transient failure so the retry loop tries
// another location and backs off, rather than caching an empty chunk.
@@ -171,19 +171,15 @@ public class SeaweedRead {
}
private static byte[] doFetchOneFullChunkData(FilerClient filerClient, ChunkView chunkView, String url) throws IOException {
private static byte[] doFetchOneFullChunkData(ChunkView chunkView, String url) throws IOException {
HttpGet request = new HttpGet(url);
request.setHeader(HttpHeaders.ACCEPT_ENCODING, "gzip");
String authHeader = FilerSecurityContext.getBasicAuthHeaderValue();
if (filerClient.isProxyChunkUrl(url)) {
authHeader = filerClient.getFilerCredentials().getAuthorizationHeaderValue(false);
request.setConfig(SeaweedUtil.PROXY_CHUNK_REQUEST_CONFIG);
}
if (authHeader != null) {
request.setHeader(HttpHeaders.AUTHORIZATION, authHeader);
String basicAuthHeader = FilerSecurityContext.getBasicAuthHeaderValue();
if (basicAuthHeader != null) {
request.setHeader(HttpHeaders.AUTHORIZATION, basicAuthHeader);
}
byte[] data = null;
@@ -191,11 +187,6 @@ public class SeaweedRead {
CloseableHttpResponse response = SeaweedUtil.getClosableHttpClient().execute(request);
try {
int status = response.getStatusLine().getStatusCode();
if (status / 100 != 2) {
throw new IOException("fetch " + url + ": " + response.getStatusLine());
}
HttpEntity entity = response.getEntity();
Header contentEncodingHeader = entity.getContentEncoding();
@@ -1,6 +1,5 @@
package seaweedfs.client;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.config.Registry;
import org.apache.http.config.RegistryBuilder;
import org.apache.http.conn.socket.ConnectionSocketFactory;
@@ -91,7 +90,4 @@ public class SeaweedUtil {
}
return host + ":" + port;
}
// Redirects would carry the filer credential to the redirect target.
static final RequestConfig PROXY_CHUNK_REQUEST_CONFIG = RequestConfig.custom().setRedirectsEnabled(false).build();
}
@@ -135,7 +135,7 @@ public class SeaweedWrite {
cipherKeyString = ByteString.copyFrom(cipherKey);
}
String etag = multipartUpload(filerClient, targetUrl, auth, bytes, bytesOffset, bytesLength, cipherKey);
String etag = multipartUpload(targetUrl, auth, bytes, bytesOffset, bytesLength, cipherKey);
return FilerProto.FileChunk.newBuilder()
.setFileId(fileId)
@@ -167,8 +167,7 @@ public class SeaweedWrite {
}
}
private static String multipartUpload(FilerClient filerClient,
String targetUrl,
private static String multipartUpload(String targetUrl,
String auth,
final byte[] bytes,
final long bytesOffset, final long bytesLength,
@@ -194,14 +193,7 @@ public class SeaweedWrite {
}
HttpPost post = new HttpPost(targetUrl);
String filerAuthHeader = null;
if (filerClient.isProxyChunkUrl(targetUrl)) {
filerAuthHeader = filerClient.getFilerCredentials().getAuthorizationHeaderValue(true);
post.setConfig(SeaweedUtil.PROXY_CHUNK_REQUEST_CONFIG);
}
if (filerAuthHeader != null) {
post.addHeader("Authorization", filerAuthHeader);
} else if (auth != null && auth.length() != 0) {
if (auth != null && auth.length() != 0) {
// Volume JWT and Basic Auth both use the Authorization header; the JWT wins
// when present. Front the volume with a JWT-free path to use Basic Auth here.
post.addHeader("Authorization", "BEARER " + auth);
@@ -556,15 +556,9 @@ message AtomicRenameEntryRequest {
// already exists. Lets a caller that authorized the rename without delete
// access on an absent target stay safe if one is created concurrently.
bool fail_if_target_exists = 6;
// Set on a rename forwarded to the source's write owner, so it is not
// forwarded again.
bool is_moved = 7;
}
message AtomicRenameEntryResponse {
// Set for a forwarded rename: the owner's metadata log position of
// the rename's last event.
int64 ts_ns = 1;
}
message StreamRenameEntryRequest {
@@ -573,9 +567,6 @@ message StreamRenameEntryRequest {
string new_directory = 3;
string new_name = 4;
repeated int32 signatures = 5;
// Set on a rename forwarded to the source's write owner, so it is not
// forwarded again.
bool is_moved = 6;
}
message StreamRenameEntryResponse {
string directory = 1;
@@ -690,7 +681,6 @@ message GetFilerConfigurationResponse {
string filer_group = 13;
int32 major_version = 14;
int32 minor_version = 15;
string digest = 16; // "md5" or "sha256": the hash behind ETags and chunk digests
}
message SubscribeMetadataRequest {
@@ -1,43 +0,0 @@
package seaweedfs.client;
import org.junit.Assert;
import org.junit.Test;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
public class FileChunkManifestTest {
private static FilerProto.FileChunk chunk(int volumeId, long key, long offset, long size) {
return FilerProto.FileChunk.newBuilder()
.setFid(FilerProto.FileId.newBuilder().setVolumeId(volumeId).setFileKey(key).setCookie(1))
.setOffset(offset)
.setSize(size)
.setModifiedTsNs(1)
.build();
}
@Test
public void testCutToManifestSpanCutsAShortenedManifest() throws IOException {
List<FilerProto.FileChunk> held = Arrays.asList(chunk(9, 1, 0, 100), chunk(9, 2, 100, 100), chunk(9, 3, 200, 100));
FilerProto.FileChunk manifest = chunk(9, 4, 0, 150).toBuilder().setIsChunkManifest(true).build();
List<FilerProto.FileChunk> cut = FileChunkManifest.cutToManifestSpan(manifest, held);
Assert.assertEquals(2, cut.size());
Assert.assertEquals(held.get(0), cut.get(0));
Assert.assertEquals(100, cut.get(1).getOffset());
Assert.assertEquals(50, cut.get(1).getSize());
Assert.assertEquals(100, held.get(1).getSize());
List<SeaweedRead.VisibleInterval> visibles = ReadChunks.readResolvedChunks(cut);
Assert.assertEquals(150, visibles.get(visibles.size() - 1).stop);
}
@Test
public void testCutToManifestSpanLeavesAWholeManifestAlone() {
List<FilerProto.FileChunk> held = Arrays.asList(chunk(9, 1, 0, 100), chunk(9, 2, 100, 100));
FilerProto.FileChunk manifest = chunk(9, 4, 0, 200).toBuilder().setIsChunkManifest(true).build();
Assert.assertEquals(held, FileChunkManifest.cutToManifestSpan(manifest, held));
}
}
@@ -1,244 +0,0 @@
package seaweedfs.client;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpServer;
import io.grpc.Server;
import io.grpc.ServerBuilder;
import io.grpc.stub.StreamObserver;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
public class FilerJwtTest {
private FilerCredentials credentials;
@Before
public void clearCredentials() {
FilerSecurityContext.setBasicAuth(null, null);
credentials = new FilerCredentials();
}
@After
public void clearProxyBasicAuth() {
FilerSecurityContext.setBasicAuth(null, null);
}
@Test
public void filerJwtIsSignedHs256WithExp() throws Exception {
long before = System.currentTimeMillis() / 1000;
String token = FilerCredentials.genJwtForFilerServer("write-key".getBytes(StandardCharsets.UTF_8), 10);
long after = System.currentTimeMillis() / 1000;
String[] parts = token.split("\\.");
assertEquals(3, parts.length);
assertEquals("{\"alg\":\"HS256\",\"typ\":\"JWT\"}", decode(parts[0]));
long exp = exp(decode(parts[1]));
assertTrue(exp >= before + 10 && exp <= after + 10);
assertEquals(sign("write-key", parts[0] + "." + parts[1]), parts[2]);
assertFalse(token.contains("="));
}
@Test
public void noCredentialsMeansNoFilerHeader() {
assertNull(credentials.getAuthorizationHeaderValue(true));
assertNull(credentials.getAuthorizationHeaderValue(false));
}
@Test
public void accessLevelPicksItsSigningKey() throws Exception {
credentials.setJwtSigningKey("write-key", 0);
credentials.setJwtReadSigningKey("read-key", 0);
long now = System.currentTimeMillis() / 1000;
String[] write = bearer(credentials.getAuthorizationHeaderValue(true));
assertEquals(sign("write-key", write[0] + "." + write[1]), write[2]);
assertTrue(exp(decode(write[1])) - now <= 11);
String[] read = bearer(credentials.getAuthorizationHeaderValue(false));
assertEquals(sign("read-key", read[0] + "." + read[1]), read[2]);
assertTrue(exp(decode(read[1])) - now >= 60);
}
@Test
public void basicAuthCoversAccessLevelsWithoutKey() {
FilerSecurityContext.setBasicAuth("proxy", "proxy-pass");
assertEquals(FilerSecurityContext.getBasicAuthHeaderValue(),
credentials.getAuthorizationHeaderValue(false));
credentials.setBasicAuth("filer", "filer-pass");
String filerBasic = "Basic " + Base64.getEncoder()
.encodeToString("filer:filer-pass".getBytes(StandardCharsets.UTF_8));
assertEquals(filerBasic, credentials.getAuthorizationHeaderValue(false));
credentials.setJwtSigningKey("write-key", 5);
assertTrue(credentials.getAuthorizationHeaderValue(true).startsWith("BEARER "));
assertEquals(filerBasic, credentials.getAuthorizationHeaderValue(false));
}
@Test
public void filerBasicAuthFollowsThePassword() {
credentials.setBasicAuth("filer", "");
assertNull(credentials.getAuthorizationHeaderValue(false));
credentials.setBasicAuth("", "only-pass");
assertEquals("Basic " + Base64.getEncoder().encodeToString(":only-pass".getBytes(StandardCharsets.UTF_8)),
credentials.getAuthorizationHeaderValue(false));
}
@Test
public void nullKeepsTheCurrentValue() throws Exception {
credentials.setBasicAuth("filer", "old-pass");
credentials.setBasicAuth(null, "new-pass");
assertEquals("Basic " + Base64.getEncoder().encodeToString("filer:new-pass".getBytes(StandardCharsets.UTF_8)),
credentials.getAuthorizationHeaderValue(false));
credentials.setJwtSigningKey("write-key", 0);
credentials.setJwtSigningKey(null, 300);
long now = System.currentTimeMillis() / 1000;
String[] write = bearer(credentials.getAuthorizationHeaderValue(true));
assertEquals(sign("write-key", write[0] + "." + write[1]), write[2]);
assertTrue(exp(decode(write[1])) - now >= 300);
credentials.setJwtSigningKey("", 0);
assertTrue(credentials.getAuthorizationHeaderValue(true).startsWith("Basic "));
}
@Test
public void copiesSignIndependently() throws Exception {
credentials.setJwtSigningKey("shared-key", 0);
FilerCredentials a = new FilerCredentials(credentials);
FilerCredentials b = new FilerCredentials(credentials);
b.setJwtSigningKey("b-key", 0);
String[] fromA = bearer(a.getAuthorizationHeaderValue(true));
String[] fromB = bearer(b.getAuthorizationHeaderValue(true));
assertEquals(sign("shared-key", fromA[0] + "." + fromA[1]), fromA[2]);
assertEquals(sign("b-key", fromB[0] + "." + fromB[1]), fromB[2]);
String[] fromDefaults = bearer(credentials.getAuthorizationHeaderValue(true));
assertEquals(sign("shared-key", fromDefaults[0] + "." + fromDefaults[1]), fromDefaults[2]);
}
@Test
public void onlyFilerProxyUrlsAreFilerRequests() throws Exception {
Server filerGrpc = startFilerGrpc();
FilerClient filerClient = new FilerClient("127.0.0.1", 8888, filerGrpc.getPort(), "");
try {
String proxyUrl = "http://127.0.0.1:8888/?proxyChunkId=3,01637037d6";
assertFalse(filerClient.isProxyChunkUrl(proxyUrl));
filerClient.setAccessVolumeServerByFilerProxy();
assertEquals(proxyUrl, filerClient.getChunkUrl("3,01637037d6", "volume:8080", "volume:8080"));
assertTrue(filerClient.isProxyChunkUrl(proxyUrl));
assertFalse(filerClient.isProxyChunkUrl("http://volume:8080/3,01637037d6"));
assertFalse(filerClient.isProxyChunkUrl("http://volume:8080/?proxyChunkId=/3,01637037d6"));
assertFalse(filerClient.isProxyChunkUrl("http://127.0.0.1:8888.example/?proxyChunkId=3,01637037d6"));
assertFalse(filerClient.isProxyChunkUrl(null));
} finally {
filerClient.shutdown();
filerGrpc.shutdownNow().awaitTermination(5, TimeUnit.SECONDS);
}
}
@Test
public void proxyChunkReadDoesNotFollowRedirects() throws Exception {
AtomicInteger targetHits = new AtomicInteger();
HttpServer target = HttpServer.create(new InetSocketAddress("127.0.0.1", 0), 0);
target.createContext("/", exchange -> {
targetHits.incrementAndGet();
respond(exchange, 200, "leaked");
});
List<String> filerAuth = new CopyOnWriteArrayList<>();
HttpServer filer = HttpServer.create(new InetSocketAddress("127.0.0.1", 0), 0);
filer.createContext("/", exchange -> {
filerAuth.add(exchange.getRequestHeaders().getFirst("Authorization"));
if (filerAuth.size() == 1) {
exchange.getResponseHeaders().set("Location", "http://127.0.0.1:" + target.getAddress().getPort() + "/");
respond(exchange, 302, "");
} else {
respond(exchange, 200, "chunk");
}
});
Server filerGrpc = startFilerGrpc();
target.start();
filer.start();
FilerClient filerClient = new FilerClient("127.0.0.1", filer.getAddress().getPort(), filerGrpc.getPort(), "");
try {
filerClient.setAccessVolumeServerByFilerProxy();
filerClient.getFilerCredentials().setJwtReadSigningKey("read-key", 0);
FilerProto.Locations locations = FilerProto.Locations.newBuilder()
.addLocations(FilerProto.Location.newBuilder().setUrl("volume:8080")).build();
byte[] data = SeaweedRead.doFetchFullChunkData(filerClient,
new SeaweedRead.ChunkView("3,01637037d6", 0, 5, 0, true, null, false), locations);
assertEquals("chunk", new String(data, StandardCharsets.UTF_8));
assertEquals(0, targetHits.get());
assertEquals(2, filerAuth.size());
assertTrue(filerAuth.get(0).startsWith("BEARER "));
} finally {
filerClient.shutdown();
filerGrpc.shutdownNow().awaitTermination(5, TimeUnit.SECONDS);
filer.stop(0);
target.stop(0);
}
}
private static Server startFilerGrpc() throws IOException {
return ServerBuilder.forPort(0).addService(new SeaweedFilerGrpc.SeaweedFilerImplBase() {
@Override
public void getFilerConfiguration(FilerProto.GetFilerConfigurationRequest request,
StreamObserver<FilerProto.GetFilerConfigurationResponse> observer) {
observer.onNext(FilerProto.GetFilerConfigurationResponse.getDefaultInstance());
observer.onCompleted();
}
}).build().start();
}
private static void respond(HttpExchange exchange, int status, String body) throws IOException {
byte[] bytes = body.getBytes(StandardCharsets.UTF_8);
exchange.sendResponseHeaders(status, bytes.length == 0 ? -1 : bytes.length);
exchange.getResponseBody().write(bytes);
exchange.close();
}
private static String[] bearer(String header) {
assertTrue(header.startsWith("BEARER "));
return header.substring("BEARER ".length()).split("\\.");
}
private static String decode(String part) {
return new String(Base64.getUrlDecoder().decode(part), StandardCharsets.UTF_8);
}
private static long exp(String payload) {
Matcher m = Pattern.compile("^\\{\"exp\":(\\d+)\\}$").matcher(payload);
assertTrue(payload, m.matches());
return Long.parseLong(m.group(1));
}
private static String sign(String key, String signingInput) throws Exception {
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA256"));
return Base64.getUrlEncoder().withoutPadding()
.encodeToString(mac.doFinal(signingInput.getBytes(StandardCharsets.UTF_8)));
}
}
-69
View File
@@ -149,75 +149,6 @@ The test suite covers:
hadoop fs -put local.txt seaweedfs://localhost:8888/test/
```
### Secured filer
With `fs.seaweed.volume.server.access` set to `filerProxy`, chunk reads and writes go to the
filer's HTTP port, so they need the filer's HTTP credentials. The client signs a filer JWT
when it has the filer's `jwt.filer_signing` key (writes) or
`jwt.filer_signing.read` key (reads), and otherwise sends the `[filer.basic_auth]`
credentials. These credentials are sent only to the filer, never to volume servers. In `direct`
and `publicUrl` modes chunk requests go straight to volume servers, so the filer's HTTP
credentials are not used; writes carry the volume token from the volume assignment as before.
gRPC mTLS comes from the `[grpc]` section as before, but it does not cover these HTTP chunk requests:
to keep the credentials off plain HTTP, serve the filer HTTP port over HTTPS (`[https.filer]`
on the filer) and enable `[https.client]` here. The client checks the certificate chain but
not the host name, so set `https.client.ca` to a CA that issues certificates only for your
SeaweedFS servers.
`security.toml` (read from `./`, `~/.seaweedfs/` or `/etc/seaweedfs/`), using the filer's
own values:
```toml
[jwt.filer_signing]
key = "<filer write key>"
[jwt.filer_signing.read]
key = "<filer read key>"
# or, for a filer with Basic Auth
[filer.basic_auth]
user = "<user>"
password = "<password>"
[grpc]
ca = "/etc/seaweedfs/ca.crt"
[grpc.client]
cert = "/etc/seaweedfs/client.crt"
key = "/etc/seaweedfs/client.key"
[https.client]
enabled = true
ca = "/etc/seaweedfs/ca.crt"
cert = "/etc/seaweedfs/client.crt"
key = "/etc/seaweedfs/client.key"
```
The same values can be set in `core-site.xml`. Each option overrides only its own
`security.toml` value (for example, a password alone keeps the `security.toml` user), and
applies only to that filesystem. The secrets can also come from a Hadoop credential provider:
```xml
<property>
<name>fs.seaweed.volume.server.access</name>
<value>filerProxy</value>
</property>
<property>
<name>fs.seaweed.filer.jwt.signing.key</name>
<value>filer write key</value>
</property>
<property>
<name>fs.seaweed.filer.jwt.signing.read.key</name>
<value>filer read key</value>
</property>
<!-- token lifetimes, defaults 10 and 60 seconds:
fs.seaweed.filer.jwt.signing.expires.after.seconds
fs.seaweed.filer.jwt.signing.read.expires.after.seconds -->
<!-- or Basic Auth:
fs.seaweed.filer.basic.auth.user
fs.seaweed.filer.basic.auth.password -->
```
## Continuous Integration
For CI environments, tests can be run in two modes:
@@ -10,7 +10,6 @@ import org.apache.hadoop.util.Progressable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import seaweedfs.client.FilerProto;
import seaweedfs.client.FilerCredentials;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -31,12 +30,6 @@ public class SeaweedFileSystem extends FileSystem {
public static final String FS_SEAWEED_VOLUME_SERVER_ACCESS = "fs.seaweed.volume.server.access";
public static final int FS_SEAWEED_DEFAULT_BUFFER_SIZE = 4 * 1024 * 1024;
public static final String FS_SEAWEED_FILER_CN = "fs.seaweed.filer.cn";
public static final String FS_SEAWEED_FILER_BASIC_AUTH_USER = "fs.seaweed.filer.basic.auth.user";
public static final String FS_SEAWEED_FILER_BASIC_AUTH_PASSWORD = "fs.seaweed.filer.basic.auth.password";
public static final String FS_SEAWEED_FILER_JWT_SIGNING_KEY = "fs.seaweed.filer.jwt.signing.key";
public static final String FS_SEAWEED_FILER_JWT_SIGNING_EXPIRES = "fs.seaweed.filer.jwt.signing.expires.after.seconds";
public static final String FS_SEAWEED_FILER_JWT_SIGNING_READ_KEY = "fs.seaweed.filer.jwt.signing.read.key";
public static final String FS_SEAWEED_FILER_JWT_SIGNING_READ_EXPIRES = "fs.seaweed.filer.jwt.signing.read.expires.after.seconds";
private static final Logger LOG = LoggerFactory.getLogger(SeaweedFileSystem.class);
@@ -76,21 +69,6 @@ public class SeaweedFileSystem extends FileSystem {
seaweedFileSystemStore = new SeaweedFileSystemStore(host, port, grpcPort, cn, conf);
}
// Each option set here overrides only its own [filer.basic_auth] or [jwt.filer_signing] value of security.toml.
static void applyFilerCredentials(Configuration conf, FilerCredentials credentials) throws IOException {
credentials.setBasicAuth(conf.get(FS_SEAWEED_FILER_BASIC_AUTH_USER),
secret(conf, FS_SEAWEED_FILER_BASIC_AUTH_PASSWORD));
credentials.setJwtSigningKey(secret(conf, FS_SEAWEED_FILER_JWT_SIGNING_KEY),
conf.getLong(FS_SEAWEED_FILER_JWT_SIGNING_EXPIRES, 0));
credentials.setJwtReadSigningKey(secret(conf, FS_SEAWEED_FILER_JWT_SIGNING_READ_KEY),
conf.getLong(FS_SEAWEED_FILER_JWT_SIGNING_READ_EXPIRES, 0));
}
private static String secret(Configuration conf, String name) throws IOException {
char[] value = conf.getPassword(name);
return value == null ? null : new String(value);
}
@Override
public void close() throws IOException {
super.close();
@@ -27,15 +27,9 @@ public class SeaweedFileSystemStore {
private FilerClient filerClient;
private Configuration conf;
public SeaweedFileSystemStore(String host, int port, int grpcPort, String cn, Configuration conf) throws IOException {
public SeaweedFileSystemStore(String host, int port, int grpcPort, String cn, Configuration conf) {
filerClient = new FilerClient(host, port, grpcPort, cn);
this.conf = conf;
try {
SeaweedFileSystem.applyFilerCredentials(conf, filerClient.getFilerCredentials());
} catch (IOException | RuntimeException e) {
close();
throw e;
}
String volumeServerAccessMode = this.conf.get(FS_SEAWEED_VOLUME_SERVER_ACCESS, "direct");
if (volumeServerAccessMode.equals("publicUrl")) {
filerClient.setAccessVolumeServerByPublicUrl();
@@ -4,12 +4,6 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.junit.Before;
import org.junit.Test;
import seaweedfs.client.FilerCredentials;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import static org.junit.Assert.*;
@@ -93,57 +87,4 @@ public class SeaweedFileSystemConfigTest {
// Test default port constant
assertEquals(8888, SeaweedFileSystem.FS_SEAWEED_DEFAULT_PORT);
}
@Test
public void testFilerCredentialsFromConfiguration() throws Exception {
FilerCredentials credentials = new FilerCredentials();
conf.set(SeaweedFileSystem.FS_SEAWEED_FILER_BASIC_AUTH_USER, "alice");
conf.set(SeaweedFileSystem.FS_SEAWEED_FILER_BASIC_AUTH_PASSWORD, "s3cret");
SeaweedFileSystem.applyFilerCredentials(conf, credentials);
String basic = "Basic " + Base64.getEncoder().encodeToString("alice:s3cret".getBytes(StandardCharsets.UTF_8));
assertEquals(basic, credentials.getAuthorizationHeaderValue(true));
conf.set(SeaweedFileSystem.FS_SEAWEED_FILER_JWT_SIGNING_KEY, "write-key");
conf.setLong(SeaweedFileSystem.FS_SEAWEED_FILER_JWT_SIGNING_EXPIRES, 120);
SeaweedFileSystem.applyFilerCredentials(conf, credentials);
long now = System.currentTimeMillis() / 1000;
assertTrue(signedExp(credentials.getAuthorizationHeaderValue(true), "write-key") - now >= 119);
assertEquals(basic, credentials.getAuthorizationHeaderValue(false));
conf.set(SeaweedFileSystem.FS_SEAWEED_FILER_JWT_SIGNING_READ_KEY, "read-key");
conf.setLong(SeaweedFileSystem.FS_SEAWEED_FILER_JWT_SIGNING_READ_EXPIRES, 240);
SeaweedFileSystem.applyFilerCredentials(conf, credentials);
long readExp = signedExp(credentials.getAuthorizationHeaderValue(false), "read-key") - now;
assertTrue(readExp >= 239 && readExp <= 245);
long writeExp = signedExp(credentials.getAuthorizationHeaderValue(true), "write-key") - now;
assertTrue(writeExp >= 119 && writeExp <= 125);
}
@Test
public void testFilerCredentialOptionsOverrideOneValueEach() throws Exception {
FilerCredentials credentials = new FilerCredentials();
credentials.setBasicAuth("toml-user", "toml-pass");
credentials.setJwtReadSigningKey("toml-read-key", 0);
conf.set(SeaweedFileSystem.FS_SEAWEED_FILER_BASIC_AUTH_PASSWORD, "new-pass");
conf.setLong(SeaweedFileSystem.FS_SEAWEED_FILER_JWT_SIGNING_READ_EXPIRES, 300);
SeaweedFileSystem.applyFilerCredentials(conf, credentials);
assertEquals("Basic " + Base64.getEncoder().encodeToString("toml-user:new-pass".getBytes(StandardCharsets.UTF_8)),
credentials.getAuthorizationHeaderValue(true));
long exp = signedExp(credentials.getAuthorizationHeaderValue(false), "toml-read-key");
assertTrue(exp - System.currentTimeMillis() / 1000 >= 299);
}
// Asserts the header is a filer JWT signed with key and returns its exp claim.
private static long signedExp(String header, String key) throws Exception {
assertTrue(header, header.startsWith("BEARER "));
String[] parts = header.substring("BEARER ".length()).split("\\.");
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "HmacSHA256"));
assertEquals(Base64.getUrlEncoder().withoutPadding().encodeToString(
mac.doFinal((parts[0] + "." + parts[1]).getBytes(StandardCharsets.UTF_8))), parts[2]);
String payload = new String(Base64.getUrlDecoder().decode(parts[1]), StandardCharsets.UTF_8);
return Long.parseLong(payload.replaceAll("[^0-9]", ""));
}
}
-672
View File
@@ -5451,198 +5451,6 @@
}
],
"pluginVersion": "10.3.1"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"title": "EC Shard Copy Failures by reason",
"description": "Failed EC shard copies into each volume server per rate interval, by collection and reason (source_not_found, empty_index, no_space, timeout, io_error, other). The volume server log names the volume, shards and source of each failure.",
"type": "timeseries",
"id": 269,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 142
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 4,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"unit": "short",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"options": {
"legend": {
"calcs": [
"lastNotNull",
"max"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum by (instance, collection, reason) ((last_over_time(SeaweedFS_volumeServer_ec_shard_copy_failures_total{cluster=~\"$cluster\"}[$__rate_interval]) and (min_over_time(SeaweedFS_volumeServer_ec_shard_copy_failures_total{cluster=~\"$cluster\"}[$__rate_interval]) < last_over_time(SeaweedFS_volumeServer_ec_shard_copy_failures_total{cluster=~\"$cluster\"}[1d] offset $__rate_interval))) or (increase(SeaweedFS_volumeServer_ec_shard_copy_failures_total{cluster=~\"$cluster\"}[$__rate_interval]) and count_over_time(SeaweedFS_volumeServer_ec_shard_copy_failures_total{cluster=~\"$cluster\"}[1d] offset $__rate_interval)) or (last_over_time(SeaweedFS_volumeServer_ec_shard_copy_failures_total{cluster=~\"$cluster\"}[$__rate_interval]) unless count_over_time(SeaweedFS_volumeServer_ec_shard_copy_failures_total{cluster=~\"$cluster\"}[1d] offset $__rate_interval)))",
"range": true,
"refId": "A",
"legendFormat": "{{instance}} {{collection}} {{reason}}"
}
],
"pluginVersion": "10.3.1"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"title": "EC Shards Disagreeing With Disk",
"description": "Mounted EC shards whose file on disk is gone or replaced (ghost) or changed size since the mount (stale_size).",
"type": "timeseries",
"id": 270,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 150
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 4,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"unit": "short",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"options": {
"legend": {
"calcs": [
"lastNotNull",
"max"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum by (instance, reason) (SeaweedFS_volumeServer_ec_shard_disk_mismatch{cluster=~\"$cluster\"})",
"range": true,
"refId": "A",
"legendFormat": "{{instance}} {{reason}}"
}
],
"pluginVersion": "10.3.1"
}
]
},
@@ -7826,390 +7634,6 @@
}
],
"pluginVersion": "10.3.1"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"title": "Filer gRPC QPS by method",
"description": "gRPC calls to the filer (mounts, S3 gateways, peers, shell), by method.",
"type": "timeseries",
"id": 271,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 103
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 4,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"unit": "reqps",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"options": {
"legend": {
"calcs": [
"lastNotNull",
"max"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum by (method) (rate(SeaweedFS_filer_grpc_request_total{cluster=~\"$cluster\"}[$__rate_interval]))",
"range": true,
"refId": "A",
"legendFormat": "{{method}}"
}
],
"pluginVersion": "10.3.1"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"title": "Filer gRPC Errors by method and code",
"description": "gRPC calls to the filer that did not end OK. NotFound is mostly lookups of names that do not exist.",
"type": "timeseries",
"id": 272,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 103
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 4,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"unit": "reqps",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"options": {
"legend": {
"calcs": [
"lastNotNull",
"max"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum by (method, code) (rate(SeaweedFS_filer_grpc_request_total{code!=\"OK\", cluster=~\"$cluster\"}[$__rate_interval]))",
"range": true,
"refId": "A",
"legendFormat": "{{method}} {{code}}"
}
],
"pluginVersion": "10.3.1"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"title": "Filer gRPC Duration p99 by method",
"description": "Subscriptions, health watches and client streams are counted but not timed.",
"type": "timeseries",
"id": 273,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 111
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 4,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"unit": "s",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"options": {
"legend": {
"calcs": [
"lastNotNull",
"max"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "histogram_quantile(0.99, sum(rate(SeaweedFS_filer_grpc_request_seconds_bucket{cluster=~\"$cluster\"}[$__rate_interval])) by (le, method))",
"range": true,
"refId": "A",
"legendFormat": "{{method}}"
}
],
"pluginVersion": "10.3.1"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"title": "Filer gRPC Duration p50 by method",
"description": "Subscriptions, health watches and client streams are counted but not timed.",
"type": "timeseries",
"id": 274,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 111
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 4,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"unit": "s",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"options": {
"legend": {
"calcs": [
"lastNotNull",
"max"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "histogram_quantile(0.50, sum(rate(SeaweedFS_filer_grpc_request_seconds_bucket{cluster=~\"$cluster\"}[$__rate_interval])) by (le, method))",
"range": true,
"refId": "A",
"legendFormat": "{{method}}"
}
],
"pluginVersion": "10.3.1"
}
]
},
@@ -10836,102 +10260,6 @@
}
],
"pluginVersion": "10.3.1"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"title": "S3 Aborted Reads by Bucket",
"description": "Object reads that failed after the status line was sent: the request counter records them as successes, so they only show here.",
"type": "timeseries",
"id": 270,
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 66
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 4,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"unit": "reqps",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": []
},
"options": {
"legend": {
"calcs": [
"lastNotNull",
"max"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum by (bucket, cause) (rate(SeaweedFS_s3_read_aborted_total{cluster=~\"$cluster\", bucket=~\"$bucket\"}[$__rate_interval]))",
"range": true,
"refId": "A",
"legendFormat": "{{bucket}} {{cause}}"
}
],
"pluginVersion": "10.3.1"
}
]
},
-290
View File
@@ -1,290 +0,0 @@
//! The FIPS 140-3 mode a SeaweedFS process runs in.
//!
//! One setting states it for a whole deployment: `[fips] mode` in
//! security.toml, or `WEED_FIPS_MODE`, which wins over the file as viper's
//! `AutomaticEnv` does for the Go processes. Go processes take their mode from
//! `GODEBUG=fips140` and refuse to start when it differs from the setting; the
//! Rust binaries take it from the setting alone, and under [`FipsMode::On`]
//! and [`FipsMode::Strict`] restrict TLS to what Go's `crypto/tls` allows in
//! FIPS mode (see [`crate::tls`]). This restricts behaviour only: the
//! cryptography underneath is still the non-validated aws-lc-rs build.
//!
//! Each binary reads `fips.mode` with the parser it uses for the rest of
//! security.toml and hands the value to [`resolve`], so the mode and the JWT
//! keys are either both read from a file or both missed.
use std::ffi::OsString;
use std::fmt;
use std::path::{Path, PathBuf};
use std::sync::OnceLock;
/// The security.toml setting, as `section.key`.
pub const SETTING: &str = "fips.mode";
/// The environment variable that overrides [`SETTING`].
pub const ENV: &str = "WEED_FIPS_MODE";
/// The modes `fips.mode` names. Unset reads as [`FipsMode::Off`], which is
/// how every Rust binary behaved before the setting existed.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub enum FipsMode {
/// No FIPS restrictions; Go processes need `fips140=off`.
#[default]
Off,
/// FIPS-mode TLS; Go processes need `GODEBUG=fips140=on`.
On,
/// FIPS-mode TLS; Go processes need `GODEBUG=fips140=only`, which also
/// refuses non-approved algorithms outside TLS.
Strict,
}
impl FipsMode {
/// Parses a value of `fips.mode`: `off`, `on` or `strict`, or `None` for
/// an empty value, which leaves the setting unset.
pub fn parse(value: &str) -> Result<Option<Self>, FipsModeError> {
match value {
"" => Ok(None),
"off" => Ok(Some(Self::Off)),
"on" => Ok(Some(Self::On)),
"strict" => Ok(Some(Self::Strict)),
other => Err(FipsModeError::Unknown {
source: SETTING.to_string(),
value: other.to_string(),
}),
}
}
/// Whether TLS is restricted to the FIPS 140-3 lists.
pub fn is_fips(self) -> bool {
self != Self::Off
}
pub fn as_str(self) -> &'static str {
match self {
Self::Off => "off",
Self::On => "on",
Self::Strict => "strict",
}
}
}
impl fmt::Display for FipsMode {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(self.as_str())
}
}
/// Why the mode could not be resolved or recorded.
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum FipsModeError {
/// `source` holds a value that is not `off`, `on` or `strict`.
Unknown { source: String, value: String },
/// The process mode was already set to a different mode.
AlreadySet { set: FipsMode, wanted: FipsMode },
/// The security.toml at `path` exists but could not be read or parsed, so
/// whether it sets `fips.mode` is unknown.
File { path: PathBuf, reason: String },
}
impl fmt::Display for FipsModeError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::Unknown { source, value } => {
write!(f, "{source} is {value:?}; want off, on or strict")
}
Self::AlreadySet { set, wanted } => {
write!(f, "FIPS mode is already {set}, cannot switch to {wanted}")
}
Self::File { path, reason } => write!(
f,
"{}: {reason}; cannot tell whether it sets {SETTING}",
path.display()
),
}
}
}
impl std::error::Error for FipsModeError {}
/// A resolved `fips.mode`: the mode, and where it was set (`None` when
/// nothing set it and the mode is [`FipsMode::Off`]).
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Setting {
pub mode: FipsMode,
pub source: Option<String>,
}
impl fmt::Display for Setting {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match &self.source {
Some(source) => write!(f, "FIPS mode {} ({source})", self.mode),
None => write!(f, "FIPS mode {} ({SETTING} unset)", self.mode),
}
}
}
/// Resolves the mode of a process whose own security.toml loader read
/// `file_value` for `fips.mode` from `file` (`None` when there is no file or
/// it does not set the key): `WEED_FIPS_MODE` when set and non-empty, else
/// `file_value`, else [`FipsMode::Off`]. An unknown value is an error naming
/// where it came from.
pub fn resolve(
file: Option<&Path>,
file_value: Option<&str>,
env: &dyn Fn(&str) -> Option<OsString>,
) -> Result<Setting, FipsModeError> {
let from_env = env(ENV)
.map(|v| v.to_string_lossy().into_owned())
.filter(|v| !v.is_empty());
let from_file = || {
let source = match file {
Some(path) => format!("{}: {SETTING}", path.display()),
None => SETTING.to_string(),
};
file_value.map(|value| (source, value.to_string()))
};
let Some((source, value)) = from_env.map(|v| (ENV.to_string(), v)).or_else(from_file) else {
return Ok(Setting {
mode: FipsMode::Off,
source: None,
});
};
match FipsMode::parse(&value) {
Ok(Some(mode)) => Ok(Setting {
mode,
source: Some(source),
}),
Ok(None) => Ok(Setting {
mode: FipsMode::Off,
source: None,
}),
Err(_) => Err(FipsModeError::Unknown { source, value }),
}
}
static PROCESS_MODE: OnceLock<FipsMode> = OnceLock::new();
/// Records the mode this process runs in. A second call with the same mode is
/// a no-op; one with another mode is an error, since providers and
/// configurations built under the first would not change.
pub fn set_process_mode(mode: FipsMode) -> Result<(), FipsModeError> {
let set = *PROCESS_MODE.get_or_init(|| mode);
if set != mode {
return Err(FipsModeError::AlreadySet { set, wanted: mode });
}
Ok(())
}
/// The mode recorded by [`set_process_mode`], [`FipsMode::Off`] before.
pub fn process_mode() -> FipsMode {
PROCESS_MODE.get().copied().unwrap_or_default()
}
#[cfg(test)]
mod tests {
use super::*;
fn env_of(pairs: &'static [(&'static str, &'static str)]) -> impl Fn(&str) -> Option<OsString> {
move |key| {
pairs
.iter()
.find(|(k, _)| *k == key)
.map(|(_, v)| OsString::from(v))
}
}
const FILE_PATH: &str = "/etc/seaweedfs/security.toml";
#[test]
fn parse_knows_three_modes_and_empty() {
assert_eq!(FipsMode::parse(""), Ok(None));
assert_eq!(FipsMode::parse("off"), Ok(Some(FipsMode::Off)));
assert_eq!(FipsMode::parse("on"), Ok(Some(FipsMode::On)));
assert_eq!(FipsMode::parse("strict"), Ok(Some(FipsMode::Strict)));
assert!(FipsMode::parse("only").is_err());
assert!(FipsMode::parse("On").is_err());
}
#[test]
fn unset_everywhere_is_off() {
let off = Setting {
mode: FipsMode::Off,
source: None,
};
assert_eq!(resolve(None, None, &env_of(&[])), Ok(off.clone()));
assert_eq!(
resolve(Some(Path::new(FILE_PATH)), None, &env_of(&[])),
Ok(off.clone())
);
assert_eq!(
resolve(Some(Path::new(FILE_PATH)), Some(""), &env_of(&[])),
Ok(off.clone())
);
assert_eq!(off.to_string(), "FIPS mode off (fips.mode unset)");
}
#[test]
fn the_file_sets_the_mode() {
let setting = resolve(Some(Path::new(FILE_PATH)), Some("strict"), &env_of(&[])).unwrap();
assert_eq!(setting.mode, FipsMode::Strict);
assert_eq!(
setting.to_string(),
"FIPS mode strict (/etc/seaweedfs/security.toml: fips.mode)"
);
}
#[test]
fn the_environment_wins_over_the_file() {
let env = env_of(&[("WEED_FIPS_MODE", "on")]);
let setting = resolve(Some(Path::new(FILE_PATH)), Some("off"), &env).unwrap();
assert_eq!(setting.mode, FipsMode::On);
assert_eq!(setting.to_string(), "FIPS mode on (WEED_FIPS_MODE)");
assert_eq!(resolve(None, None, &env).unwrap().mode, FipsMode::On);
assert_eq!(
resolve(Some(Path::new(FILE_PATH)), Some("[\"strict\"]"), &env)
.unwrap()
.mode,
FipsMode::On
);
}
#[test]
fn an_empty_environment_variable_counts_as_unset() {
let env = env_of(&[("WEED_FIPS_MODE", "")]);
assert_eq!(
resolve(Some(Path::new(FILE_PATH)), Some("on"), &env)
.unwrap()
.mode,
FipsMode::On
);
}
#[test]
fn an_unknown_value_is_refused_naming_its_source() {
let err = resolve(None, None, &env_of(&[("WEED_FIPS_MODE", "yes")])).unwrap_err();
assert_eq!(
err.to_string(),
"WEED_FIPS_MODE is \"yes\"; want off, on or strict"
);
let err = resolve(
Some(Path::new(FILE_PATH)),
Some("[\"strict\"]"),
&env_of(&[]),
)
.unwrap_err();
assert_eq!(
err.to_string(),
"/etc/seaweedfs/security.toml: fips.mode is \"[\\\"strict\\\"]\"; want off, on or strict"
);
}
#[test]
fn the_process_mode_is_set_once() {
assert_eq!(set_process_mode(process_mode()), Ok(()));
let other = if process_mode() == FipsMode::On {
FipsMode::Off
} else {
FipsMode::On
};
assert!(set_process_mode(other).is_err());
}
}
-2
View File
@@ -8,9 +8,7 @@
//! rustls provider, which only works if every binary installs the same one.
//! The security.toml search path joined them for the same reason: an operator
//! mounts the file once and every binary has to look where `weed` looks.
//! The FIPS mode joined them because it decides that provider.
pub mod address;
pub mod fips;
pub mod security_config;
pub mod tls;
-3
View File
@@ -1,3 +0,0 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIKcJM4ur78AjGRa92XbPxkXK+Dx4z7eObSdEzyhV/iiI
-----END PRIVATE KEY-----
-4
View File
@@ -1,4 +0,0 @@
-----BEGIN PRIVATE KEY-----
MEcCAQAwBQYDK2VxBDsEOSsBSiCeTY1tto3PFVZFeK55DoEaqWlcSREnSTQ4nfkr
Lvw0O5dru34QfckKqoFuEoyMvMh1RIz95g==
-----END PRIVATE KEY-----
-57
View File
@@ -1,57 +0,0 @@
-----BEGIN PRIVATE KEY-----
MIIKPgIBADALBglghkgBZQMEAxEEggoqMIIKJgQgQQrP8unrSpS7t1GeYGJIpRto
SmG4mJa33bu2HdaeZFsEggoA/gIsLnCAYuY4UDW5CpPcovPbtEmtHbOEZPWYYbiY
sGpD93b/wCjXPD+7jcDHohVQJ75aO4Adsj5sq/5zMixfzIPslMUdkX310RVIpi43
D6bfBrAxkO0U1Nkn6iDOqw+UWc9YvRM5WkujREA8qng79JZ1gbDEHUw4JahfIs79
F4fjQkGAuCxauC0bBCQihk1YpEkLQYUkGDCIBmJMQAUAhUUBIS0LIUyJpGnURilb
iBAMRQLEuEEJBHGJJlEhSTHRSA0QESYhRQgjGIEkiCjMkEDJIFBTwnCcomBUBlBb
uBFMSGHJxmjZgpAhsyhglkxiBo7BRoDUJEARgojRAiVYEg4AxklcFmCBQGUZiQRR
ok2bgI1CpA2USIwjgYnYNIpcICXKMi3RomijokghCSaaokyTwlFaFnEiBCqilkwR
iSwLGQEUIFHBsm1kBGVYRmniRnICsRCTJirDoogKSBHcSHHiqBGRGCkDMlJCCDFD
tGQAR0rYMATkRnGYAikixkjMhGUSyHAKSWgMkkAZGBLbJGBkIAQDhjCgEkEDR4zA
Jg0CQDJSlBEkQCUUGCEjyU1iIClRMBETgSQbR2WRqEWcRoBDIiLjoo1SpCVIuA1j
CDAJRYwYEGwEmDBRODFLFnAjwowjAkzbtm3QFE0ZsmVEGGwDRQwKyTBTIgkSxoAc
g03SoGRBRm0RSIQihQ0cqSDYSCYMOAqYIgoiFHLghixcRiQhhHEKBwHKOAACKWkR
I4pCFI2JyCUSOCkZNwmBxCAcQ3IhJVKEpkUgJgySGHLcJkRRlmHRlk0TgDCauCDg
JGURtmgbFWpBOHKKmCUag03BgnAhsohgFAGQuGHDRlEkBTGRFAkhEI7ThoBbyJDC
IGSkJkwgs0VjpgWIsE0Ctk0CyQFSBk4SowlDoCRZEmYKGSqiRIACpJGDQgUYRGDI
CIyJBCUaKA7EIijcJACEqC0DEgABOE2TyCwTSGAJlyhbgADZkGkDpgVaMFASGGlR
RgIBJ4bQQmEjQAlkkFEAGW0JQYIDFm0DNpDIgIQYQ4WTwiwgBAKJMi0ZliCUMEWa
GIkaJ5IKwJFjCI0iiGDjEExBtpCcKGVcMm4CsXAIImWEwhDYOI4hgUgCQYoUBZCC
soTbtBALEEIcJpAQF1EZlnDEqCgbNyCLBIISMVCLQgwJkmDJGCGCRiIYMYrKkiCa
xGTbZXtrCGKSFu3craDAVG1GAKYgmimIF4ktgY7/C4ammULwJmqnjNfOSlCt598v
9ofuxnVZlDEtlTjgKQPPfXOp3lEzl9Die1QeZNqcg3IuTVRnUolGKTI62HNqKXfm
PrSQ9sPnOdGa4XyXYncraf1UuZ//hknLrM88D+kNoGqP65ni+OQ5MU0nsy52Y6ns
G88lSAFypwo+welJJAWxek5PsLbhnYyZfTpKvPC52ZfRCQBCG4n4RK0qtiaFBgly
JrBUVnzLvMtxZPr7rK47UipXcQAAnd6m1Ul8wE7/FCBQ6xWQQQUH8lmW8a6ZSuod
lW2Evbut2p8B9HadMBRP6+2oPrYfrpTSkDawNPiNIWZvk4F6klljAWmrDJB0v/ou
kIzuYiMWkZhbhJO6bVVpW8/h2HQarETnCERtqBjXRDiJgg0gzHQZiNACMV3LiEaS
muZIxqzzsOhn/i6RA9qnBqvl3mk/2GFXudiLFVk0cYMBLqn3tIt2k/+S0DsbKvSE
0dPSqzXx62oLgqxK8DJmrJ5YHTHSTsJfHO64VX3f1MnFLhV/6TPOteJmE/8CEmZK
gtrDpN9wYvmFe3vWUCAsYOzfnzDolq+SsqXAbZhkYNoomAwBK36pU0aE/e8SiCdP
I7EM17AyPW5f9mLs0S3g9zVX3NK9zgaW9EtQ8zLXm7sOeazzEp6xxobOvJCBwoav
tPzT+vab5u8nNDIcLIAj/mYAjkjS7cog135qOE56WiTOW7gCB75C6WkiAQTOqZ7J
+AFUgwN9j61cdTeJW/NbPgndlpjK+HiTYeENdnBQ898/JmUblhzcR/QpMEih3QO/
Q7+AfejRpVPpOLDDJwRfc19b6ymZ27nJVQ4GChI6oKX4Po4JNo54UO09bRsCf9Eq
sq9EvCBsS6H0xw6Y7EmNab0BpW6iFUmac9Bj4cWh9trZ/bZwExW4YvwX+bDIM/A8
mqmpsZSbkE/RoEiKSS7NHc3XgVsGJ2czkftcGbnUBZmIaPVu6XVJyyBwM7GogESv
yuQGFbuSlOhrwphtNfpm0T+/vU/elaIPJS0Os2sgmPgGqHE+o5BndkZ/hD8c5Ec0
Zs64BZugQoLKLTJtn+JqVWd6PotXBgEazdechsQQfCqOwRUO8VP9Q7A/sPQpgAk8
UyMvQliHdF2FFE9BHYMMw2B8a05+MUogYAS+V4RB1mMl35Lv1W3nOvIszSkFGact
T4uh7/mQwekpR0AXRcYdF72YDuC7WvMG7cBvZe5oi1c1/vu0R+NgUw1yMiZp3f/C
xqM/h1QzQTxSaro4oJm6/nJr3hSj6yx83cPbQzusLAb0CkkGlqw977rxWC56rPUt
d7cMOG9L7dMPIzuQ6PkQY6ttgDpH176d2vZphfFqjyUb05ryA+vJw/+xh73le837
TaNeTemy+p2UlYdW2LkTrgz0v/t2CsiT6LL9uGyz0rGrs/bGJg3XPMxsukHanThd
KKm8leIE02ogDiSfy2Ozf+rdJUGDArr4Jb5IYGE8bQUdfdBvvb1eKDhgKvYHM5XE
ExnFQSa8pftsXjS2F7MQr397tBL6WNC+KPnbgXmLhJbmGvnuS7XaHkErrRQwD75M
tP6b2fZiKWz9gx+0nkOxM1PX+cPVWrgbrrvpJUZewe1LW+Mctuei8sXTkHQ9stq7
23xqQTUe9soXWy277wlPr1eXY2gnKkH7hc7flu5gGSoaG29g4okvu6hrTUJ4tJgd
0YaLF0uNt2LvgBNOVxHBFX09GzGsvxfhY9+dRl0CDq3oHvaWCLs52WYx0u6s0Oyq
mCKG9lTdKL57pyPAPR1iCZzTDLbjhdxMQUFQ7zHHfQksu5ui3MHnaA+BAijZgmi2
0rs/QEh7Wv1AJS2XkNoFN7CxBQueBmXb2OtsqNHPv4lbE17UrHUbi9GHoMhfaGMB
9YzcPP/3Qentc3az4T4HsZUdePakJguI3qLBKGLdXtn2JHNoJ/poCxtVEEQ474us
YZQvYXbBmeJ+kwczfabNqRdGDnN4e1bfSxnSiVCJJDK5EQGNatqCso5S+5jyAd6z
FBbOe72dJxacVdU0esOrRK0cafJpeeCNgtUiRCZeWiFi3d+daLgqcqEiaV2Obk99
SiG57HJDpMrQgyzVuucms3bRWlb8H38DBFjclt4ONFx5dymNR/C2QCm+FCXvuFEv
UHB9qJcdZuhjkRNszOrvkokJdWWt9GxRWQ6eR+raum0q+Q==
-----END PRIVATE KEY-----
-5
View File
@@ -1,5 +0,0 @@
-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgKQGVRsbYNwfFeCQU
4c2Nkjnme5k8eDQ1loKC5/qKNeGhRANCAAQtjdBx4U07ZO68fAkYnGbhCoeVTC9o
BejPCRmx9mOOhD3dKK5j9hsgVBd0RagUsgVwkq5xLKrvMB8ZoQe2jKRF
-----END PRIVATE KEY-----
+6 -419
View File
@@ -5,285 +5,19 @@
//! backend and reqwest — so rustls cannot auto-select a provider and tonic's
//! client TLS panics on first use. Each binary has to pin one, and it has to be
//! the same one, which is why the choice lives here rather than in either tree.
//!
//! Under [`FipsMode::On`] and [`FipsMode::Strict`] the provider is aws-lc-rs
//! filtered to what Go's `crypto/tls` allows when `GODEBUG=fips140` is `on` or
//! `only` (`crypto/tls/defaults_fips140.go`, Go 1.27.4, the version go.mod
//! requires). TLS 1.2 and 1.3 are all rustls implements, which is Go's FIPS
//! version list.
use std::sync::{Arc, OnceLock};
use rustls::crypto::aws_lc_rs;
use rustls::crypto::{
CryptoProvider, KeyProvider, SupportedKxGroup, WebPkiSupportedAlgorithms, aws_lc_rs,
};
use rustls::pki_types::{PrivateKeyDer, SubjectPublicKeyInfoDer, alg_id};
use rustls::sign::{Signer, SigningKey};
use rustls::{CipherSuite, NamedGroup, SignatureAlgorithm, SignatureScheme};
use crate::fips::{self, FipsMode, FipsModeError};
/// Go's `allowedCipherSuitesTLS13FIPS` and the AES-GCM part of
/// `allowedCipherSuitesFIPS`. Go also allows
/// `TLS_ECDHE_{ECDSA,RSA}_WITH_AES_128_CBC_SHA256`, which rustls does not
/// implement.
pub const FIPS_CIPHER_SUITES: &[CipherSuite] = &[
CipherSuite::TLS13_AES_128_GCM_SHA256,
CipherSuite::TLS13_AES_256_GCM_SHA384,
CipherSuite::TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
CipherSuite::TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
CipherSuite::TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
CipherSuite::TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
];
/// Go's `allowedCurvePreferencesFIPS` as rustls 0.23 has them and Go enables
/// by default, in Go's preference order. rustls has no SecP384r1MLKEM1024 and
/// no P-521; it has MLKEM1024, which Go allows but enables only when
/// configured, so it is left out as Go leaves it out of its defaults.
fn fips_kx_groups() -> Vec<&'static dyn SupportedKxGroup> {
vec![
aws_lc_rs::kx_group::X25519MLKEM768,
aws_lc_rs::kx_group::SECP256R1MLKEM768,
aws_lc_rs::kx_group::SECP256R1,
aws_lc_rs::kx_group::SECP384R1,
]
}
/// Go's `allowedSignatureAlgorithmsFIPS`.
pub const FIPS_SIGNATURE_SCHEMES: &[SignatureScheme] = &[
SignatureScheme::RSA_PSS_SHA256,
SignatureScheme::ECDSA_NISTP256_SHA256,
SignatureScheme::ED25519,
SignatureScheme::ML_DSA_44,
SignatureScheme::ML_DSA_65,
SignatureScheme::ML_DSA_87,
SignatureScheme::RSA_PSS_SHA384,
SignatureScheme::RSA_PSS_SHA512,
SignatureScheme::RSA_PKCS1_SHA256,
SignatureScheme::RSA_PKCS1_SHA384,
SignatureScheme::RSA_PKCS1_SHA512,
SignatureScheme::ECDSA_NISTP384_SHA384,
SignatureScheme::ECDSA_NISTP521_SHA512,
];
/// The certificate key types Go's `isCertificateAllowedFIPS` accepts: RSA,
/// ECDSA on P-256, P-384 or P-521, Ed25519, and ML-DSA (Go allows ML-DSA for
/// its native module only). The RSA algorithms rustls verifies with take keys
/// of 2048 to 8192 bits, so Go's 2048-bit floor holds.
const FIPS_CERTIFICATE_KEYS: &[rustls::pki_types::AlgorithmIdentifier] = &[
alg_id::RSA_ENCRYPTION,
alg_id::ECDSA_P256,
alg_id::ECDSA_P384,
alg_id::ECDSA_P521,
alg_id::ED25519,
alg_id::ML_DSA_44,
alg_id::ML_DSA_65,
alg_id::ML_DSA_87,
];
/// The aws-lc-rs verification algorithms limited to Go's FIPS signature
/// schemes and certificate keys. With aws-lc-rs's current set that removes
/// nothing; the filter keeps an algorithm a later rustls adds out of FIPS
/// mode until Go allows it. Built once, since rustls needs `'static` slices.
fn fips_signature_verification_algorithms() -> WebPkiSupportedAlgorithms {
static ALGORITHMS: OnceLock<WebPkiSupportedAlgorithms> = OnceLock::new();
*ALGORITHMS.get_or_init(|| {
let default = aws_lc_rs::default_provider().signature_verification_algorithms;
let all = default
.all
.iter()
.filter(|alg| FIPS_CERTIFICATE_KEYS.contains(&alg.public_key_alg_id()))
.copied()
.collect::<Vec<_>>();
let mapping = default
.mapping
.iter()
.filter(|(scheme, _)| FIPS_SIGNATURE_SCHEMES.contains(scheme))
.copied()
.collect::<Vec<_>>();
WebPkiSupportedAlgorithms {
all: all.leak(),
mapping: mapping.leak(),
}
})
}
/// Loads private keys through aws-lc-rs and passes them through
/// [`restrict_to_fips`], so a FIPS-mode listener or client signs handshakes
/// only with Go's FIPS signature schemes.
#[derive(Debug)]
struct FipsKeyProvider;
static FIPS_KEY_PROVIDER: FipsKeyProvider = FipsKeyProvider;
impl KeyProvider for FipsKeyProvider {
fn load_private_key(
&self,
key_der: PrivateKeyDer<'static>,
) -> Result<Arc<dyn SigningKey>, rustls::Error> {
let key = aws_lc_rs::default_provider()
.key_provider
.load_private_key(key_der)?;
restrict_to_fips(key)
}
fn fips(&self) -> bool {
aws_lc_rs::default_provider().key_provider.fips()
}
}
/// Wraps `key` so it offers only [`FIPS_SIGNATURE_SCHEMES`], refusing a key
/// that can sign none of them, such as Ed448, with an error naming its type.
fn restrict_to_fips(key: Arc<dyn SigningKey>) -> Result<Arc<dyn SigningKey>, rustls::Error> {
if key.choose_scheme(FIPS_SIGNATURE_SCHEMES).is_none() {
return Err(rustls::Error::General(format!(
"{} private key is not allowed in FIPS mode, which accepts RSA, ECDSA P-256/P-384/P-521, Ed25519 and ML-DSA keys",
key_kind(key.algorithm())
)));
}
Ok(Arc::new(FipsSigningKey(key)))
}
/// How a refused key is named.
fn key_kind(algorithm: SignatureAlgorithm) -> String {
match algorithm {
SignatureAlgorithm::ED448 => "an Ed448".to_string(),
other => format!("a {other:?}"),
}
}
/// A signing key that offers only [`FIPS_SIGNATURE_SCHEMES`].
#[derive(Debug)]
struct FipsSigningKey(Arc<dyn SigningKey>);
impl SigningKey for FipsSigningKey {
fn choose_scheme(&self, offered: &[SignatureScheme]) -> Option<Box<dyn Signer>> {
let allowed = offered
.iter()
.copied()
.filter(|scheme| FIPS_SIGNATURE_SCHEMES.contains(scheme))
.collect::<Vec<_>>();
self.0.choose_scheme(&allowed)
}
fn public_key(&self) -> Option<SubjectPublicKeyInfoDer<'_>> {
self.0.public_key()
}
fn algorithm(&self) -> SignatureAlgorithm {
self.0.algorithm()
}
}
/// The aws-lc-rs provider with Go's FIPS-mode TLS lists applied. It still
/// runs on the non-validated aws-lc-rs build, so `CryptoProvider::fips()` is
/// false.
pub fn fips_provider() -> CryptoProvider {
let default = aws_lc_rs::default_provider();
CryptoProvider {
cipher_suites: default
.cipher_suites
.into_iter()
.filter(|suite| FIPS_CIPHER_SUITES.contains(&suite.suite()))
.collect(),
kx_groups: fips_kx_groups(),
signature_verification_algorithms: fips_signature_verification_algorithms(),
key_provider: &FIPS_KEY_PROVIDER,
..default
}
}
/// The provider for `mode`: aws-lc-rs's default under [`FipsMode::Off`],
/// [`fips_provider`] otherwise.
pub fn provider_for(mode: FipsMode) -> CryptoProvider {
if mode.is_fips() {
fips_provider()
} else {
aws_lc_rs::default_provider()
}
}
/// The provider for this process's mode ([`fips::process_mode`]).
pub fn crypto_provider() -> CryptoProvider {
provider_for(fips::process_mode())
}
/// Pin rustls's process-wide default provider to [`crypto_provider`]:
/// aws-lc-rs, filtered to the FIPS lists when the process mode asks for it.
/// Idempotent: the first call wins and every later one is a no-op, so callers
/// do not have to coordinate.
/// Pin rustls's process-wide default provider to aws-lc-rs, matching the
/// volume server's TLS config. Idempotent: the first call wins and every
/// later one is a no-op, so callers do not have to coordinate.
pub fn install_default_crypto_provider() {
let _ = crypto_provider().install_default();
}
/// Whether TLS 1.2 connections must use the Extended Master Secret, as Go
/// requires in FIPS mode. rustls requires it only of a validated provider,
/// so configurations SeaweedFS builds itself set `require_ems` from this.
pub fn require_ems() -> bool {
fips::process_mode().is_fips()
}
/// Why [`install_process_provider`] failed.
#[derive(Debug)]
pub enum InstallError {
Mode(FipsModeError),
/// A provider other than this mode's was installed first.
OtherProvider(FipsMode),
}
impl std::fmt::Display for InstallError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Mode(e) => e.fmt(f),
Self::OtherProvider(mode) => write!(
f,
"a rustls crypto provider other than the one for FIPS mode {mode} is already installed"
),
}
}
}
impl std::error::Error for InstallError {}
/// Records `mode` as this process's FIPS mode and installs its provider as the
/// rustls process default. Call it once at startup, before anything builds a
/// TLS configuration; it fails if a different provider got there first, so a
/// FIPS-mode process never runs on the unfiltered one.
pub fn install_process_provider(mode: FipsMode) -> Result<(), InstallError> {
fips::set_process_mode(mode).map_err(InstallError::Mode)?;
install_default_crypto_provider();
let installed = CryptoProvider::get_default().ok_or(InstallError::OtherProvider(mode))?;
if !same_lists(installed, &provider_for(mode)) {
return Err(InstallError::OtherProvider(mode));
}
Ok(())
}
/// Whether two providers offer the same suites, groups and signature schemes.
fn same_lists(a: &CryptoProvider, b: &CryptoProvider) -> bool {
let suites = |p: &CryptoProvider| {
p.cipher_suites
.iter()
.map(|s| s.suite())
.collect::<Vec<_>>()
};
let groups = |p: &CryptoProvider| {
p.kx_groups
.iter()
.map(|g| g.name())
.collect::<Vec<NamedGroup>>()
};
suites(a) == suites(b)
&& groups(a) == groups(b)
&& a.signature_verification_algorithms.supported_schemes()
== b.signature_verification_algorithms.supported_schemes()
&& a.signature_verification_algorithms.all.len()
== b.signature_verification_algorithms.all.len()
let _ = aws_lc_rs::default_provider().install_default();
}
#[cfg(test)]
mod tests {
use super::*;
use super::install_default_crypto_provider;
#[test]
fn installing_is_idempotent_and_leaves_a_default_behind() {
@@ -291,151 +25,4 @@ mod tests {
install_default_crypto_provider();
assert!(rustls::crypto::CryptoProvider::get_default().is_some());
}
#[test]
fn off_is_the_unfiltered_default() {
assert!(same_lists(
&provider_for(FipsMode::Off),
&aws_lc_rs::default_provider()
));
}
#[test]
fn fips_mode_drops_chacha20_and_plain_x25519() {
for mode in [FipsMode::On, FipsMode::Strict] {
let provider = provider_for(mode);
let suites = provider
.cipher_suites
.iter()
.map(|s| s.suite())
.collect::<Vec<_>>();
assert_eq!(
suites,
vec![
CipherSuite::TLS13_AES_256_GCM_SHA384,
CipherSuite::TLS13_AES_128_GCM_SHA256,
CipherSuite::TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
CipherSuite::TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
CipherSuite::TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
CipherSuite::TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
]
);
let groups = provider
.kx_groups
.iter()
.map(|g| g.name())
.collect::<Vec<_>>();
assert_eq!(
groups,
vec![
NamedGroup::X25519MLKEM768,
NamedGroup::secp256r1MLKEM768,
NamedGroup::secp256r1,
NamedGroup::secp384r1,
]
);
}
}
fn load(provider: &CryptoProvider, pem: &str) -> Result<Arc<dyn SigningKey>, rustls::Error> {
use rustls::pki_types::pem::PemObject;
provider
.key_provider
.load_private_key(PrivateKeyDer::from_pem_slice(pem.as_bytes()).unwrap())
}
const ML_DSA_44_KEY: &str = include_str!("testdata/mldsa44.pem");
const ED448_KEY: &str = include_str!("testdata/ed448.pem");
const P256_KEY: &str = include_str!("testdata/p256.pem");
const ED25519_KEY: &str = include_str!("testdata/ed25519.pem");
/// A key that signs only Ed448, which aws-lc-rs cannot load, to drive the
/// refusal.
#[derive(Debug)]
struct Ed448Only;
impl SigningKey for Ed448Only {
fn choose_scheme(&self, _offered: &[SignatureScheme]) -> Option<Box<dyn Signer>> {
None
}
fn algorithm(&self) -> SignatureAlgorithm {
SignatureAlgorithm::ED448
}
}
#[test]
fn fips_mode_refuses_keys_outside_go_s_list() {
let err = restrict_to_fips(Arc::new(Ed448Only)).unwrap_err();
assert!(err.to_string().contains("an Ed448 private key"), "{err}");
assert!(
err.to_string().contains("not allowed in FIPS mode"),
"{err}"
);
assert!(load(&provider_for(FipsMode::On), ED448_KEY).is_err());
}
#[test]
fn fips_mode_allows_ml_dsa_as_go_1_27_does() {
let fips = provider_for(FipsMode::On);
let ml_dsa = load(&fips, ML_DSA_44_KEY).unwrap();
assert!(
ml_dsa
.choose_scheme(&[SignatureScheme::ML_DSA_44])
.is_some()
);
}
#[test]
fn fips_mode_keys_sign_with_fips_schemes_only() {
let fips = provider_for(FipsMode::Strict);
let p256 = load(&fips, P256_KEY).unwrap();
let signer = p256
.choose_scheme(&[SignatureScheme::ECDSA_NISTP256_SHA256])
.unwrap();
assert_eq!(signer.scheme(), SignatureScheme::ECDSA_NISTP256_SHA256);
assert!(
p256.choose_scheme(&[SignatureScheme::ECDSA_SHA1_Legacy])
.is_none()
);
assert!(p256.public_key().is_some());
let ed25519 = load(&fips, ED25519_KEY).unwrap();
assert!(ed25519.choose_scheme(&[SignatureScheme::ED25519]).is_some());
}
#[test]
fn off_keeps_the_default_key_provider() {
let off = provider_for(FipsMode::Off);
let ml_dsa = load(&off, ML_DSA_44_KEY).unwrap();
assert!(
ml_dsa
.choose_scheme(&[SignatureScheme::ML_DSA_44])
.is_some()
);
}
#[test]
fn fips_mode_verifies_go_s_signature_schemes_only() {
let provider = fips_provider();
let mut schemes = provider
.signature_verification_algorithms
.supported_schemes();
let mut want = FIPS_SIGNATURE_SCHEMES.to_vec();
schemes.sort_by_key(|s| u16::from(*s));
want.sort_by_key(|s| u16::from(*s));
assert_eq!(schemes, want);
assert!(
provider
.signature_verification_algorithms
.all
.iter()
.all(|alg| FIPS_CERTIFICATE_KEYS.contains(&alg.public_key_alg_id()))
);
let default = aws_lc_rs::default_provider();
assert_eq!(
default.signature_verification_algorithms.all.len(),
provider.signature_verification_algorithms.all.len(),
"Go 1.27 allows every key type aws-lc-rs verifies"
);
}
}
-2
View File
@@ -6338,8 +6338,6 @@ dependencies = [
"protoc-bin-vendored",
"reqwest 0.12.28",
"rustls",
"rustls-native-certs",
"seaweed-common",
"thiserror 2.0.21",
"tokio",
"tonic",
+3 -46
View File
@@ -15,12 +15,12 @@ Point an AWS S3 Vectors client at the S3 endpoint, normally `http://localhost:83
| `--masters` | Required | Comma-separated master addresses |
| `--listen` | `127.0.0.1:8090` | gRPC listener and registered address |
| `--filer-group` | Empty | Filer group used for table storage |
| `--read-cache-mb` | `512` | Immutable data/index read cache; zero disables it |
| `--nprobes` | Automatic | ANN partitions searched per query |
| `--metrics-port` | `0` | HTTP metrics and health listener; zero disables it |
| `--metrics-ip` | `127.0.0.1` | HTTP listener address |
| `--security-toml` | Discovered | Cluster certificates, signing keys and encryption keys |
The engine caches a quarter of the memory it may use (its cgroup limit, else the machine's), split 2:4:1 between file reads, loaded indexes and table metadata, and logs the sizes at startup. Each query probes a tenth of the index's partitions, at least 8, and more under a filter.
The HTTP listener provides `/health`, `/ready`, and `/metrics`. Readiness requires an active registration with the master. The gRPC listener also implements the standard health service for `vector_pb.VectorService` and the whole server. These health statuses follow master registration.
Metrics use the `SeaweedFS_vector_` prefix:
@@ -35,49 +35,6 @@ The S3 gateway separately publishes `SeaweedFS_s3_` request metrics with `type="
For mutual TLS, configure `[grpc.vector]` for the engine's server certificate, `[grpc.client]` for its master/filer connections, and the cluster CA. HTTPS volume reads also use `[https.client]`. The engine follows the same signing and encryption configuration as the other cluster clients.
Run the Lance maintenance worker against the cluster's admin to build and update ANN indexes. Queries can scan data that has not been indexed yet. See the [maintenance worker documentation](../seaweed-worker/README.md) and [Helm chart](../k8s/charts/seaweedfs/README.md) for deployment settings.
Run the Lance maintenance worker against the same masters and Lance namespace to build and update ANN indexes. Queries can scan data that has not been indexed yet. See the [maintenance worker documentation](../seaweed-worker/README.md) and [Helm chart](../k8s/charts/seaweedfs/README.md) for deployment settings.
The integration suite at `test/s3vectors` runs the same API and observability checks against both Go and Rust volume servers, including mutual TLS, signed volume reads, and encrypted volume data.
## Search indexed data only
The default search includes recent writes by scanning data that indexes do not
cover yet. To exclude that data, send `x-seaweedfs-vector-search-mode: indexed-only`
on `QueryVectors`. Omit the header, or set it to `all`, for the default behavior.
This is a SeaweedFS extension. With SigV4, the header must be signed.
For example, inject it before boto3 signs the request:
```python
def indexed_only(request, **kwargs):
request.headers["x-seaweedfs-vector-search-mode"] = "indexed-only"
client.meta.events.register("before-sign.s3vectors.QueryVectors", indexed_only)
try:
result = client.query_vectors(
vectorBucketName="embeddings", indexName="articles",
queryVector={"float32": embedding}, topK=10,
)
finally:
client.meta.events.unregister("before-sign.s3vectors.QueryVectors", indexed_only)
```
Indexed-only searches use the intersection of vector index coverage and the
coverage of each metadata index the filter requires, at one table version. Filters
must be conjunctions of string equality or `$in` predicates on ready indexed
metadata keys. An unavailable index or unsupported filter returns
`ValidationException`. A valid index with no eligible data returns an empty list.
A vector engine predating this extension returns `ServiceUnavailableException`;
the gateway never falls back to a full search.
The response includes `x-seaweedfs-vector-search-mode: indexed-only`,
`x-seaweedfs-vector-data-excluded: true|false`, and
`x-seaweedfs-vector-excluded-fragments`. The exclusion count describes coverage,
not the number of matching vectors. New writes, updates, and rewritten fragments
from compaction can be omitted until indexing catches up. Current deletions still
apply. Exact-search fallbacks stay within the eligible data; this option does not
guarantee a fixed latency.
Enterprise gateways send this mode to the shared single-engine backend using
`QueryIndexedVectors`; ordinary searches retain distributed routing. The shared
`Query` structure and existing query request/response messages are unchanged.
@@ -149,52 +149,6 @@ mod tests {
assert!(hits[0].distance < 1e-6);
}
#[tokio::test]
async fn indexed_only_skips_new_rows_until_indexed_and_honors_deletes() {
let dir = TempDir::new().unwrap();
let mut dataset = indexed_dataset(&dir, &["a"; 64]).await;
append_dataset(&mut dataset, &[vec![9.0; DIM]], &["b"]).await;
let table = VectorTable::resolve(&dataset, None, None).unwrap();
let query = Query {
vector: vec![9.0; DIM],
k: 100,
filter: None,
postfilter: false,
distance: DistanceType::L2,
nprobes: Some(4),
index_segments: None,
fragments: None,
exact_match_limit: None,
};
let (hits, excluded) = crate::query::indexed_only(&dataset, &table, &query)
.await
.unwrap();
assert_eq!(excluded, 1);
assert_eq!(hits.len(), 64);
assert!(hits.iter().all(|h| h.key != "k64"));
dataset
.optimize_indices(&lance_index::optimize::OptimizeOptions::append())
.await
.unwrap();
let (hits, excluded) = crate::query::indexed_only(&dataset, &table, &query)
.await
.unwrap();
assert_eq!(excluded, 0);
assert_eq!(hits[0].key, "k64");
dataset.delete("key = 'k64'").await.unwrap();
let (hits, _) = crate::query::indexed_only(&dataset, &table, &query)
.await
.unwrap();
assert!(hits.iter().all(|h| h.key != "k64"));
let missing = write_dataset(&TempDir::new().unwrap(), &vectors(4, DIM), &["a"; 4]).await;
assert!(
crate::query::indexed_only(&missing, &table, &query)
.await
.unwrap_err()
.is::<crate::query::IndexedOnlyError>()
);
}
#[tokio::test]
async fn prefiltered_ann_matches_filtered_flat() {
let dir = TempDir::new().unwrap();
@@ -84,20 +84,6 @@ pub(crate) fn rewrite(filter: Expr, ready: &HashMap<String, String>) -> (Expr, V
(rewritten.unwrap_or(lit(true)), indexed)
}
pub(crate) fn columns(dataset: &Dataset, filter: &str) -> Result<Vec<String>> {
let mut scanner = dataset.scan();
scanner.filter(filter)?;
let expr = scanner.get_expr_filter()?.ok_or_else(|| {
crate::query::IndexedOnlyError("indexed-only requires an indexed metadata filter".into())
})?;
let count = split_conjunction_owned(expr.clone()).len();
let (_, indexed) = rewrite(expr, &ready_columns(dataset));
if indexed.len() != count {
return Err(crate::query::IndexedOnlyError("indexed-only supports conjunctions of string $eq/$in filters on ready metadata indexes".into()).into());
}
Ok(indexed.into_iter().map(|i| i.column).collect())
}
fn and(left: Option<Expr>, right: Expr) -> Expr {
match left {
Some(left) => Expr::BinaryExpr(BinaryExpr::new(
@@ -638,7 +624,7 @@ mod tests {
let few = |q: Query| {
let (dataset, table) = (&dataset, &table);
async move {
query::few_indexed_matches(dataset, table, &q, None)
query::few_indexed_matches(dataset, table, &q)
.await
.unwrap()
}
@@ -671,99 +657,6 @@ mod tests {
}
}
#[tokio::test]
async fn indexed_only_intersects_metadata_and_vector_coverage() {
use futures::TryStreamExt;
let dir = TempDir::new().unwrap();
let mut dataset = dataset(&dir, 300).await;
let batches = dataset
.scan()
.try_into_stream()
.await
.unwrap()
.try_collect::<Vec<_>>()
.await
.unwrap();
let batch = &batches[0];
let mut columns = batch.columns().to_vec();
let key = batch.schema().index_of("key").unwrap();
columns[key] = Arc::new(StringArray::from(
(0..batch.num_rows())
.map(|i| format!("new{i}"))
.collect::<Vec<_>>(),
));
let batch = RecordBatch::try_new(batch.schema(), columns).unwrap();
let reader = RecordBatchIterator::new(vec![Ok(batch.clone())], batch.schema());
dataset.append(reader, None).await.unwrap();
dataset
.optimize_indices(&lance_index::optimize::OptimizeOptions::append())
.await
.unwrap();
let table = VectorTable::resolve(&dataset, None, None).unwrap();
let query = Query {
vector: vec![1.0, 2.0, 3.0, 4.0],
k: 1000,
filter: Some(eq("author", "\"rare\"")),
postfilter: false,
distance: DistanceType::L2,
nprobes: Some(4),
index_segments: None,
fragments: None,
exact_match_limit: None,
};
let reader = RecordBatchIterator::new(vec![Ok(batch.clone())], batch.schema());
dataset.append(reader, None).await.unwrap();
crate::index::build(&mut dataset, "vector", crate::index::INDEX_NAME, 4, true)
.await
.unwrap();
let tail = Query {
fragments: Some(vec![dataset.fragments().last().unwrap().id]),
..query.clone()
};
let (hits, excluded) = query::indexed_only(&dataset, &table, &tail).await.unwrap();
assert!(hits.is_empty());
assert_eq!(excluded, 1);
for limit in [None, Some(0)] {
let query = Query {
exact_match_limit: limit,
..query.clone()
};
let all = query::ann(&dataset, &table, &query).await.unwrap();
let (indexed, excluded) = query::indexed_only(&dataset, &table, &query).await.unwrap();
assert_eq!(excluded, 1);
assert!(all.len() > indexed.len());
assert!(indexed.len() >= 30);
}
for file in &dataset.fragments().last().unwrap().files {
std::fs::remove_file(dir.path().join("data").join(&file.path)).unwrap();
}
let dataset = Dataset::open(dir.path().to_str().unwrap()).await.unwrap();
assert!(query::ann(&dataset, &table, &query).await.is_err());
for limit in [None, Some(0)] {
let query = Query {
exact_match_limit: limit,
..query.clone()
};
assert!(query::indexed_only(&dataset, &table, &query).await.is_ok());
}
for filter in [
eq("other", "\"rare\""),
eq("author", "true"),
format!("NOT {}", eq("author", "\"rare\"")),
] {
let query = Query {
filter: Some(filter),
..query.clone()
};
assert!(
query::indexed_only(&dataset, &table, &query)
.await
.unwrap_err()
.is::<query::IndexedOnlyError>()
);
}
}
#[tokio::test]
async fn the_plan_reads_the_scalar_index() {
let dir = TempDir::new().unwrap();
+56 -75
View File
@@ -2,27 +2,35 @@ use anyhow::{Context, Result, bail};
use clap::{Parser, Subcommand};
use weed_lance_worker::catalog::{NamespaceClient, SigningKey, TableDescription, parse_id};
use weed_lance_worker::cluster::Cluster;
use weed_lance_worker::dataset::{self, Storage};
use weed_vector_core::coverage;
use weed_vector_core::index;
use weed_vector_core::query::{self, Query};
use weed_vector_core::table::VectorTable;
/// Finds everything through the masters: the S3 gateway whose Lance Namespace
/// says where a table is, and the filers that hold it.
/// Mirrors `weed-worker`'s flags where the two touch the same thing: the
/// namespace that says where a table is, and the masters whose filers hold
/// it.
#[derive(Parser, Debug)]
#[command(
name = "weed-vector",
about = "Describe, query and index S3 Vectors tables"
)]
struct Args {
/// Comma-separated master addresses. A table named by a local path needs
/// none.
/// Lance namespace the tables live in.
#[arg(
long,
default_value = "http://localhost:9101",
env = "WEED_LANCE_NAMESPACE"
)]
namespace: String,
/// Comma-separated master addresses, whose filers the tables are kept
/// through. A table named by a local URI needs none.
#[arg(long, alias = "master", env = "WEED_MASTERS")]
masters: Option<String>,
/// The filer group whose gateways and filers hold the tables.
/// The filer group whose filers hold the tables.
#[arg(
long,
alias = "filer.group",
@@ -37,7 +45,7 @@ struct Args {
filer_signing_key: Option<String>,
/// The cluster's security.toml; by default the file weed processes find
/// in ., ~/.seaweedfs and /etc/seaweedfs.
/// in -config_dir, ., ~/.seaweedfs and /etc/seaweedfs.
#[arg(long, env = "WEED_VECTOR_SECURITY_TOML")]
security_toml: Option<std::path::PathBuf>,
@@ -138,48 +146,39 @@ enum IndexAction {
},
}
/// Where tables are found: through the cluster the masters name, or, for a
/// local path, nowhere in particular.
struct Tables {
cluster: Option<Cluster>,
storage: Storage,
signing_key: Option<SigningKey>,
}
impl Tables {
/// `id` is a delimiter-joined table id, looked up in the namespace of a
/// gateway the masters name; when it looks like a URI the dataset is
/// opened directly: an `s3://` URI on the cluster's storage, a local path
/// (`/path/...`, `file://...`) as it is.
async fn open(&self, id: &str) -> Result<lance::Dataset> {
let on_cluster = id.starts_with("s3://");
if !on_cluster && (id.contains("://") || id.starts_with('/')) {
return lance::dataset::builder::DatasetBuilder::from_uri(id)
.load()
.await
.with_context(|| format!("open {id}"));
}
let Some(cluster) = &self.cluster else {
bail!("{id} is kept on the cluster and needs --masters");
};
if on_cluster {
let description = TableDescription {
location: id.to_string(),
storage_options: Default::default(),
managed_versioning: false,
};
return dataset::open_at(&description, self.storage.wrapper(id).await?, None).await;
}
let client = NamespaceClient::new(cluster.lance_namespace().await?)
.with_signing_key(self.signing_key.as_ref());
Ok(dataset::open(&client, &parse_id(id), &self.storage)
.await?
.dataset)
/// `id` is a delimiter-joined table id; when it looks like a URI the dataset
/// is opened directly, skipping the namespace: an `s3://` URI on the
/// cluster's storage, a local path (`/path/...`, `file://...`) as it is.
async fn open_dataset(
client: &NamespaceClient,
id: &str,
storage: &Storage,
) -> Result<lance::Dataset> {
let on_cluster = id.starts_with("s3://");
if !on_cluster && (id.contains("://") || id.starts_with('/')) {
return lance::dataset::builder::DatasetBuilder::from_uri(id)
.load()
.await
.with_context(|| format!("open {id}"));
}
if storage.0.is_none() {
bail!("{id} is kept on the cluster and needs --masters");
}
if on_cluster {
let description = TableDescription {
location: id.to_string(),
storage_options: Default::default(),
managed_versioning: false,
};
return dataset::open_at(&description, storage.wrapper(id).await?, None).await;
}
let table = dataset::open(client, &parse_id(id), storage).await?;
Ok(table.dataset)
}
#[tokio::main]
async fn main() -> Result<()> {
weed_lance_worker::tls::install_default_crypto_provider();
tracing_subscriber::fmt()
.with_writer(std::io::stderr)
.with_env_filter(
@@ -189,27 +188,20 @@ async fn main() -> Result<()> {
.init();
let args = Args::parse();
let security = weed_lance_worker::security::Security::load(args.security_toml.as_deref())?;
weed_lance_worker::tls::install_for_fips_mode(&security)?;
let security =
weed_lance_worker::security::Security::load(args.security_toml.as_deref(), None)?;
let signing_key = SigningKey::new(
args.filer_signing_key
.or_else(|| security.get("jwt.filer_signing.key")),
);
let tables = match &args.masters {
let client = NamespaceClient::new(args.namespace).with_signing_key(signing_key.as_ref());
let storage = match &args.masters {
Some(masters) => {
let cluster = Cluster::new(masters, &args.filer_group, &security)?;
let storage = Storage(Some(cluster.storage(&security).await?));
Tables {
cluster: Some(cluster),
storage,
signing_key,
}
let cluster =
weed_lance_worker::cluster::Cluster::new(masters, &args.filer_group, &security)?;
Storage(Some(cluster.storage(&security).await?))
}
None => Tables {
cluster: None,
storage: Storage::default(),
signing_key,
},
None => Storage::default(),
};
match args.command {
@@ -218,7 +210,7 @@ async fn main() -> Result<()> {
vector_column,
key_column,
} => {
let dataset = tables.open(&id).await?;
let dataset = open_dataset(&client, &id, &storage).await?;
let schema: arrow_schema::Schema = dataset.schema().into();
let resolved =
VectorTable::resolve(&dataset, vector_column.as_deref(), key_column.as_deref());
@@ -258,7 +250,7 @@ async fn main() -> Result<()> {
vector_column,
key_column,
} => {
let dataset = tables.open(&id).await?;
let dataset = open_dataset(&client, &id, &storage).await?;
let vector =
VectorTable::resolve(&dataset, vector_column.as_deref(), key_column.as_deref())?;
let coverages = coverage::coverage(&dataset, &vector.vector_column).await?;
@@ -270,7 +262,7 @@ async fn main() -> Result<()> {
vector_column,
key_column,
} => {
let dataset = tables.open(&id).await?;
let dataset = open_dataset(&client, &id, &storage).await?;
let vector =
VectorTable::resolve(&dataset, vector_column.as_deref(), key_column.as_deref())?;
for batch in query::get(&dataset, &vector, &keys, None).await? {
@@ -290,7 +282,7 @@ async fn main() -> Result<()> {
key_column,
nprobes,
} => {
let opened = tables.open(&id).await?;
let opened = open_dataset(&client, &id, &storage).await?;
let dataset = match version {
Some(v) => opened.checkout_version(v).await?,
None => opened,
@@ -335,7 +327,7 @@ async fn main() -> Result<()> {
id, vector_column, ..
} => (id.clone(), vector_column.clone()),
};
let mut dataset = tables.open(&id).await?;
let mut dataset = open_dataset(&client, &id, &storage).await?;
let table = VectorTable::resolve(&dataset, vector_column.as_deref(), None)?;
let started = std::time::Instant::now();
match action {
@@ -412,17 +404,6 @@ mod tests {
.unwrap();
assert_eq!(args.masters.as_deref(), Some("m:9333"));
assert_eq!(args.filer_group, "eu");
assert!(
Args::try_parse_from([
"weed-vector",
"--namespace",
"http://s3:9101",
"describe",
"t"
])
.is_err(),
"the namespace comes from the masters"
);
assert!(
Args::try_parse_from(["weed-vector", "--encryptVolumeData", "describe", "t"]).is_err(),
"volume encryption follows the filer"
+35 -234
View File
@@ -6,11 +6,8 @@ use arrow_array::{Array, Float32Array, RecordBatch, StringArray, UInt64Array};
use futures::TryStreamExt;
use lance::Dataset;
use lance::dataset::scanner::Scanner;
use lance::index::DatasetIndexExt;
use lance_linalg::distance::DistanceType;
use lance_table::format::Fragment;
use roaring::RoaringBitmap;
use std::collections::HashSet;
use crate::table::VectorTable;
@@ -63,7 +60,7 @@ pub struct Hit {
/// Exact top-K over every fragment, ignoring any index.
pub async fn flat(dataset: &Dataset, table: &VectorTable, query: &Query) -> Result<Vec<Hit>> {
run(scanner(dataset, table, query, false, None).await?.0, table).await
run(scanner(dataset, table, query, false).await?.0, table).await
}
/// Top-K with the ANN index where it covers the fragment and a flat pass over
@@ -78,152 +75,35 @@ pub async fn flat(dataset: &Dataset, table: &VectorTable, query: &Query) -> Resu
/// they are scored exactly to begin with. The decision is per scope, so
/// exact answers of several scopes merge into the exact answer.
pub async fn ann(dataset: &Dataset, table: &VectorTable, query: &Query) -> Result<Vec<Hit>> {
ann_with_scope(dataset, table, query, None).await
}
#[derive(Debug)]
pub struct IndexedOnlyError(pub String);
impl std::fmt::Display for IndexedOnlyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(&self.0)
if few_indexed_matches(dataset, table, query).await? {
return exact_in_scope(dataset, table, query).await;
}
}
impl std::error::Error for IndexedOnlyError {}
pub async fn indexed_only(
dataset: &Dataset,
table: &VectorTable,
query: &Query,
) -> Result<(Vec<Hit>, usize)> {
if query.postfilter {
return Err(IndexedOnlyError("indexed-only requires prefiltering".into()).into());
}
let mut eligible = indexed_fragments(
dataset,
&table.vector_column,
query.index_segments.as_deref(),
)
.await?;
if let Some(filter) = &query.filter {
for column in crate::indexed_filter::columns(dataset, filter)? {
eligible &= indexed_fragments(dataset, &column, None).await?;
}
}
let original = scope(dataset, table, query, None).await?;
let live: RoaringBitmap = dataset.fragments().iter().map(|f| f.id as u32).collect();
let original = original
.map(|ids| {
ids.into_iter()
.map(|id| id as u32)
.collect::<RoaringBitmap>()
})
.unwrap_or(live.clone())
& live;
eligible &= &original;
let excluded = (&original - &eligible).len() as usize;
if eligible.is_empty() {
return Ok((Vec::new(), excluded));
}
if excluded == 0
&& query.filter.is_none()
&& query.index_segments.is_none()
&& query.fragments.is_none()
{
let hits = ann(dataset, table, query).await?;
return if hits.len() < query.k {
Ok((exact_in_scope(dataset, table, query, None).await?, 0))
} else {
Ok((hits, 0))
};
}
let eligible: Vec<u64> = eligible.iter().map(u64::from).collect();
let hits = ann_with_scope(dataset, table, query, Some(&eligible)).await?;
Ok((hits, excluded))
}
async fn indexed_fragments(
dataset: &Dataset,
column: &str,
selected: Option<&[uuid::Uuid]>,
) -> Result<RoaringBitmap> {
if selected.is_some_and(|ids| ids.is_empty()) {
return Ok(RoaringBitmap::new());
}
let field = dataset
.schema()
.field(column)
.with_context(|| format!("no such field {column}"))?;
let mut covered = RoaringBitmap::new();
let mut found = Vec::new();
for index in dataset
.load_indices()
.await?
.iter()
.filter(|i| i.fields == [field.id])
{
if selected.is_some_and(|ids| !ids.contains(&index.uuid)) {
continue;
}
let bitmap = index
.fragment_bitmap
.as_ref()
.ok_or_else(|| IndexedOnlyError(format!("index coverage is unknown for {column}")))?;
covered |= bitmap;
found.push(index.uuid);
}
if found.is_empty() || selected.is_some_and(|ids| ids.iter().any(|id| !found.contains(id))) {
return Err(IndexedOnlyError(format!("no usable index for {column}")).into());
}
Ok(covered)
}
/// ANN and exact fallbacks restricted to the supplied fragments.
pub async fn ann_with_scope(
dataset: &Dataset,
table: &VectorTable,
query: &Query,
restriction: Option<&[u64]>,
) -> Result<Vec<Hit>> {
if few_indexed_matches(dataset, table, query, restriction).await? {
return exact_in_scope(dataset, table, query, restriction).await;
}
let (scanner, indexed) = scanner(dataset, table, query, true, restriction).await?;
let (scanner, indexed) = scanner(dataset, table, query, true).await?;
let hits = run(scanner, table).await?;
let short_prefilter = (query.filter.is_some() || restriction.is_some())
if indexed
&& query.filter.is_some()
&& !query.postfilter
&& hits.len() < query.k;
if indexed && (short_prefilter || hits.iter().any(|h| !h.distance.is_finite())) {
return exact_in_scope(dataset, table, query, restriction).await;
&& (hits.len() < query.k || hits.iter().any(|h| !h.distance.is_finite()))
{
return exact_in_scope(dataset, table, query).await;
}
Ok(hits)
}
/// [`flat`] over what [`ann`] searches for `query`: the listed fragments plus
/// the live coverage of the listed index segments, or the whole table.
async fn exact_in_scope(
dataset: &Dataset,
table: &VectorTable,
query: &Query,
restriction: Option<&[u64]>,
) -> Result<Vec<Hit>> {
async fn exact_in_scope(dataset: &Dataset, table: &VectorTable, query: &Query) -> Result<Vec<Hit>> {
let exact = Query {
index_segments: None,
fragments: scope(dataset, table, query, restriction).await?,
fragments: scope(dataset, table, query).await?,
..query.clone()
};
run(scanner(dataset, table, &exact, false, None).await?.0, table).await
run(scanner(dataset, table, &exact, false).await?.0, table).await
}
/// The fragments [`ann`] searches for `query`, or None for the whole table.
async fn scope(
dataset: &Dataset,
table: &VectorTable,
query: &Query,
restriction: Option<&[u64]>,
) -> Result<Option<Vec<u64>>> {
let scope = match &query.index_segments {
async fn scope(dataset: &Dataset, table: &VectorTable, query: &Query) -> Result<Option<Vec<u64>>> {
Ok(match &query.index_segments {
Some(segments) if !segments.is_empty() => {
let mut ids = query.fragments.clone().unwrap_or_default();
ids.extend(
@@ -231,25 +111,8 @@ async fn scope(
);
Some(ids)
}
Some(_) => Some(query.fragments.clone().unwrap_or_default()),
None => query.fragments.clone(),
};
Ok(restrict(scope, restriction))
}
fn restrict(scope: Option<Vec<u64>>, restriction: Option<&[u64]>) -> Option<Vec<u64>> {
match restriction {
Some(ids) => {
let scope = scope.map(|ids| ids.into_iter().collect::<HashSet<_>>());
Some(
ids.iter()
.copied()
.filter(|id| scope.as_ref().is_none_or(|scope| scope.contains(id)))
.collect(),
)
}
None => scope,
}
_ => query.fragments.clone(),
})
}
/// Whether the rows of [`ann`]'s scope matching the filter's indexed
@@ -259,7 +122,6 @@ pub(crate) async fn few_indexed_matches(
dataset: &Dataset,
table: &VectorTable,
query: &Query,
restriction: Option<&[u64]>,
) -> Result<bool> {
let limit = query.exact_match_limit.unwrap_or(DEFAULT_EXACT_MATCH_LIMIT);
let Some(filter) = &query.filter else {
@@ -281,7 +143,7 @@ pub(crate) async fn few_indexed_matches(
if indexed.is_empty() {
return Ok(false);
}
let scope = scope(dataset, table, query, restriction).await?;
let scope = scope(dataset, table, query).await?;
// An AND matches at most what its most selective indexed conjunct does.
for conjunct in &indexed {
let count =
@@ -333,7 +195,6 @@ async fn scanner(
table: &VectorTable,
query: &Query,
use_index: bool,
restriction: Option<&[u64]>,
) -> Result<(Scanner, bool)> {
if query.vector.len() != table.dimension {
bail!(
@@ -386,13 +247,22 @@ async fn scanner(
if use_index && !segments.is_empty() {
scanner.with_index_segments(segments.to_vec())?;
}
let fragments = if use_index {
scope(dataset, table, query, restriction).await?
} else {
restrict(query.fragments.clone(), restriction)
};
if let Some(ids) = fragments {
let ids: HashSet<_> = ids.into_iter().collect();
// Lance intersects the fragment list with the selected segments, so a
// scoped scan must name the segment-covered fragments itself: the universe
// is the listed ids plus the live coverage of the selected segments. An
// empty universe (or an empty-segment, fragment-less assignment) scopes to
// nothing — `with_fragments` with an empty list scans nothing.
let mut wanted: Option<Vec<u64>> = query.fragments.clone();
if let Some(ids) = &mut wanted {
if use_index && !segments.is_empty() {
ids.extend(
crate::segments::covered_fragments(dataset, &table.vector_column, segments).await?,
);
}
} else if use_index && query.index_segments.as_ref().is_some_and(|s| s.is_empty()) {
wanted = Some(Vec::new());
}
if let Some(ids) = wanted {
let frags: Vec<Fragment> = dataset
.fragments()
.iter()
@@ -470,65 +340,6 @@ mod tests {
a.iter().zip(b).map(|(x, y)| (x - y) * (x - y)).sum()
}
#[tokio::test]
async fn indexed_only_scores_all_returned_distances() {
let dir = TempDir::new().unwrap();
let vectors: Vec<_> = (0..1024)
.map(|i| {
vec![
(i / 64) as f32 * 100.0 + (i % 64) as f32 * 0.01,
0.0,
0.0,
0.0,
]
})
.collect();
let mut dataset = write_dataset(&dir, &vectors, &vec!["a"; vectors.len()]).await;
dataset
.create_index(
&["vector"],
lance_index::IndexType::Vector,
Some("vidx".into()),
&lance::index::vector::VectorIndexParams::ivf_flat(16, DistanceType::L2),
true,
)
.await
.unwrap();
crate::testing::append_dataset(&mut dataset, &[vec![0.0; DIM]], &["late"]).await;
let table = VectorTable::resolve(&dataset, None, None).unwrap();
let mut query = Query {
vector: vec![0.0; DIM],
k: vectors.len(),
filter: None,
postfilter: false,
distance: DistanceType::L2,
nprobes: None,
index_segments: None,
fragments: None,
exact_match_limit: None,
};
for nprobes in [None, Some(1)] {
query.nprobes = nprobes;
let (hits, excluded) = indexed_only(&dataset, &table, &query).await.unwrap();
assert_eq!(excluded, 1);
assert_eq!(hits.len(), vectors.len());
for hit in hits {
let index: usize = hit.key[1..].parse().unwrap();
assert_eq!(hit.distance, l2(&query.vector, &vectors[index]));
}
}
dataset
.optimize_indices(&lance_index::optimize::OptimizeOptions::append())
.await
.unwrap();
query.k += 1;
let (hits, excluded) = indexed_only(&dataset, &table, &query).await.unwrap();
assert_eq!(excluded, 0);
assert_eq!(hits.len(), query.k);
assert!(hits.iter().all(|hit| hit.distance.is_finite()));
}
#[tokio::test]
async fn flat_returns_exact_top_k() {
let dir = TempDir::new().unwrap();
@@ -829,12 +640,7 @@ mod tests {
fragments: None,
exact_match_limit: None,
};
assert!(
!scanner(&dataset, &table, &query, true, None)
.await
.unwrap()
.1
);
assert!(!scanner(&dataset, &table, &query, true).await.unwrap().1);
crate::index::build(
&mut dataset,
&table.vector_column,
@@ -844,11 +650,6 @@ mod tests {
)
.await
.unwrap();
assert!(
scanner(&dataset, &table, &query, true, None)
.await
.unwrap()
.1
);
assert!(scanner(&dataset, &table, &query, true).await.unwrap().1);
}
}
@@ -195,46 +195,6 @@ mod tests {
assert_eq!(got, want);
}
#[tokio::test]
async fn indexed_only_keeps_assigned_segments_and_excludes_tail_work() {
let dir = TempDir::new().unwrap();
let mut dataset = testing::write_dataset(&dir, &testing::vectors(64, 4), &["a"; 64]).await;
crate::index::build(&mut dataset, "vector", crate::index::INDEX_NAME, 4, false)
.await
.unwrap();
testing::append_dataset(&mut dataset, &testing::vectors(4, 4), &["b"; 4]).await;
let table = VectorTable::resolve(&dataset, None, None).unwrap();
let segments = index_segments(&dataset, "vector").await.unwrap();
let query = Query {
vector: vec![0.0; 4],
k: 100,
filter: None,
postfilter: false,
distance: DistanceType::L2,
nprobes: Some(4),
index_segments: Some(segments),
fragments: Some(vec![1]),
exact_match_limit: None,
};
let (hits, excluded) = query::indexed_only(&dataset, &table, &query).await.unwrap();
assert_eq!(excluded, 1);
assert_eq!(hits.len(), 64);
let tail = Query {
index_segments: Some(Vec::new()),
..query.clone()
};
let (hits, excluded) = query::indexed_only(&dataset, &table, &tail).await.unwrap();
assert!(hits.is_empty());
assert_eq!(excluded, 1);
let empty = Query {
fragments: None,
..tail
};
let (hits, excluded) = query::indexed_only(&dataset, &table, &empty).await.unwrap();
assert!(hits.is_empty());
assert_eq!(excluded, 0);
}
/// named_segment_fragments must carry the logical index name through —
/// a fanout planner groups tasks by name.
#[tokio::test]
@@ -815,96 +815,3 @@ async fn a_dropped_and_recreated_index_serves_nothing_old() {
let author = stats().await.unwrap().into_inner().keys;
assert_eq!((author.len(), author[0].queries), (1, 1));
}
#[tokio::test]
async fn indexed_queries_acknowledge_coverage_and_skip_recent_writes() {
let fixture = Fixture::new().await;
fixture
.put(
(0..64)
.map(|i| row(i, Some(serde_json::json!("alice"))))
.collect(),
)
.await;
fixture.index_author().await;
let mut dataset = fixture.dataset(0).await;
weed_vector_core::index::build(
&mut dataset,
"vector",
weed_vector_core::index::INDEX_NAME,
4,
false,
)
.await
.unwrap();
fixture
.put(vec![row(100, Some(serde_json::json!("alice")))])
.await;
let request = pb::QueryVectorsRequest {
table: Some(fixture.table.clone()),
query_vector: vector_of(100),
top_k: 10,
filter: FILTERS[0].1.to_string(),
return_distance: true,
return_metadata: true,
..Default::default()
};
let all = fixture
.server
.query_vectors(Request::new(request.clone()))
.await
.unwrap();
assert_eq!(all.get_ref().vectors[0].key, "k100");
let indexed = fixture
.server
.query_indexed_vectors(Request::new(request.clone()))
.await
.unwrap();
assert_eq!(
indexed
.metadata()
.get("x-seaweedfs-vector-search-mode")
.unwrap(),
"indexed-only"
);
assert_eq!(
indexed
.metadata()
.get("x-seaweedfs-vector-excluded-fragments")
.unwrap(),
"1"
);
assert_eq!(indexed.get_ref().vectors.len(), 10);
assert!(
indexed
.get_ref()
.vectors
.iter()
.all(|v| v.key != "k100" && v.metadata.is_some())
);
let mut dataset = fixture.dataset(0).await;
dataset
.optimize_indices(&lance_index::optimize::OptimizeOptions::append())
.await
.unwrap();
let indexed = fixture
.server
.query_indexed_vectors(Request::new(request.clone()))
.await
.unwrap();
assert_eq!(indexed.get_ref().vectors[0].key, "k100");
assert_eq!(
indexed
.metadata()
.get("x-seaweedfs-vector-excluded-fragments")
.unwrap(),
"0"
);
fixture.set_state(State::Building).await;
let err = fixture
.server
.query_indexed_vectors(Request::new(request))
.await
.unwrap_err();
assert_eq!(err.code(), tonic::Code::InvalidArgument);
}
-1
View File
@@ -22,7 +22,6 @@ pub mod master_pb {
tonic::include_proto!("master_pb");
}
pub mod master_client;
pub mod memory;
pub mod security {
pub use weed_lance_worker::security::*;
}
+48 -17
View File
@@ -5,7 +5,6 @@ use clap::Parser;
use tokio_stream::wrappers::TcpListenerStream;
use tonic::transport::Server;
use weed_lance_worker::cluster::Cluster;
use weed_vector_server::memory::CacheSizes;
use weed_vector_server::pb::vector::vector_service_server::VectorServiceServer;
use weed_vector_server::read_cache::ReadCache;
use weed_vector_server::security::Security;
@@ -39,11 +38,30 @@ struct Args {
default_value = ""
)]
filer_group: String,
/// Memory for caching reads of write-once table files, in MiB; 0 disables.
#[arg(long, env = "WEED_VECTOR_READ_CACHE_MB", default_value_t = 512)]
read_cache_mb: u64,
/// Memory for indexes loaded by queries, kept for the next query, in MiB.
#[arg(long, env = "WEED_VECTOR_INDEX_CACHE_MB", default_value_t = 1024)]
index_cache_mb: usize,
/// Memory for table metadata (manifests, file footers) kept across
/// queries, in MiB.
#[arg(long, env = "WEED_VECTOR_METADATA_CACHE_MB", default_value_t = 256)]
metadata_cache_mb: usize,
/// Partitions each query probes in a table's vector index. Default: a
/// tenth of the index's partitions, at least 8; more under a filter.
#[arg(long, env = "WEED_VECTOR_NPROBES")]
nprobes: Option<std::num::NonZeroUsize>,
/// A filtered query whose indexed metadata keys match at most this many
/// rows scores them exactly instead of searching the vector index; 0
/// never does.
#[arg(long, env = "WEED_VECTOR_EXACT_MATCH_LIMIT", default_value_t = weed_vector_core::query::DEFAULT_EXACT_MATCH_LIMIT)]
exact_match_limit: usize,
/// The cluster's security.toml: [grpc.vector] for this server,
/// [grpc.client] for the masters and filers, https.client for volume
/// servers under HTTPS, jwt.signing.read.key for signed volume reads,
/// s3.sse.kek or s3.sse.key for SSE-S3 buckets. By default the file weed
/// processes find in ., ~/.seaweedfs and /etc/seaweedfs.
/// processes find in -config_dir, ., ~/.seaweedfs and /etc/seaweedfs.
#[arg(long, env = "WEED_VECTOR_SECURITY_TOML")]
security_toml: Option<PathBuf>,
#[arg(
@@ -60,6 +78,11 @@ struct Args {
default_value = "127.0.0.1"
)]
metrics_ip: String,
/// The directory weed's -config_dir names, searched for security.toml
/// first.
#[arg(long, alias = "config_dir", env = "WEED_VECTOR_CONFIG_DIR")]
config_dir: Option<PathBuf>,
}
// weed tools take Go-style single-dash long flags; normalize_args converts
@@ -129,8 +152,8 @@ fn advertised_addr(listen: &str, masters: &[String], advertise: Option<&str>) ->
async fn main() -> Result<()> {
tracing_subscriber::fmt::init();
let args = Args::parse_from(normalize_args(std::env::args().collect()));
let security = Security::load(args.security_toml.as_deref())?;
weed_lance_worker::tls::install_for_fips_mode(&security)?;
weed_lance_worker::tls::install_default_crypto_provider();
let security = Security::load(args.security_toml.as_deref(), args.config_dir.as_deref())?;
if let Some(path) = security.path() {
tracing::info!("security settings from {}", path.display());
}
@@ -148,18 +171,16 @@ async fn main() -> Result<()> {
let (health, health_service) = tonic_health::server::health_reporter();
let metrics = Metrics::new()?.with_health(health);
metrics.set_connected(false).await;
let sizes = CacheSizes::detect();
tracing::info!(
"caching {} MiB of file reads, {} MiB of indexes, {} MiB of table metadata",
sizes.read >> 20,
sizes.index >> 20,
sizes.metadata >> 20
);
let cache = ReadCache::new(sizes.read).with_metrics(metrics.clone());
let service = VectorServer::new()
.with_lance_caches(sizes.index as usize, sizes.metadata as usize)
.with_storage(reads)
.with_read_cache(cache.clone());
let cache = (args.read_cache_mb > 0)
.then(|| ReadCache::new(args.read_cache_mb << 20).with_metrics(metrics.clone()));
let mut service = VectorServer::new()
.with_nprobes(args.nprobes.map(std::num::NonZeroUsize::get))
.with_exact_match_limit(Some(args.exact_match_limit))
.with_lance_caches(args.index_cache_mb << 20, args.metadata_cache_mb << 20)
.with_storage(reads);
if let Some(cache) = &cache {
service = service.with_read_cache(cache.clone());
}
if args.metrics_port > 0 {
let ip = args
.metrics_ip
@@ -170,7 +191,7 @@ async fn main() -> Result<()> {
tokio::net::TcpListener::bind(std::net::SocketAddr::new(ip, args.metrics_port)).await?;
let metrics = metrics.clone();
tokio::spawn(async move {
if let Err(error) = metrics::serve_listener(metrics, listener, Some(cache)).await {
if let Err(error) = metrics::serve_listener(metrics, listener, cache).await {
tracing::error!(%error, "vector metrics server stopped");
}
});
@@ -242,6 +263,16 @@ mod tests {
);
}
#[test]
fn nprobes_must_be_positive() {
let parse = |nprobes: &str| {
Args::try_parse_from(["weed-vector", "--masters", "m:9333", "--nprobes", nprobes])
};
assert!(parse("0").is_err());
let args = parse("12").unwrap();
assert_eq!(args.nprobes.map(std::num::NonZeroUsize::get), Some(12));
}
#[test]
fn the_catalog_flags_are_gone() {
let parse = |extra: &[&str]| {
@@ -24,8 +24,6 @@ fn registration(client_addr: &str, filer_group: &str, metrics_port: u16) -> Keep
rack: String::new(),
leave_lock_ring: false,
metrics_port: metrics_port.into(),
lance_port: 0,
s3_endpoint: String::new(),
}
}
-155
View File
@@ -1,155 +0,0 @@
//! How much the engine caches: a share of the memory this process may use,
//! so a small pod is not overcommitted and a large host is not left idle.
use std::path::{Path, PathBuf};
/// The read, index and metadata caches, in bytes.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct CacheSizes {
pub read: u64,
pub index: u64,
pub metadata: u64,
}
/// Where no limit can be read, the sizes the flags used to default to.
const UNKNOWN_LIMIT_BUDGET: u64 = 1792 << 20;
impl CacheSizes {
/// A quarter of the memory limit, split 2:4:1 between file reads, loaded
/// indexes and table metadata.
pub fn for_limit(limit: Option<u64>) -> Self {
let budget = limit.map_or(UNKNOWN_LIMIT_BUDGET, |limit| limit / 4);
let seventh = budget / 7;
Self {
read: seventh * 2,
index: seventh * 4,
metadata: seventh,
}
}
pub fn detect() -> Self {
Self::for_limit(memory_limit())
}
}
/// The smallest of the machine's memory and the limits of this process's
/// memory cgroup and its ancestors: a systemd service is limited in its own
/// group, a container usually at the root it sees.
fn memory_limit() -> Option<u64> {
let read = |path: &Path| std::fs::read_to_string(path).ok();
let total = read(Path::new("/proc/meminfo")).and_then(|info| mem_total(&info));
let groups = read(Path::new("/proc/self/cgroup"))
.map(|groups| limit_files(&groups))
.unwrap_or_default();
groups
.iter()
.filter_map(|file| read(file).and_then(|limit| cgroup_limit(&limit)))
.chain(total)
.min()
}
/// The limit files of the memory cgroup `/proc/self/cgroup` names and of its
/// ancestors: v1's memory controller where it has one, else v2's unified group.
fn limit_files(self_cgroup: &str) -> Vec<PathBuf> {
let entries: Vec<(&str, &str)> = self_cgroup
.lines()
.filter_map(|line| {
let mut fields = line.splitn(3, ':');
fields.next()?;
Some((fields.next()?, fields.next()?))
})
.collect();
let v1 = entries
.iter()
.find(|(controllers, _)| controllers.split(',').any(|c| c == "memory"))
.map(|(_, group)| ("/sys/fs/cgroup/memory", *group, "memory.limit_in_bytes"));
let v2 = entries
.iter()
.find(|(controllers, _)| controllers.is_empty())
.map(|(_, group)| ("/sys/fs/cgroup", *group, "memory.max"));
let Some((root, group, file)) = v1.or(v2) else {
return Vec::new();
};
Path::new(group)
.ancestors()
.map(|dir| {
Path::new(root)
.join(dir.strip_prefix("/").unwrap_or(dir))
.join(file)
})
.collect()
}
fn mem_total(meminfo: &str) -> Option<u64> {
let line = meminfo.lines().find(|line| line.starts_with("MemTotal:"))?;
let kib: u64 = line.split_whitespace().nth(1)?.parse().ok()?;
Some(kib << 10)
}
/// cgroup v2 writes "max" for no limit; v1 writes a number near u64::MAX.
fn cgroup_limit(limit: &str) -> Option<u64> {
let bytes: u64 = limit.trim().parse().ok()?;
(bytes < 1 << 60).then_some(bytes)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn a_quarter_of_the_limit_split_two_four_one() {
let sizes = CacheSizes::for_limit(Some(28 << 30));
assert_eq!(sizes.read, 2 << 30);
assert_eq!(sizes.index, 4 << 30);
assert_eq!(sizes.metadata, 1 << 30);
}
#[test]
fn no_limit_keeps_the_former_defaults() {
let sizes = CacheSizes::for_limit(None);
assert_eq!(
(sizes.read, sizes.index, sizes.metadata),
(512 << 20, 1024 << 20, 256 << 20)
);
}
#[test]
fn looks_up_the_process_group_and_its_ancestors() {
let paths = |groups: &str| -> Vec<String> {
limit_files(groups)
.iter()
.map(|p| p.display().to_string().replace('\\', "/"))
.collect()
};
assert_eq!(
paths("0::/system.slice/weed-vector.service\n"),
[
"/sys/fs/cgroup/system.slice/weed-vector.service/memory.max",
"/sys/fs/cgroup/system.slice/memory.max",
"/sys/fs/cgroup/memory.max",
]
);
// A container's namespace shows its own group as the root.
assert_eq!(paths("0::/\n"), ["/sys/fs/cgroup/memory.max"]);
// On a hybrid host the memory controller is v1's.
assert_eq!(
paths("12:cpu,cpuacct:/a\n4:memory:/user.slice\n0::/user.slice\n"),
[
"/sys/fs/cgroup/memory/user.slice/memory.limit_in_bytes",
"/sys/fs/cgroup/memory/memory.limit_in_bytes",
]
);
assert!(paths("").is_empty());
}
#[test]
fn reads_the_limits_the_kernel_writes() {
assert_eq!(
mem_total("MemTotal: 16384000 kB\nMemFree: 1 kB\n"),
Some(16_384_000 << 10)
);
assert_eq!(cgroup_limit("4294967296\n"), Some(4 << 30));
assert_eq!(cgroup_limit("max\n"), None);
assert_eq!(cgroup_limit("9223372036854771712\n"), None);
}
}
@@ -78,20 +78,6 @@ impl VectorService for ObservedService {
}
result
}
async fn query_indexed_vectors(
&self,
request: Request<pb::QueryVectorsRequest>,
) -> Result<Response<pb::QueryVectorsResponse>, Status> {
let mut in_flight = self.metrics.start("QueryVectors");
let result = self.inner.query_indexed_vectors(request).await;
in_flight.complete(result.as_ref().err().map(|e| e.code()));
if let Ok(response) = &result {
self.metrics
.query_results
.inc_by(response.get_ref().vectors.len() as u64);
}
result
}
async fn metadata_keys(
&self,
request: Request<pb::MetadataKeysRequest>,
+62 -98
View File
@@ -705,6 +705,7 @@ pub struct VectorServer {
pub(crate) handles: moka::sync::Cache<(String, bool), (u64, Dataset)>,
lance_cache_bytes: (usize, usize),
leases: SharedLeases,
nprobes: Option<usize>,
exact_match_limit: Option<usize>,
filter_stats: crate::filter_stats::FilterStats,
/// URI schemes a table's location may have.
@@ -729,6 +730,7 @@ impl VectorServer {
lance_cache_bytes: (DEFAULT_INDEX_CACHE_BYTES, DEFAULT_METADATA_CACHE_BYTES),
handles: moka::sync::Cache::new(MAX_HANDLES),
leases: SharedLeases::default(),
nprobes: None,
exact_match_limit: None,
filter_stats: Default::default(),
schemes: &["s3"],
@@ -742,10 +744,15 @@ impl VectorServer {
self
}
/// Partitions every query probes, instead of the index's own default.
pub fn with_nprobes(mut self, nprobes: Option<usize>) -> Self {
self.nprobes = nprobes;
self
}
/// Matches of a filter's indexed metadata keys scored exactly instead of
/// searched through the vector index, at most; None keeps the default.
#[cfg(test)]
pub(crate) fn with_exact_match_limit(mut self, limit: Option<usize>) -> Self {
pub fn with_exact_match_limit(mut self, limit: Option<usize>) -> Self {
self.exact_match_limit = limit;
self
}
@@ -1136,71 +1143,6 @@ impl VectorService for VectorServer {
async fn query_vectors(
&self,
request: Request<pb::QueryVectorsRequest>,
) -> Result<Response<pb::QueryVectorsResponse>, Status> {
self.query(request, false).await
}
async fn query_indexed_vectors(
&self,
request: Request<pb::QueryVectorsRequest>,
) -> Result<Response<pb::QueryVectorsResponse>, Status> {
self.query(request, true).await
}
async fn metadata_keys(
&self,
request: Request<pb::MetadataKeysRequest>,
) -> Result<Response<pb::MetadataKeysResponse>, Status> {
let table = request
.into_inner()
.table
.ok_or_else(|| Status::invalid_argument("missing table"))?;
let dataset = self.open_to_read(&table).await?;
let _lease = self.leases.try_pin(&dataset).await.map_err(internal)?;
Ok(Response::new(
metadata_keys(&dataset).await.map_err(internal)?,
))
}
async fn update_metadata_key(
&self,
request: Request<pb::UpdateMetadataKeyRequest>,
) -> Result<Response<pb::MetadataKeysResponse>, Status> {
let req = request.into_inner();
let table = req
.table
.ok_or_else(|| Status::invalid_argument("missing table"))?;
let mut dataset = self.open(&table).await?;
let updated = if req.remove {
metadata_index::request_removal(&mut dataset, &req.key).await
} else {
metadata_index::request(&mut dataset, &req.key).await
};
updated.map_err(|e| Status::failed_precondition(format!("{e:#}")))?;
Ok(Response::new(
metadata_keys(&dataset).await.map_err(internal)?,
))
}
async fn filter_stats(
&self,
request: Request<pb::FilterStatsRequest>,
) -> Result<Response<pb::FilterStatsResponse>, Status> {
let table = request
.into_inner()
.table
.ok_or_else(|| Status::invalid_argument("missing table"))?;
Ok(Response::new(
self.filter_stats.snapshot(&table.id.join("/")),
))
}
}
impl VectorServer {
async fn query(
&self,
request: Request<pb::QueryVectorsRequest>,
indexed_only: bool,
) -> Result<Response<pb::QueryVectorsResponse>, Status> {
let started = std::time::Instant::now();
let req = request.into_inner();
@@ -1238,29 +1180,14 @@ impl VectorServer {
},
postfilter: req.postfilter,
distance,
nprobes: None,
nprobes: self.nprobes,
index_segments: None,
fragments: None,
exact_match_limit: self.exact_match_limit,
};
let (hits, excluded) = if indexed_only {
query::indexed_only(&dataset, &resolved, &query)
.await
.map_err(|err| {
if err.is::<query::IndexedOnlyError>() {
invalid(err)
} else {
internal(err)
}
})?
} else {
(
query::ann(&dataset, &resolved, &query)
.await
.map_err(internal)?,
0,
)
};
let hits = query::ann(&dataset, &resolved, &query)
.await
.map_err(internal)?;
// One batched read for every hit's columns; keyed by the hit key so
// row order does not matter.
let mut metas: std::collections::HashMap<String, Option<Struct>> =
@@ -1335,18 +1262,55 @@ impl VectorServer {
let index = table.id.join("/");
self.filter_stats
.record(&index, table_id(&dataset), &filter_keys, started.elapsed());
let mut response = Response::new(pb::QueryVectorsResponse { vectors });
if indexed_only {
response.metadata_mut().insert(
"x-seaweedfs-vector-search-mode",
"indexed-only".parse().unwrap(),
);
response.metadata_mut().insert(
"x-seaweedfs-vector-excluded-fragments",
excluded.to_string().parse().unwrap(),
);
}
Ok(response)
Ok(Response::new(pb::QueryVectorsResponse { vectors }))
}
async fn metadata_keys(
&self,
request: Request<pb::MetadataKeysRequest>,
) -> Result<Response<pb::MetadataKeysResponse>, Status> {
let table = request
.into_inner()
.table
.ok_or_else(|| Status::invalid_argument("missing table"))?;
let dataset = self.open_to_read(&table).await?;
let _lease = self.leases.try_pin(&dataset).await.map_err(internal)?;
Ok(Response::new(
metadata_keys(&dataset).await.map_err(internal)?,
))
}
async fn update_metadata_key(
&self,
request: Request<pb::UpdateMetadataKeyRequest>,
) -> Result<Response<pb::MetadataKeysResponse>, Status> {
let req = request.into_inner();
let table = req
.table
.ok_or_else(|| Status::invalid_argument("missing table"))?;
let mut dataset = self.open(&table).await?;
let updated = if req.remove {
metadata_index::request_removal(&mut dataset, &req.key).await
} else {
metadata_index::request(&mut dataset, &req.key).await
};
updated.map_err(|e| Status::failed_precondition(format!("{e:#}")))?;
Ok(Response::new(
metadata_keys(&dataset).await.map_err(internal)?,
))
}
async fn filter_stats(
&self,
request: Request<pb::FilterStatsRequest>,
) -> Result<Response<pb::FilterStatsResponse>, Status> {
let table = request
.into_inner()
.table
.ok_or_else(|| Status::invalid_argument("missing table"))?;
Ok(Response::new(
self.filter_stats.snapshot(&table.id.join("/")),
))
}
}
-16
View File
@@ -4067,7 +4067,6 @@ dependencies = [
"futures-core",
"pin-project-lite",
"tokio",
"tokio-util",
]
[[package]]
@@ -4166,19 +4165,6 @@ dependencies = [
"syn",
]
[[package]]
name = "tonic-health"
version = "0.14.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcfab99db777fba2802f0dfa861d1628d1ae916fb199d29819941f139ae85082"
dependencies = [
"prost 0.14.4",
"tokio",
"tokio-stream",
"tonic",
"tonic-prost",
]
[[package]]
name = "tonic-prost"
version = "0.14.6"
@@ -4653,7 +4639,6 @@ dependencies = [
"tokio-stream",
"toml",
"tonic",
"tonic-health",
"tonic-prost",
"tonic-prost-build",
"tonic-reflection",
@@ -4662,7 +4647,6 @@ dependencies = [
"tracing",
"tracing-subscriber",
"uuid",
"webpki-roots",
"windows-sys 0.61.2",
"x509-parser",
"xxhash-rust",
-2
View File
@@ -42,7 +42,6 @@ tokio-io-timeout = "1"
tonic = { version = "0.14", features = ["tls-aws-lc"] }
tonic-prost = "0.14"
tonic-reflection = "0.14"
tonic-health = "0.14"
prost = "0.14"
prost-types = "0.14"
@@ -68,7 +67,6 @@ jsonwebtoken = { version = "10", features = ["rust_crypto"] }
rustls = "0.23"
tokio-rustls = "0.26"
rustls-pemfile = "2"
webpki-roots = "1"
# LevelDB (via RocksDB for better Rust support)
# Using rusty-leveldb for pure Rust LevelDB
-9
View File
@@ -234,10 +234,6 @@ message KeepConnectedRequest {
// it is not enabled. Advertised so the admin server can scrape it without
// exposing metrics on the client-facing service port.
uint32 metrics_port = 9;
// Port an S3 gateway serves its Lance Namespace on, or 0 when it serves none.
uint32 lance_port = 10;
// URL an S3 gateway serves the S3 API on, or empty when it advertises none.
string s3_endpoint = 11;
}
message VolumeLocation {
@@ -436,7 +432,6 @@ message DataNodeInfo {
string id = 1;
map<string, DiskInfo> diskInfos = 2;
uint32 grpc_port = 3;
int64 last_heartbeat_ns = 5;
string address = 4; // ip:port for connecting to the volume server
}
message RackInfo {
@@ -453,8 +448,6 @@ message TopologyInfo {
string id = 1;
repeated DataCenterInfo data_center_infos = 2;
map<string, DiskInfo> diskInfos = 3;
// The cluster's persisted UUID, the same value as topology_id in heartbeats.
string topology_id = 4;
}
message VolumeListRequest {
// Empty and zero take everything. Only the volumes and ec shards listed
@@ -566,8 +559,6 @@ message ListClusterNodesResponse {
string address = 1;
string version = 2;
int64 created_at_ns = 4;
uint32 lance_port = 7;
string s3_endpoint = 8;
string data_center = 5;
string rack = 6;
}
Loaded 100 of 1200 files, more files were not shown because too many files have changed in this diff. Show more