diff --git a/.woodpecker/debug.yaml b/.woodpecker/debug.yaml
index 4dc7d3c9..4c729672 100644
--- a/.woodpecker/debug.yaml
+++ b/.woodpecker/debug.yaml
@@ -12,32 +12,32 @@ when:
steps:
- name: check formatting
- image: nixpkgs/nix:nixos-24.05
+ image: nixpkgs/nix:nixos-22.05
commands:
- - nix-build -j4 --attr flakePackages.fmt
+ - nix-shell --attr devShell --run "cargo fmt -- --check"
- name: build
- image: nixpkgs/nix:nixos-24.05
+ image: nixpkgs/nix:nixos-22.05
commands:
- nix-build -j4 --attr flakePackages.dev
- name: unit + func tests (lmdb)
- image: nixpkgs/nix:nixos-24.05
+ image: nixpkgs/nix:nixos-22.05
commands:
- nix-build -j4 --attr flakePackages.tests-lmdb
- name: unit + func tests (sqlite)
- image: nixpkgs/nix:nixos-24.05
+ image: nixpkgs/nix:nixos-22.05
commands:
- nix-build -j4 --attr flakePackages.tests-sqlite
- name: unit + func tests (fjall)
- image: nixpkgs/nix:nixos-24.05
+ image: nixpkgs/nix:nixos-22.05
commands:
- nix-build -j4 --attr flakePackages.tests-fjall
- name: integration tests
- image: nixpkgs/nix:nixos-24.05
+ image: nixpkgs/nix:nixos-22.05
commands:
- nix-build -j4 --attr flakePackages.dev
- nix-shell --attr ci --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
diff --git a/.woodpecker/publish.yaml b/.woodpecker/publish.yaml
index 8f3b482f..24a84463 100644
--- a/.woodpecker/publish.yaml
+++ b/.woodpecker/publish.yaml
@@ -11,7 +11,7 @@ depends_on:
steps:
- name: refresh-index
- image: nixpkgs/nix:nixos-24.05
+ image: nixpkgs/nix:nixos-22.05
environment:
AWS_ACCESS_KEY_ID:
from_secret: garagehq_aws_access_key_id
@@ -22,7 +22,7 @@ steps:
- nix-shell --attr ci --run "refresh_index"
- name: multiarch-docker
- image: nixpkgs/nix:nixos-24.05
+ image: nixpkgs/nix:nixos-22.05
environment:
DOCKER_AUTH:
from_secret: docker_auth
diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml
index a94a9ccf..c1514cd1 100644
--- a/.woodpecker/release.yaml
+++ b/.woodpecker/release.yaml
@@ -19,17 +19,17 @@ matrix:
steps:
- name: build
- image: nixpkgs/nix:nixos-24.05
+ image: nixpkgs/nix:nixos-22.05
commands:
- nix-build --attr releasePackages.${ARCH} --argstr git_version ${CI_COMMIT_TAG:-$CI_COMMIT_SHA}
- name: check is static binary
- image: nixpkgs/nix:nixos-24.05
+ image: nixpkgs/nix:nixos-22.05
commands:
- nix-shell --attr ci --run "./script/not-dynamic.sh result/bin/garage"
- name: integration tests
- image: nixpkgs/nix:nixos-24.05
+ image: nixpkgs/nix:nixos-22.05
commands:
- nix-shell --attr ci --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
when:
@@ -38,8 +38,16 @@ steps:
- matrix:
ARCH: i386
- - name: upgrade tests
- image: nixpkgs/nix:nixos-24.05
+ - name: upgrade tests from v1.0.0
+ image: nixpkgs/nix:nixos-22.05
+ commands:
+ - nix-shell --attr ci --run "./script/test-upgrade.sh v1.0.0 x86_64-unknown-linux-musl" || (cat /tmp/garage.log; false)
+ when:
+ - matrix:
+ ARCH: amd64
+
+ - name: upgrade tests from v0.8.4
+ image: nixpkgs/nix:nixos-22.05
commands:
- nix-shell --attr ci --run "./script/test-upgrade.sh v0.8.4 x86_64-unknown-linux-musl" || (cat /tmp/garage.log; false)
when:
@@ -47,7 +55,7 @@ steps:
ARCH: amd64
- name: push static binary
- image: nixpkgs/nix:nixos-24.05
+ image: nixpkgs/nix:nixos-22.05
environment:
TARGET: "${TARGET}"
AWS_ACCESS_KEY_ID:
@@ -58,7 +66,7 @@ steps:
- nix-shell --attr ci --run "to_s3"
- name: docker build and publish
- image: nixpkgs/nix:nixos-24.05
+ image: nixpkgs/nix:nixos-22.05
environment:
DOCKER_PLATFORM: "linux/${ARCH}"
CONTAINER_NAME: "dxflrs/${ARCH}_garage"
diff --git a/Cargo.lock b/Cargo.lock
index 7473d9af..6d2f06fe 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,18 +4,18 @@ version = 4
[[package]]
name = "addr2line"
-version = "0.25.1"
+version = "0.24.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b"
+checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
dependencies = [
"gimli",
]
[[package]]
name = "adler2"
-version = "2.0.1"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
+checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
[[package]]
name = "aead"
@@ -54,22 +54,22 @@ dependencies = [
[[package]]
name = "ahash"
-version = "0.8.12"
+version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
+checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
dependencies = [
"cfg-if",
- "getrandom 0.3.4",
+ "getrandom 0.2.15",
"once_cell",
"version_check",
- "zerocopy",
+ "zerocopy 0.7.35",
]
[[package]]
name = "aho-corasick"
-version = "1.1.4"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
+checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
dependencies = [
"memchr",
]
@@ -80,6 +80,12 @@ version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
[[package]]
name = "android_system_properties"
version = "0.1.5"
@@ -91,9 +97,9 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.6.21"
+version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
+checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
dependencies = [
"anstyle",
"anstyle-parse",
@@ -106,53 +112,50 @@ dependencies = [
[[package]]
name = "anstyle"
-version = "1.0.13"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
+checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
[[package]]
name = "anstyle-parse"
-version = "0.2.7"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
+checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
-version = "1.1.5"
+version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
+checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys 0.59.0",
]
[[package]]
name = "anstyle-wincon"
-version = "3.0.11"
+version = "3.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
+checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
dependencies = [
"anstyle",
- "once_cell_polyfill",
- "windows-sys 0.61.2",
+ "once_cell",
+ "windows-sys 0.59.0",
]
[[package]]
name = "anyhow"
-version = "1.0.100"
+version = "1.0.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
+checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f"
[[package]]
name = "arc-swap"
-version = "1.8.0"
+version = "1.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51d03449bb8ca2cc2ef70869af31463d1ae5ccc8fa3e334b307203fbf815207e"
-dependencies = [
- "rustversion",
-]
+checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"
[[package]]
name = "argon2"
@@ -184,14 +187,16 @@ dependencies = [
[[package]]
name = "async-compression"
-version = "0.4.37"
+version = "0.4.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d10e4f991a553474232bc0a31799f6d24b034a84c0971d80d2e2f78b2e576e40"
+checksum = "c0cf008e5e1a9e9e22a7d3c9a4992e21a350290069e36d8fb72304ed17e8f2d2"
dependencies = [
- "compression-codecs",
- "compression-core",
+ "futures-core",
+ "memchr",
"pin-project-lite",
"tokio",
+ "zstd",
+ "zstd-safe",
]
[[package]]
@@ -213,18 +218,18 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
name = "async-trait"
-version = "0.1.89"
+version = "0.1.88"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
+checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
@@ -235,15 +240,15 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "autocfg"
-version = "1.5.0"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "aws-credential-types"
-version = "1.2.11"
+version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3cd362783681b15d136480ad555a099e82ecd8e2d10a841e14dfd0078d67fee3"
+checksum = "4471bef4c22a06d2c7a1b6492493d3fdf24a805323109d6874f9c94d5906ac14"
dependencies = [
"aws-smithy-async",
"aws-smithy-runtime-api",
@@ -253,9 +258,9 @@ dependencies = [
[[package]]
name = "aws-runtime"
-version = "1.5.18"
+version = "1.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "959dab27ce613e6c9658eb3621064d0e2027e5f2acb65bc526a43577facea557"
+checksum = "0aff45ffe35196e593ea3b9dd65b320e51e2dda95aff4390bc459e461d09c6ad"
dependencies = [
"aws-credential-types",
"aws-sigv4",
@@ -270,6 +275,7 @@ dependencies = [
"fastrand",
"http 0.2.12",
"http-body 0.4.6",
+ "once_cell",
"percent-encoding",
"pin-project-lite",
"tracing",
@@ -278,32 +284,31 @@ dependencies = [
[[package]]
name = "aws-sdk-config"
-version = "1.99.0"
+version = "1.65.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67e62e5ffb669e13f084c4e1d89d687604e001187f61503606a7f8cc7a411995"
+checksum = "2645fb2c8b9876a46a3d79f06aad47063baf054085ea887a1e6d6f159e8a7501"
dependencies = [
"aws-credential-types",
"aws-runtime",
"aws-smithy-async",
"aws-smithy-http",
"aws-smithy-json",
- "aws-smithy-observability",
"aws-smithy-runtime",
"aws-smithy-runtime-api",
"aws-smithy-types",
"aws-types",
"bytes",
- "fastrand",
"http 0.2.12",
+ "once_cell",
"regex-lite",
"tracing",
]
[[package]]
name = "aws-sdk-s3"
-version = "1.120.0"
+version = "1.79.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06673901e961f20fa8d7da907da48f7ad6c1b383e3726c22bd418900f015abe1"
+checksum = "a8f63ba8f5fca32061c7d62d866ef65470edde38d4c5f8a0ebb8ff40a0521e1c"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -313,7 +318,6 @@ dependencies = [
"aws-smithy-eventstream",
"aws-smithy-http",
"aws-smithy-json",
- "aws-smithy-observability",
"aws-smithy-runtime",
"aws-smithy-runtime-api",
"aws-smithy-types",
@@ -324,9 +328,10 @@ dependencies = [
"hex",
"hmac",
"http 0.2.12",
- "http 1.4.0",
+ "http 1.3.1",
"http-body 0.4.6",
"lru",
+ "once_cell",
"percent-encoding",
"regex-lite",
"sha2",
@@ -336,9 +341,9 @@ dependencies = [
[[package]]
name = "aws-sigv4"
-version = "1.3.7"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69e523e1c4e8e7e8ff219d732988e22bfeae8a1cafdbe6d9eca1546fa080be7c"
+checksum = "69d03c3c05ff80d54ff860fe38c726f6f494c639ae975203a101335f223386db"
dependencies = [
"aws-credential-types",
"aws-smithy-eventstream",
@@ -350,7 +355,8 @@ dependencies = [
"hex",
"hmac",
"http 0.2.12",
- "http 1.4.0",
+ "http 1.3.1",
+ "once_cell",
"percent-encoding",
"sha2",
"time",
@@ -359,9 +365,9 @@ dependencies = [
[[package]]
name = "aws-smithy-async"
-version = "1.2.7"
+version = "1.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ee19095c7c4dda59f1697d028ce704c24b2d33c6718790c7f1d5a3015b4107c"
+checksum = "1e190749ea56f8c42bf15dd76c65e14f8f765233e6df9b0506d9d934ebef867c"
dependencies = [
"futures-util",
"pin-project-lite",
@@ -370,14 +376,16 @@ dependencies = [
[[package]]
name = "aws-smithy-checksums"
-version = "0.63.13"
+version = "0.63.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23374b9170cbbcc6f5df8dc5ebb9b6c5c28a3c8f599f0e8b8b10eb6f4a5c6e74"
+checksum = "b65d21e1ba6f2cdec92044f904356a19f5ad86961acf015741106cdfafd747c0"
dependencies = [
"aws-smithy-http",
"aws-smithy-types",
"bytes",
- "crc-fast",
+ "crc32c",
+ "crc32fast",
+ "crc64fast-nvme",
"hex",
"http 0.2.12",
"http-body 0.4.6",
@@ -390,9 +398,9 @@ dependencies = [
[[package]]
name = "aws-smithy-eventstream"
-version = "0.60.14"
+version = "0.60.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc12f8b310e38cad85cf3bef45ad236f470717393c613266ce0a89512286b650"
+checksum = "7c45d3dddac16c5c59d553ece225a88870cf81b7b813c9cc17b78cf4685eac7a"
dependencies = [
"aws-smithy-types",
"bytes",
@@ -401,9 +409,9 @@ dependencies = [
[[package]]
name = "aws-smithy-http"
-version = "0.62.6"
+version = "0.62.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "826141069295752372f8203c17f28e30c464d22899a43a0c9fd9c458d469c88b"
+checksum = "c5949124d11e538ca21142d1fba61ab0a2a2c1bc3ed323cdb3e4b878bfb83166"
dependencies = [
"aws-smithy-eventstream",
"aws-smithy-runtime-api",
@@ -411,10 +419,10 @@ dependencies = [
"bytes",
"bytes-utils",
"futures-core",
- "futures-util",
"http 0.2.12",
- "http 1.4.0",
+ "http 1.3.1",
"http-body 0.4.6",
+ "once_cell",
"percent-encoding",
"pin-project-lite",
"pin-utils",
@@ -423,62 +431,51 @@ dependencies = [
[[package]]
name = "aws-smithy-http-client"
-version = "1.1.5"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59e62db736db19c488966c8d787f52e6270be565727236fd5579eaa301e7bc4a"
+checksum = "0497ef5d53065b7cd6a35e9c1654bd1fefeae5c52900d91d1b188b0af0f29324"
dependencies = [
"aws-smithy-async",
"aws-smithy-runtime-api",
"aws-smithy-types",
- "h2 0.3.27",
- "h2 0.4.13",
+ "h2 0.4.8",
"http 0.2.12",
"http-body 0.4.6",
"hyper 0.14.32",
"hyper-rustls 0.24.2",
"pin-project-lite",
"rustls 0.21.12",
- "rustls-native-certs 0.8.3",
"tokio",
"tracing",
]
[[package]]
name = "aws-smithy-json"
-version = "0.61.9"
+version = "0.61.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49fa1213db31ac95288d981476f78d05d9cbb0353d22cdf3472cc05bb02f6551"
+checksum = "92144e45819cae7dc62af23eac5a038a58aa544432d2102609654376a900bd07"
dependencies = [
"aws-smithy-types",
]
-[[package]]
-name = "aws-smithy-observability"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef1fcbefc7ece1d70dcce29e490f269695dfca2d2bacdeaf9e5c3f799e4e6a42"
-dependencies = [
- "aws-smithy-runtime-api",
-]
-
[[package]]
name = "aws-smithy-runtime"
-version = "1.9.8"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb5b6167fcdf47399024e81ac08e795180c576a20e4d4ce67949f9a88ae37dc1"
+checksum = "f6328865e36c6fd970094ead6b05efd047d3a80ec5fc3be5e743910da9f2ebf8"
dependencies = [
"aws-smithy-async",
"aws-smithy-http",
"aws-smithy-http-client",
- "aws-smithy-observability",
"aws-smithy-runtime-api",
"aws-smithy-types",
"bytes",
"fastrand",
"http 0.2.12",
- "http 1.4.0",
+ "http 1.3.1",
"http-body 0.4.6",
"http-body 1.0.1",
+ "once_cell",
"pin-project-lite",
"pin-utils",
"tokio",
@@ -487,15 +484,15 @@ dependencies = [
[[package]]
name = "aws-smithy-runtime-api"
-version = "1.10.0"
+version = "1.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efce7aaaf59ad53c5412f14fc19b2d5c6ab2c3ec688d272fd31f76ec12f44fb0"
+checksum = "3da37cf5d57011cb1753456518ec76e31691f1f474b73934a284eb2a1c76510f"
dependencies = [
"aws-smithy-async",
"aws-smithy-types",
"bytes",
"http 0.2.12",
- "http 1.4.0",
+ "http 1.3.1",
"pin-project-lite",
"tokio",
"tracing",
@@ -504,16 +501,16 @@ dependencies = [
[[package]]
name = "aws-smithy-types"
-version = "1.3.6"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65f172bcb02424eb94425db8aed1b6d583b5104d4d5ddddf22402c661a320048"
+checksum = "836155caafba616c0ff9b07944324785de2ab016141c3550bd1c07882f8cee8f"
dependencies = [
"base64-simd",
"bytes",
"bytes-utils",
"futures-core",
"http 0.2.12",
- "http 1.4.0",
+ "http 1.3.1",
"http-body 0.4.6",
"http-body 1.0.1",
"http-body-util",
@@ -525,23 +522,23 @@ dependencies = [
"serde",
"time",
"tokio",
- "tokio-util 0.7.18",
+ "tokio-util 0.7.14",
]
[[package]]
name = "aws-smithy-xml"
-version = "0.60.13"
+version = "0.60.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11b2f670422ff42bf7065031e72b45bc52a3508bd089f743ea90731ca2b6ea57"
+checksum = "ab0b0166827aa700d3dc519f72f8b3a91c35d0b8d042dc5d643a91e6f80648fc"
dependencies = [
"xmlparser",
]
[[package]]
name = "aws-types"
-version = "1.3.11"
+version = "1.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d980627d2dd7bfc32a3c025685a033eeab8d365cc840c631ef59d1b8f428164"
+checksum = "3873f8deed8927ce8d04487630dc9ff73193bab64742a61d050e57a68dec4125"
dependencies = [
"aws-credential-types",
"aws-smithy-async",
@@ -557,16 +554,16 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1"
dependencies = [
- "getrandom 0.2.17",
+ "getrandom 0.2.15",
"instant",
- "rand",
+ "rand 0.8.5",
]
[[package]]
name = "backtrace"
-version = "0.3.76"
+version = "0.3.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6"
+checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"
dependencies = [
"addr2line",
"cfg-if",
@@ -574,7 +571,7 @@ dependencies = [
"miniz_oxide",
"object",
"rustc-demangle",
- "windows-link",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -607,9 +604,9 @@ dependencies = [
[[package]]
name = "base64ct"
-version = "1.8.3"
+version = "1.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06"
+checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3"
[[package]]
name = "bincode"
@@ -628,9 +625,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.10.0"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
+checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
[[package]]
name = "blake2"
@@ -652,15 +649,15 @@ dependencies = [
[[package]]
name = "bumpalo"
-version = "3.19.1"
+version = "3.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510"
+checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
[[package]]
name = "bytemuck"
-version = "1.24.0"
+version = "1.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4"
+checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540"
[[package]]
name = "byteorder"
@@ -670,9 +667,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
-version = "1.11.0"
+version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3"
+checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
[[package]]
name = "bytes-utils"
@@ -686,9 +683,9 @@ dependencies = [
[[package]]
name = "bytesize"
-version = "1.3.3"
+version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e93abca9e28e0a1b9877922aacb20576e05d4679ffa78c3d6dc22a26a216659"
+checksum = "2d2c12f985c78475a6b8d629afd0c360260ef34cfef52efccdcfd31972f81c2e"
[[package]]
name = "byteview"
@@ -698,11 +695,10 @@ checksum = "6236364b88b9b6d0bc181ba374cf1ab55ba3ef97a1cb6f8cddad48a273767fb5"
[[package]]
name = "cc"
-version = "1.2.54"
+version = "1.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583"
+checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c"
dependencies = [
- "find-msvc-tools",
"jobserver",
"libc",
"shlex",
@@ -710,9 +706,9 @@ dependencies = [
[[package]]
name = "cfg-if"
-version = "1.0.4"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "cfg_aliases"
@@ -728,10 +724,11 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]]
name = "chrono"
-version = "0.4.43"
+version = "0.4.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118"
+checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c"
dependencies = [
+ "android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
@@ -763,9 +760,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.5.54"
+version = "4.5.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394"
+checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83"
dependencies = [
"clap_builder",
"clap_derive",
@@ -773,9 +770,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.5.54"
+version = "4.5.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00"
+checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8"
dependencies = [
"anstream",
"anstyle",
@@ -785,27 +782,27 @@ dependencies = [
[[package]]
name = "clap_derive"
-version = "4.5.49"
+version = "4.5.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671"
+checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7"
dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
name = "clap_lex"
-version = "0.7.7"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32"
+checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
[[package]]
name = "colorchoice"
-version = "1.0.4"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
+checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]]
name = "compare"
@@ -813,23 +810,6 @@ version = "0.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea0095f6103c2a8b44acd6fd15960c801dafebf02e21940360833e0673f48ba7"
-[[package]]
-name = "compression-codecs"
-version = "0.4.36"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00828ba6fd27b45a448e57dbfe84f1029d4c9f26b368157e9a448a5f49a2ec2a"
-dependencies = [
- "compression-core",
- "zstd",
- "zstd-safe",
-]
-
-[[package]]
-name = "compression-core"
-version = "0.4.31"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75984efb6ed102a0d42db99afb6c1948f0380d1d91808d5529916e6c08b49d8d"
-
[[package]]
name = "core-foundation"
version = "0.9.4"
@@ -840,16 +820,6 @@ dependencies = [
"libc",
]
-[[package]]
-name = "core-foundation"
-version = "0.10.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6"
-dependencies = [
- "core-foundation-sys",
- "libc",
-]
-
[[package]]
name = "core-foundation-sys"
version = "0.8.7"
@@ -867,9 +837,9 @@ dependencies = [
[[package]]
name = "crc"
-version = "3.3.0"
+version = "3.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675"
+checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
dependencies = [
"crc-catalog",
]
@@ -882,14 +852,15 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
[[package]]
name = "crc-fast"
-version = "1.9.0"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2fd92aca2c6001b1bf5ba0ff84ee74ec8501b52bbef0cac80bf25a6c1d87a83d"
+checksum = "6ddc2d09feefeee8bd78101665bd8645637828fa9317f9f292496dbbd8c65ff3"
dependencies = [
"crc",
"digest",
+ "rand 0.9.1",
+ "regex",
"rustversion",
- "spin 0.10.0",
]
[[package]]
@@ -903,18 +874,27 @@ dependencies = [
[[package]]
name = "crc32fast"
-version = "1.5.0"
+version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
+checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
dependencies = [
"cfg-if",
]
[[package]]
-name = "crossbeam-channel"
-version = "0.5.15"
+name = "crc64fast-nvme"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2"
+checksum = "4955638f00a809894c947f85a024020a20815b65a5eea633798ea7924edab2b3"
+dependencies = [
+ "crc",
+]
+
+[[package]]
+name = "crossbeam-channel"
+version = "0.5.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471"
dependencies = [
"crossbeam-utils",
]
@@ -955,12 +935,12 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "crypto-common"
-version = "0.1.7"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
"generic-array",
- "rand_core",
+ "rand_core 0.6.4",
"typenum",
]
@@ -975,9 +955,9 @@ dependencies = [
[[package]]
name = "darling"
-version = "0.20.11"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee"
+checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
dependencies = [
"darling_core",
"darling_macro",
@@ -985,27 +965,27 @@ dependencies = [
[[package]]
name = "darling_core"
-version = "0.20.11"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e"
+checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
name = "darling_macro"
-version = "0.20.11"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
+checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [
"darling_core",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
@@ -1029,14 +1009,14 @@ dependencies = [
"hashbrown 0.14.5",
"lock_api",
"once_cell",
- "parking_lot_core",
+ "parking_lot_core 0.9.10",
]
[[package]]
name = "deranged"
-version = "0.5.5"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587"
+checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e"
dependencies = [
"powerfmt",
]
@@ -1071,7 +1051,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
@@ -1082,9 +1062,9 @@ checksum = "c0d05e1c0dbad51b52c38bda7adceef61b9efc2baf04acfe8726a8c4630a6f57"
[[package]]
name = "dyn-clone"
-version = "1.0.20"
+version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
+checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005"
[[package]]
name = "either"
@@ -1110,7 +1090,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
@@ -1134,12 +1114,12 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]
name = "errno"
-version = "0.3.14"
+version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
+checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
dependencies = [
"libc",
- "windows-sys 0.61.2",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -1160,12 +1140,6 @@ version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
-[[package]]
-name = "find-msvc-tools"
-version = "0.1.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db"
-
[[package]]
name = "fixedbitset"
version = "0.4.2"
@@ -1201,17 +1175,11 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
-[[package]]
-name = "foldhash"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
-
[[package]]
name = "form_urlencoded"
-version = "1.2.2"
+version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
+checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
dependencies = [
"percent-encoding",
]
@@ -1276,7 +1244,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
@@ -1311,7 +1279,7 @@ dependencies = [
[[package]]
name = "garage"
-version = "1.3.1"
+version = "2.1.0"
dependencies = [
"assert-json-diff",
"async-trait",
@@ -1322,7 +1290,7 @@ dependencies = [
"bytes",
"bytesize",
"chrono",
- "crc32fast",
+ "crc-fast",
"format_table",
"futures",
"garage_api_admin",
@@ -1340,9 +1308,9 @@ dependencies = [
"git-version",
"hex",
"hmac",
- "http 1.4.0",
+ "http 1.3.1",
"http-body-util",
- "hyper 1.8.1",
+ "hyper 1.6.0",
"hyper-util",
"k2v-client",
"kuska-sodiumoxide",
@@ -1351,7 +1319,6 @@ dependencies = [
"opentelemetry-otlp",
"opentelemetry-prometheus",
"parse_duration",
- "serde",
"serde_json",
"sha1",
"sha2",
@@ -1363,43 +1330,49 @@ dependencies = [
"tracing",
"tracing-journald",
"tracing-subscriber",
+ "utoipa",
]
[[package]]
name = "garage_api_admin"
-version = "1.3.1"
+version = "2.1.0"
dependencies = [
"argon2",
"async-trait",
+ "bytesize",
+ "chrono",
+ "format_table",
"futures",
"garage_api_common",
+ "garage_block",
"garage_model",
"garage_rpc",
"garage_table",
"garage_util",
"hex",
- "http 1.4.0",
- "hyper 1.8.1",
+ "http 1.3.1",
+ "hyper 1.6.0",
"opentelemetry",
"opentelemetry-prometheus",
+ "paste",
"prometheus",
"serde",
"serde_json",
- "thiserror 2.0.18",
+ "thiserror 2.0.12",
"tokio",
"tracing",
"url",
+ "utoipa",
]
[[package]]
name = "garage_api_common"
-version = "1.3.1"
+version = "2.1.0"
dependencies = [
"base64 0.21.7",
"bytes",
"chrono",
- "crc32c",
- "crc32fast",
+ "crc-fast",
"crypto-common",
"futures",
"garage_model",
@@ -1407,9 +1380,9 @@ dependencies = [
"garage_util",
"hex",
"hmac",
- "http 1.4.0",
+ "http 1.3.1",
"http-body-util",
- "hyper 1.8.1",
+ "hyper 1.6.0",
"hyper-util",
"md-5",
"nom",
@@ -1419,7 +1392,7 @@ dependencies = [
"serde_json",
"sha1",
"sha2",
- "thiserror 2.0.18",
+ "thiserror 2.0.12",
"tokio",
"tracing",
"url",
@@ -1427,7 +1400,7 @@ dependencies = [
[[package]]
name = "garage_api_k2v"
-version = "1.3.1"
+version = "2.1.0"
dependencies = [
"base64 0.21.7",
"futures",
@@ -1435,14 +1408,14 @@ dependencies = [
"garage_model",
"garage_table",
"garage_util",
- "http 1.4.0",
+ "http 1.3.1",
"http-body-util",
- "hyper 1.8.1",
+ "hyper 1.6.0",
"opentelemetry",
"percent-encoding",
"serde",
"serde_json",
- "thiserror 2.0.18",
+ "thiserror 2.0.12",
"tokio",
"tracing",
"url",
@@ -1450,15 +1423,14 @@ dependencies = [
[[package]]
name = "garage_api_s3"
-version = "1.3.1"
+version = "2.1.0"
dependencies = [
"aes-gcm",
"async-compression",
"base64 0.21.7",
"bytes",
"chrono",
- "crc32c",
- "crc32fast",
+ "crc-fast",
"form_urlencoded",
"futures",
"garage_api_common",
@@ -1469,11 +1441,12 @@ dependencies = [
"garage_table",
"garage_util",
"hex",
- "http 1.4.0",
+ "hmac",
+ "http 1.3.1",
"http-body-util",
"http-range",
"httpdate",
- "hyper 1.8.1",
+ "hyper 1.6.0",
"md-5",
"multer",
"opentelemetry",
@@ -1485,17 +1458,17 @@ dependencies = [
"serde_json",
"sha1",
"sha2",
- "thiserror 2.0.18",
+ "thiserror 2.0.12",
"tokio",
"tokio-stream",
- "tokio-util 0.7.18",
+ "tokio-util 0.7.14",
"tracing",
"url",
]
[[package]]
name = "garage_block"
-version = "1.3.1"
+version = "2.1.0"
dependencies = [
"arc-swap",
"async-compression",
@@ -1506,37 +1479,37 @@ dependencies = [
"garage_db",
"garage_net",
"garage_rpc",
- "garage_table",
"garage_util",
"hex",
"opentelemetry",
- "rand",
+ "rand 0.8.5",
"serde",
"tokio",
- "tokio-util 0.7.18",
+ "tokio-util 0.7.14",
"tracing",
"zstd",
]
[[package]]
name = "garage_db"
-version = "1.3.1"
+version = "2.1.0"
dependencies = [
"fjall",
"heed",
"mktemp",
- "parking_lot",
+ "parking_lot 0.12.3",
"r2d2",
"r2d2_sqlite",
"rusqlite",
- "thiserror 2.0.18",
+ "thiserror 2.0.12",
"tracing",
]
[[package]]
name = "garage_model"
-version = "1.3.1"
+version = "2.1.0"
dependencies = [
+ "argon2",
"async-trait",
"base64 0.21.7",
"blake2",
@@ -1549,12 +1522,12 @@ dependencies = [
"garage_table",
"garage_util",
"hex",
- "http 1.4.0",
+ "http 1.3.1",
"parse_duration",
- "rand",
+ "rand 0.8.5",
"serde",
"serde_bytes",
- "thiserror 2.0.18",
+ "thiserror 2.0.12",
"tokio",
"tracing",
"zstd",
@@ -1562,7 +1535,7 @@ dependencies = [
[[package]]
name = "garage_net"
-version = "1.3.1"
+version = "2.1.0"
dependencies = [
"arc-swap",
"bytes",
@@ -1576,18 +1549,18 @@ dependencies = [
"opentelemetry-contrib",
"pin-project",
"pretty_env_logger",
- "rand",
+ "rand 0.8.5",
"rmp-serde",
"serde",
- "thiserror 2.0.18",
+ "thiserror 2.0.12",
"tokio",
"tokio-stream",
- "tokio-util 0.7.18",
+ "tokio-util 0.7.14",
]
[[package]]
name = "garage_rpc"
-version = "1.3.1"
+version = "2.1.0"
dependencies = [
"arc-swap",
"async-trait",
@@ -1606,20 +1579,20 @@ dependencies = [
"nix",
"opentelemetry",
"pnet_datalink",
- "rand",
+ "rand 0.8.5",
"reqwest",
"schemars",
"serde",
"serde_bytes",
"serde_json",
- "thiserror 2.0.18",
+ "thiserror 2.0.12",
"tokio",
"tracing",
]
[[package]]
name = "garage_table"
-version = "1.3.1"
+version = "2.1.0"
dependencies = [
"arc-swap",
"async-trait",
@@ -1631,7 +1604,7 @@ dependencies = [
"hex",
"hexdump",
"opentelemetry",
- "rand",
+ "rand 0.8.5",
"serde",
"serde_bytes",
"tokio",
@@ -1640,7 +1613,7 @@ dependencies = [
[[package]]
name = "garage_util"
-version = "1.3.1"
+version = "2.1.0"
dependencies = [
"arc-swap",
"async-trait",
@@ -1652,18 +1625,18 @@ dependencies = [
"garage_net",
"hex",
"hexdump",
- "http 1.4.0",
- "hyper 1.8.1",
+ "http 1.3.1",
+ "hyper 1.6.0",
"lazy_static",
"mktemp",
"opentelemetry",
- "rand",
+ "rand 0.8.5",
"rmp-serde",
"rustc_version",
"serde",
"serde_json",
"sha2",
- "thiserror 2.0.18",
+ "thiserror 2.0.12",
"tokio",
"toml",
"tracing",
@@ -1672,19 +1645,19 @@ dependencies = [
[[package]]
name = "garage_web"
-version = "1.3.1"
+version = "2.1.0"
dependencies = [
"garage_api_common",
"garage_api_s3",
"garage_model",
"garage_table",
"garage_util",
- "http 1.4.0",
+ "http 1.3.1",
"http-body-util",
- "hyper 1.8.1",
+ "hyper 1.6.0",
"opentelemetry",
"percent-encoding",
- "thiserror 2.0.18",
+ "thiserror 2.0.12",
"tokio",
"tracing",
]
@@ -1711,25 +1684,25 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.17"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
+checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
"libc",
- "wasi",
+ "wasi 0.11.0+wasi-snapshot-preview1",
]
[[package]]
name = "getrandom"
-version = "0.3.4"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
+checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0"
dependencies = [
"cfg-if",
"libc",
"r-efi",
- "wasip2",
+ "wasi 0.14.2+wasi-0.2.4",
]
[[package]]
@@ -1744,9 +1717,9 @@ dependencies = [
[[package]]
name = "gimli"
-version = "0.32.3"
+version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"
+checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
[[package]]
name = "git-version"
@@ -1765,7 +1738,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
@@ -1776,9 +1749,9 @@ checksum = "17e2ac29387b1aa07a1e448f7bb4f35b500787971e965b02842b900afa5c8f6f"
[[package]]
name = "h2"
-version = "0.3.27"
+version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d"
+checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8"
dependencies = [
"bytes",
"fnv",
@@ -1786,29 +1759,29 @@ dependencies = [
"futures-sink",
"futures-util",
"http 0.2.12",
- "indexmap 2.13.0",
+ "indexmap 2.8.0",
"slab",
"tokio",
- "tokio-util 0.7.18",
+ "tokio-util 0.7.14",
"tracing",
]
[[package]]
name = "h2"
-version = "0.4.13"
+version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54"
+checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2"
dependencies = [
"atomic-waker",
"bytes",
"fnv",
"futures-core",
"futures-sink",
- "http 1.4.0",
- "indexmap 2.13.0",
+ "http 1.3.1",
+ "indexmap 2.8.0",
"slab",
"tokio",
- "tokio-util 0.7.18",
+ "tokio-util 0.7.14",
"tracing",
]
@@ -1830,22 +1803,13 @@ dependencies = [
[[package]]
name = "hashbrown"
-version = "0.15.5"
+version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
-dependencies = [
- "foldhash 0.1.5",
-]
-
-[[package]]
-name = "hashbrown"
-version = "0.16.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
+checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
dependencies = [
"allocator-api2",
"equivalent",
- "foldhash 0.2.0",
+ "foldhash",
]
[[package]]
@@ -1854,7 +1818,7 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1"
dependencies = [
- "hashbrown 0.15.5",
+ "hashbrown 0.15.2",
]
[[package]]
@@ -1912,9 +1876,15 @@ dependencies = [
[[package]]
name = "hermit-abi"
-version = "0.5.2"
+version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
+checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
+
+[[package]]
+name = "hermit-abi"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e"
[[package]]
name = "hex"
@@ -1942,11 +1912,11 @@ dependencies = [
[[package]]
name = "home"
-version = "0.5.12"
+version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d"
+checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -1962,11 +1932,12 @@ dependencies = [
[[package]]
name = "http"
-version = "1.4.0"
+version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a"
+checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565"
dependencies = [
"bytes",
+ "fnv",
"itoa",
]
@@ -1988,7 +1959,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
dependencies = [
"bytes",
- "http 1.4.0",
+ "http 1.3.1",
]
[[package]]
@@ -1999,7 +1970,7 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a"
dependencies = [
"bytes",
"futures-core",
- "http 1.4.0",
+ "http 1.3.1",
"http-body 1.0.1",
"pin-project-lite",
]
@@ -2030,9 +2001,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
[[package]]
name = "humantime"
-version = "2.3.0"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424"
+checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f"
[[package]]
name = "hyper"
@@ -2044,14 +2015,14 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-util",
- "h2 0.3.27",
+ "h2 0.3.26",
"http 0.2.12",
"http-body 0.4.6",
"httparse",
"httpdate",
"itoa",
"pin-project-lite",
- "socket2 0.5.10",
+ "socket2",
"tokio",
"tower-service",
"tracing",
@@ -2060,22 +2031,20 @@ dependencies = [
[[package]]
name = "hyper"
-version = "1.8.1"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11"
+checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80"
dependencies = [
- "atomic-waker",
"bytes",
"futures-channel",
- "futures-core",
- "h2 0.4.13",
- "http 1.4.0",
+ "futures-util",
+ "h2 0.4.8",
+ "http 1.3.1",
"http-body 1.0.1",
"httparse",
"httpdate",
"itoa",
"pin-project-lite",
- "pin-utils",
"smallvec",
"tokio",
"want",
@@ -2104,8 +2073,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c"
dependencies = [
"futures-util",
- "http 1.4.0",
- "hyper 1.8.1",
+ "http 1.3.1",
+ "hyper 1.6.0",
"hyper-util",
"rustls 0.22.4",
"rustls-native-certs 0.7.3",
@@ -2129,42 +2098,33 @@ dependencies = [
[[package]]
name = "hyper-util"
-version = "0.1.19"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f"
+checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"
dependencies = [
- "base64 0.22.1",
"bytes",
"futures-channel",
- "futures-core",
"futures-util",
- "http 1.4.0",
+ "http 1.3.1",
"http-body 1.0.1",
- "hyper 1.8.1",
- "ipnet",
- "libc",
- "percent-encoding",
+ "hyper 1.6.0",
"pin-project-lite",
- "socket2 0.6.2",
- "system-configuration 0.6.1",
+ "socket2",
"tokio",
- "tower-layer",
"tower-service",
"tracing",
- "windows-registry",
]
[[package]]
name = "iana-time-zone"
-version = "0.1.64"
+version = "0.1.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb"
+checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
- "log",
"wasm-bindgen",
"windows-core",
]
@@ -2180,22 +2140,21 @@ dependencies = [
[[package]]
name = "icu_collections"
-version = "2.1.1"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43"
+checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526"
dependencies = [
"displaydoc",
- "potential_utf",
"yoke",
"zerofrom",
"zerovec",
]
[[package]]
-name = "icu_locale_core"
-version = "2.1.1"
+name = "icu_locid"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6"
+checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637"
dependencies = [
"displaydoc",
"litemap",
@@ -2205,60 +2164,98 @@ dependencies = [
]
[[package]]
-name = "icu_normalizer"
-version = "2.1.1"
+name = "icu_locid_transform"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599"
+checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e"
dependencies = [
+ "displaydoc",
+ "icu_locid",
+ "icu_locid_transform_data",
+ "icu_provider",
+ "tinystr",
+ "zerovec",
+]
+
+[[package]]
+name = "icu_locid_transform_data"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e"
+
+[[package]]
+name = "icu_normalizer"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f"
+dependencies = [
+ "displaydoc",
"icu_collections",
"icu_normalizer_data",
"icu_properties",
"icu_provider",
"smallvec",
+ "utf16_iter",
+ "utf8_iter",
+ "write16",
"zerovec",
]
[[package]]
name = "icu_normalizer_data"
-version = "2.1.1"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a"
+checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516"
[[package]]
name = "icu_properties"
-version = "2.1.2"
+version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec"
+checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5"
dependencies = [
+ "displaydoc",
"icu_collections",
- "icu_locale_core",
+ "icu_locid_transform",
"icu_properties_data",
"icu_provider",
- "zerotrie",
+ "tinystr",
"zerovec",
]
[[package]]
name = "icu_properties_data"
-version = "2.1.2"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af"
+checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569"
[[package]]
name = "icu_provider"
-version = "2.1.1"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614"
+checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9"
dependencies = [
"displaydoc",
- "icu_locale_core",
+ "icu_locid",
+ "icu_provider_macros",
+ "stable_deref_trait",
+ "tinystr",
"writeable",
"yoke",
"zerofrom",
- "zerotrie",
"zerovec",
]
+[[package]]
+name = "icu_provider_macros"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.100",
+]
+
[[package]]
name = "ident_case"
version = "1.0.1"
@@ -2267,9 +2264,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]]
name = "idna"
-version = "1.1.0"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
+checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e"
dependencies = [
"idna_adapter",
"smallvec",
@@ -2278,9 +2275,9 @@ dependencies = [
[[package]]
name = "idna_adapter"
-version = "1.2.1"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344"
+checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71"
dependencies = [
"icu_normalizer",
"icu_properties",
@@ -2298,12 +2295,13 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "2.13.0"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
+checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058"
dependencies = [
"equivalent",
- "hashbrown 0.16.1",
+ "hashbrown 0.15.2",
+ "serde",
]
[[package]]
@@ -2350,20 +2348,20 @@ dependencies = [
[[package]]
name = "is-terminal"
-version = "0.4.17"
+version = "0.4.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46"
+checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9"
dependencies = [
- "hermit-abi",
+ "hermit-abi 0.5.0",
"libc",
- "windows-sys 0.61.2",
+ "windows-sys 0.59.0",
]
[[package]]
name = "is_terminal_polyfill"
-version = "1.70.2"
+version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
+checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "itertools"
@@ -2385,25 +2383,24 @@ dependencies = [
[[package]]
name = "itoa"
-version = "1.0.17"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
+checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
[[package]]
name = "jobserver"
-version = "0.1.34"
+version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"
+checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
dependencies = [
- "getrandom 0.3.4",
"libc",
]
[[package]]
name = "js-sys"
-version = "0.3.85"
+version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3"
+checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
dependencies = [
"once_cell",
"wasm-bindgen",
@@ -2440,12 +2437,12 @@ dependencies = [
"aws-sdk-config",
"aws-sigv4",
"base64 0.21.7",
- "clap 4.5.54",
+ "clap 4.5.32",
"format_table",
"hex",
- "http 1.4.0",
+ "http 1.3.1",
"http-body-util",
- "hyper 1.8.1",
+ "hyper 1.6.0",
"hyper-rustls 0.26.0",
"hyper-util",
"log",
@@ -2453,7 +2450,7 @@ dependencies = [
"serde",
"serde_json",
"sha2",
- "thiserror 2.0.18",
+ "thiserror 2.0.12",
"tokio",
"tracing-subscriber",
]
@@ -2514,7 +2511,7 @@ dependencies = [
"serde_yaml",
"thiserror 1.0.69",
"tokio",
- "tokio-util 0.7.18",
+ "tokio-util 0.7.14",
"tower",
"tower-http",
"tracing",
@@ -2548,7 +2545,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde_json",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
@@ -2566,14 +2563,14 @@ dependencies = [
"json-patch",
"k8s-openapi",
"kube-client",
- "parking_lot",
+ "parking_lot 0.12.3",
"pin-project",
"serde",
"serde_json",
"smallvec",
"thiserror 1.0.69",
"tokio",
- "tokio-util 0.7.18",
+ "tokio-util 0.7.14",
"tracing",
]
@@ -2609,9 +2606,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
-version = "0.2.180"
+version = "0.2.171"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
+checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
[[package]]
name = "libsodium-sys"
@@ -2644,15 +2641,15 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
[[package]]
name = "linux-raw-sys"
-version = "0.11.0"
+version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039"
+checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413"
[[package]]
name = "litemap"
-version = "0.8.1"
+version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
+checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856"
[[package]]
name = "lmdb-rkv-sys"
@@ -2667,33 +2664,34 @@ dependencies = [
[[package]]
name = "lock_api"
-version = "0.4.14"
+version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
+checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
dependencies = [
+ "autocfg",
"scopeguard",
]
[[package]]
name = "log"
-version = "0.4.29"
+version = "0.4.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
+checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e"
[[package]]
name = "lru"
-version = "0.16.3"
+version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593"
+checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
dependencies = [
- "hashbrown 0.16.1",
+ "hashbrown 0.15.2",
]
[[package]]
name = "lsm-tree"
-version = "2.10.4"
+version = "2.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "799399117a2bfb37660e08be33f470958babb98386b04185288d829df362ea15"
+checksum = "ab73c02eadb3dc12c0024e5b61d6284e6d59064e67e74fbad77856caa56f62c7"
dependencies = [
"byteorder",
"crossbeam-skiplist",
@@ -2715,17 +2713,17 @@ dependencies = [
[[package]]
name = "lz4_flex"
-version = "0.11.5"
+version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08ab2867e3eeeca90e844d1940eab391c9dc5228783db2ed999acbc0a9ed375a"
+checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5"
[[package]]
name = "matchers"
-version = "0.2.0"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9"
+checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
dependencies = [
- "regex-automata",
+ "regex-automata 0.1.10",
]
[[package]]
@@ -2740,9 +2738,9 @@ dependencies = [
[[package]]
name = "memchr"
-version = "2.7.6"
+version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "mime"
@@ -2758,22 +2756,22 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "miniz_oxide"
-version = "0.8.9"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
+checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5"
dependencies = [
"adler2",
]
[[package]]
name = "mio"
-version = "1.1.1"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc"
+checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd"
dependencies = [
"libc",
- "wasi",
- "windows-sys 0.61.2",
+ "wasi 0.11.0+wasi-snapshot-preview1",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -2794,11 +2792,11 @@ dependencies = [
"bytes",
"encoding_rs",
"futures-util",
- "http 1.4.0",
+ "http 1.3.1",
"httparse",
"memchr",
"mime",
- "spin 0.9.8",
+ "spin",
"version_check",
]
@@ -2814,7 +2812,7 @@ version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
dependencies = [
- "bitflags 2.10.0",
+ "bitflags 2.9.0",
"cfg-if",
"cfg_aliases 0.2.1",
"libc",
@@ -2838,11 +2836,12 @@ dependencies = [
[[package]]
name = "nu-ansi-term"
-version = "0.50.3"
+version = "0.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
+checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
dependencies = [
- "windows-sys 0.61.2",
+ "overload",
+ "winapi",
]
[[package]]
@@ -2882,9 +2881,9 @@ dependencies = [
[[package]]
name = "num-conv"
-version = "0.2.0"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
[[package]]
name = "num-integer"
@@ -2929,34 +2928,28 @@ dependencies = [
[[package]]
name = "num_cpus"
-version = "1.17.0"
+version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b"
+checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
dependencies = [
- "hermit-abi",
+ "hermit-abi 0.3.9",
"libc",
]
[[package]]
name = "object"
-version = "0.37.3"
+version = "0.36.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"
+checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
dependencies = [
"memchr",
]
[[package]]
name = "once_cell"
-version = "1.21.3"
+version = "1.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
-
-[[package]]
-name = "once_cell_polyfill"
-version = "1.70.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
+checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc"
[[package]]
name = "opaque-debug"
@@ -2970,12 +2963,6 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
-[[package]]
-name = "openssl-probe"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
-
[[package]]
name = "opentelemetry"
version = "0.17.0"
@@ -2993,7 +2980,7 @@ dependencies = [
"lazy_static",
"percent-encoding",
"pin-project",
- "rand",
+ "rand 0.8.5",
"thiserror 1.0.69",
"tokio",
"tokio-stream",
@@ -3053,6 +3040,12 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e"
+[[package]]
+name = "overload"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
+
[[package]]
name = "page_size"
version = "0.4.2"
@@ -3065,25 +3058,50 @@ dependencies = [
[[package]]
name = "parking_lot"
-version = "0.12.5"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
+checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
+dependencies = [
+ "instant",
+ "lock_api",
+ "parking_lot_core 0.8.6",
+]
+
+[[package]]
+name = "parking_lot"
+version = "0.12.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
dependencies = [
"lock_api",
- "parking_lot_core",
+ "parking_lot_core 0.9.10",
]
[[package]]
name = "parking_lot_core"
-version = "0.9.12"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
+checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc"
+dependencies = [
+ "cfg-if",
+ "instant",
+ "libc",
+ "redox_syscall 0.2.16",
+ "smallvec",
+ "winapi",
+]
+
+[[package]]
+name = "parking_lot_core"
+version = "0.9.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
dependencies = [
"cfg-if",
"libc",
- "redox_syscall",
+ "redox_syscall 0.5.10",
"smallvec",
- "windows-link",
+ "windows-targets 0.52.6",
]
[[package]]
@@ -3104,10 +3122,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166"
dependencies = [
"base64ct",
- "rand_core",
+ "rand_core 0.6.4",
"subtle",
]
+[[package]]
+name = "paste"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
+
[[package]]
name = "path-absolutize"
version = "3.1.1"
@@ -3128,35 +3152,36 @@ dependencies = [
[[package]]
name = "pem"
-version = "3.0.6"
+version = "3.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be"
+checksum = "38af38e8470ac9dee3ce1bae1af9c1671fffc44ddfd8bd1d0a3445bf349a8ef3"
dependencies = [
"base64 0.22.1",
- "serde_core",
+ "serde",
]
[[package]]
name = "percent-encoding"
-version = "2.3.2"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
+checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
[[package]]
name = "pest"
-version = "2.8.5"
+version = "2.7.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c9eb05c21a464ea704b53158d358a31e6425db2f63a1a7312268b05fe2b75f7"
+checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc"
dependencies = [
"memchr",
+ "thiserror 2.0.12",
"ucd-trie",
]
[[package]]
name = "pest_derive"
-version = "2.8.5"
+version = "2.7.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68f9dbced329c441fa79d80472764b1a2c7e57123553b8519b36663a2fb234ed"
+checksum = "816518421cfc6887a0d62bf441b6ffb4536fcc926395a69e1a85852d4363f57e"
dependencies = [
"pest",
"pest_generator",
@@ -3164,23 +3189,24 @@ dependencies = [
[[package]]
name = "pest_generator"
-version = "2.8.5"
+version = "2.7.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3bb96d5051a78f44f43c8f712d8e810adb0ebf923fc9ed2655a7f66f63ba8ee5"
+checksum = "7d1396fd3a870fc7838768d171b4616d5c91f6cc25e377b673d714567d99377b"
dependencies = [
"pest",
"pest_meta",
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
name = "pest_meta"
-version = "2.8.5"
+version = "2.7.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "602113b5b5e8621770cfd490cfd90b9f84ab29bd2b0e49ad83eb6d186cef2365"
+checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea"
dependencies = [
+ "once_cell",
"pest",
"sha2",
]
@@ -3192,7 +3218,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db"
dependencies = [
"fixedbitset",
- "indexmap 2.13.0",
+ "indexmap 2.8.0",
]
[[package]]
@@ -3212,7 +3238,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
@@ -3277,15 +3303,6 @@ dependencies = [
"universal-hash",
]
-[[package]]
-name = "potential_utf"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77"
-dependencies = [
- "zerovec",
-]
-
[[package]]
name = "powerfmt"
version = "0.2.0"
@@ -3298,7 +3315,7 @@ version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
dependencies = [
- "zerocopy",
+ "zerocopy 0.8.23",
]
[[package]]
@@ -3337,9 +3354,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.106"
+version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
+checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
dependencies = [
"unicode-ident",
]
@@ -3354,7 +3371,7 @@ dependencies = [
"fnv",
"lazy_static",
"memchr",
- "parking_lot",
+ "parking_lot 0.12.3",
"protobuf",
"thiserror 1.0.69",
]
@@ -3430,28 +3447,28 @@ dependencies = [
[[package]]
name = "quick_cache"
-version = "0.6.18"
+version = "0.6.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ada44a88ef953a3294f6eb55d2007ba44646015e18613d2f213016379203ef3"
+checksum = "9ad6644cb07b7f3488b9f3d2fde3b4c0a7fa367cafefb39dff93a659f76eb786"
dependencies = [
"equivalent",
- "hashbrown 0.16.1",
+ "hashbrown 0.15.2",
]
[[package]]
name = "quote"
-version = "1.0.44"
+version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
+checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
dependencies = [
"proc-macro2",
]
[[package]]
name = "r-efi"
-version = "5.3.0"
+version = "5.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
+checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5"
[[package]]
name = "r2d2"
@@ -3460,7 +3477,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93"
dependencies = [
"log",
- "parking_lot",
+ "parking_lot 0.12.3",
"scheduled-thread-pool",
]
@@ -3482,8 +3499,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
- "rand_chacha",
- "rand_core",
+ "rand_chacha 0.3.1",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97"
+dependencies = [
+ "rand_chacha 0.9.0",
+ "rand_core 0.9.3",
]
[[package]]
@@ -3493,7 +3520,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
- "rand_core",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
+dependencies = [
+ "ppv-lite86",
+ "rand_core 0.9.3",
]
[[package]]
@@ -3502,16 +3539,34 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
- "getrandom 0.2.17",
+ "getrandom 0.2.15",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
+dependencies = [
+ "getrandom 0.3.2",
]
[[package]]
name = "redox_syscall"
-version = "0.5.18"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
+checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
dependencies = [
- "bitflags 2.10.0",
+ "bitflags 1.3.2",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.5.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1"
+dependencies = [
+ "bitflags 2.9.0",
]
[[package]]
@@ -3522,8 +3577,17 @@ checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
dependencies = [
"aho-corasick",
"memchr",
- "regex-automata",
- "regex-syntax",
+ "regex-automata 0.4.13",
+ "regex-syntax 0.8.5",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
+dependencies = [
+ "regex-syntax 0.6.29",
]
[[package]]
@@ -3534,20 +3598,26 @@ checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
dependencies = [
"aho-corasick",
"memchr",
- "regex-syntax",
+ "regex-syntax 0.8.5",
]
[[package]]
name = "regex-lite"
-version = "0.1.8"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d942b98df5e658f56f20d592c7f868833fe38115e65c33003d8cd224b0155da"
+checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a"
[[package]]
name = "regex-syntax"
-version = "0.8.8"
+version = "0.6.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
+checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "reqwest"
@@ -3560,7 +3630,7 @@ dependencies = [
"encoding_rs",
"futures-core",
"futures-util",
- "h2 0.3.27",
+ "h2 0.3.26",
"http 0.2.12",
"http-body 0.4.6",
"hyper 0.14.32",
@@ -3578,7 +3648,7 @@ dependencies = [
"serde_json",
"serde_urlencoded",
"sync_wrapper",
- "system-configuration 0.5.1",
+ "system-configuration",
"tokio",
"tokio-rustls 0.24.1",
"tower-service",
@@ -3597,7 +3667,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
dependencies = [
"cc",
"cfg-if",
- "getrandom 0.2.17",
+ "getrandom 0.2.15",
"libc",
"untrusted",
"windows-sys 0.52.0",
@@ -3605,19 +3675,22 @@ dependencies = [
[[package]]
name = "rmp"
-version = "0.8.15"
+version = "0.8.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ba8be72d372b2c9b35542551678538b562e7cf86c3315773cae48dfbfe7790c"
+checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4"
dependencies = [
+ "byteorder",
"num-traits",
+ "paste",
]
[[package]]
name = "rmp-serde"
-version = "1.3.1"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72f81bee8c8ef9b577d1681a70ebbc962c232461e397b22c208c43c04b67a155"
+checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db"
dependencies = [
+ "byteorder",
"rmp",
"serde",
]
@@ -3634,7 +3707,7 @@ version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "165ca6e57b20e1351573e3729b958bc62f0e48025386970b6e4d29e7a7e71f3f"
dependencies = [
- "bitflags 2.10.0",
+ "bitflags 2.9.0",
"fallible-iterator",
"fallible-streaming-iterator",
"hashlink",
@@ -3644,9 +3717,9 @@ dependencies = [
[[package]]
name = "rustc-demangle"
-version = "0.1.27"
+version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d"
+checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
[[package]]
name = "rustc-hash"
@@ -3669,7 +3742,7 @@ version = "0.38.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
dependencies = [
- "bitflags 2.10.0",
+ "bitflags 2.9.0",
"errno",
"libc",
"linux-raw-sys 0.4.15",
@@ -3678,15 +3751,15 @@ dependencies = [
[[package]]
name = "rustix"
-version = "1.1.3"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34"
+checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96"
dependencies = [
- "bitflags 2.10.0",
+ "bitflags 2.9.0",
"errno",
"libc",
- "linux-raw-sys 0.11.0",
- "windows-sys 0.61.2",
+ "linux-raw-sys 0.9.3",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -3720,10 +3793,10 @@ version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"
dependencies = [
- "openssl-probe 0.1.6",
+ "openssl-probe",
"rustls-pemfile 1.0.4",
"schannel",
- "security-framework 2.11.1",
+ "security-framework",
]
[[package]]
@@ -3732,23 +3805,11 @@ version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5"
dependencies = [
- "openssl-probe 0.1.6",
+ "openssl-probe",
"rustls-pemfile 2.2.0",
"rustls-pki-types",
"schannel",
- "security-framework 2.11.1",
-]
-
-[[package]]
-name = "rustls-native-certs"
-version = "0.8.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63"
-dependencies = [
- "openssl-probe 0.2.1",
- "rustls-pki-types",
- "schannel",
- "security-framework 3.5.1",
+ "security-framework",
]
[[package]]
@@ -3771,12 +3832,9 @@ dependencies = [
[[package]]
name = "rustls-pki-types"
-version = "1.14.0"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd"
-dependencies = [
- "zeroize",
-]
+checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c"
[[package]]
name = "rustls-webpki"
@@ -3801,15 +3859,15 @@ dependencies = [
[[package]]
name = "rustversion"
-version = "1.0.22"
+version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
+checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2"
[[package]]
name = "ryu"
-version = "1.0.22"
+version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984"
+checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
[[package]]
name = "same-file"
@@ -3822,11 +3880,11 @@ dependencies = [
[[package]]
name = "schannel"
-version = "0.1.28"
+version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1"
+checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -3835,7 +3893,7 @@ version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19"
dependencies = [
- "parking_lot",
+ "parking_lot 0.12.3",
]
[[package]]
@@ -3859,7 +3917,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde_derive_internals",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
@@ -3894,21 +3952,8 @@ version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
dependencies = [
- "bitflags 2.10.0",
- "core-foundation 0.9.4",
- "core-foundation-sys",
- "libc",
- "security-framework-sys",
-]
-
-[[package]]
-name = "security-framework"
-version = "3.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef"
-dependencies = [
- "bitflags 2.10.0",
- "core-foundation 0.10.1",
+ "bitflags 2.9.0",
+ "core-foundation",
"core-foundation-sys",
"libc",
"security-framework-sys",
@@ -3916,9 +3961,9 @@ dependencies = [
[[package]]
name = "security-framework-sys"
-version = "2.15.0"
+version = "2.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0"
+checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32"
dependencies = [
"core-foundation-sys",
"libc",
@@ -3926,23 +3971,22 @@ dependencies = [
[[package]]
name = "self_cell"
-version = "1.2.2"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89"
+checksum = "0f7d95a54511e0c7be3f51e8867aa8cf35148d7b9445d44de2f943e2b206e749"
[[package]]
name = "semver"
-version = "1.0.27"
+version = "1.0.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
+checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"
[[package]]
name = "serde"
-version = "1.0.228"
+version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
+checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
dependencies = [
- "serde_core",
"serde_derive",
]
@@ -3958,32 +4002,22 @@ dependencies = [
[[package]]
name = "serde_bytes"
-version = "0.11.19"
+version = "0.11.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8"
+checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96"
dependencies = [
"serde",
- "serde_core",
-]
-
-[[package]]
-name = "serde_core"
-version = "1.0.228"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
-dependencies = [
- "serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.228"
+version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
+checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
@@ -3994,27 +4028,26 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
name = "serde_json"
-version = "1.0.149"
+version = "1.0.140"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
+checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
dependencies = [
"itoa",
"memchr",
+ "ryu",
"serde",
- "serde_core",
- "zmij",
]
[[package]]
name = "serde_spanned"
-version = "0.6.9"
+version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
+checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
dependencies = [
"serde",
]
@@ -4037,7 +4070,7 @@ version = "0.9.34+deprecated"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
dependencies = [
- "indexmap 2.13.0",
+ "indexmap 2.8.0",
"itoa",
"ryu",
"serde",
@@ -4057,9 +4090,9 @@ dependencies = [
[[package]]
name = "sha2"
-version = "0.10.9"
+version = "0.10.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
+checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -4083,44 +4116,36 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "signal-hook-registry"
-version = "1.4.8"
+version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b"
+checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
dependencies = [
- "errno",
"libc",
]
[[package]]
name = "slab"
-version = "0.4.11"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589"
-
-[[package]]
-name = "smallvec"
-version = "1.15.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
-
-[[package]]
-name = "socket2"
-version = "0.5.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678"
+checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
dependencies = [
- "libc",
- "windows-sys 0.52.0",
+ "autocfg",
]
[[package]]
-name = "socket2"
-version = "0.6.2"
+name = "smallvec"
+version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0"
+checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd"
+
+[[package]]
+name = "socket2"
+version = "0.5.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8"
dependencies = [
"libc",
- "windows-sys 0.60.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -4129,29 +4154,23 @@ version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
-[[package]]
-name = "spin"
-version = "0.10.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591"
-
[[package]]
name = "stable_deref_trait"
-version = "1.2.1"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
+checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
[[package]]
name = "static_init"
-version = "1.0.4"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bae1df58c5fea7502e8e352ec26b5579f6178e1fdb311e088580c980dee25ed"
+checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6"
dependencies = [
"bitflags 1.3.2",
- "cfg_aliases 0.2.1",
+ "cfg_aliases 0.1.1",
"libc",
- "parking_lot",
- "parking_lot_core",
+ "parking_lot 0.11.2",
+ "parking_lot_core 0.8.6",
"static_init_macro",
"winapi",
]
@@ -4224,9 +4243,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.114"
+version = "2.0.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
+checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
dependencies = [
"proc-macro2",
"quote",
@@ -4250,13 +4269,13 @@ dependencies = [
[[package]]
name = "synstructure"
-version = "0.13.2"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
+checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
@@ -4277,19 +4296,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
dependencies = [
"bitflags 1.3.2",
- "core-foundation 0.9.4",
- "system-configuration-sys 0.5.0",
-]
-
-[[package]]
-name = "system-configuration"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b"
-dependencies = [
- "bitflags 2.10.0",
- "core-foundation 0.9.4",
- "system-configuration-sys 0.6.0",
+ "core-foundation",
+ "system-configuration-sys",
]
[[package]]
@@ -4302,27 +4310,17 @@ dependencies = [
"libc",
]
-[[package]]
-name = "system-configuration-sys"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"
-dependencies = [
- "core-foundation-sys",
- "libc",
-]
-
[[package]]
name = "tempfile"
-version = "3.24.0"
+version = "3.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c"
+checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf"
dependencies = [
"fastrand",
- "getrandom 0.3.4",
+ "getrandom 0.3.2",
"once_cell",
- "rustix 1.1.3",
- "windows-sys 0.61.2",
+ "rustix 1.0.3",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -4354,11 +4352,11 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "2.0.18"
+version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
+checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
dependencies = [
- "thiserror-impl 2.0.18",
+ "thiserror-impl 2.0.12",
]
[[package]]
@@ -4369,54 +4367,55 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
name = "thiserror-impl"
-version = "2.0.18"
+version = "2.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
+checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
name = "thread_local"
-version = "1.1.9"
+version = "1.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
+checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
dependencies = [
"cfg-if",
+ "once_cell",
]
[[package]]
name = "time"
-version = "0.3.46"
+version = "0.3.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5"
+checksum = "9d9c75b47bdff86fa3334a3db91356b8d7d86a9b839dab7d0bdc5c3d3a077618"
dependencies = [
"deranged",
"num-conv",
"powerfmt",
- "serde_core",
+ "serde",
"time-core",
"time-macros",
]
[[package]]
name = "time-core"
-version = "0.1.8"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca"
+checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c"
[[package]]
name = "time-macros"
-version = "0.2.26"
+version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4"
+checksum = "29aa485584182073ed57fd5004aa09c371f021325014694e432313345865fd04"
dependencies = [
"num-conv",
"time-core",
@@ -4430,9 +4429,9 @@ checksum = "a1710e589de0a76aaf295cd47a6699f6405737dbfd3cf2b75c92d000b548d0e6"
[[package]]
name = "tinystr"
-version = "0.8.2"
+version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869"
+checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
dependencies = [
"displaydoc",
"zerovec",
@@ -4440,26 +4439,27 @@ dependencies = [
[[package]]
name = "tokio"
-version = "1.49.0"
+version = "1.44.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86"
+checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a"
dependencies = [
+ "backtrace",
"bytes",
"libc",
"mio",
- "parking_lot",
+ "parking_lot 0.12.3",
"pin-project-lite",
"signal-hook-registry",
- "socket2 0.6.2",
+ "socket2",
"tokio-macros",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
name = "tokio-io-timeout"
-version = "1.2.1"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bd86198d9ee903fedd2f9a2e72014287c0d9167e4ae43b5853007205dda1b76"
+checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf"
dependencies = [
"pin-project-lite",
"tokio",
@@ -4467,13 +4467,13 @@ dependencies = [
[[package]]
name = "tokio-macros"
-version = "2.6.0"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5"
+checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
@@ -4499,9 +4499,9 @@ dependencies = [
[[package]]
name = "tokio-stream"
-version = "0.1.18"
+version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70"
+checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"
dependencies = [
"futures-core",
"pin-project-lite",
@@ -4524,9 +4524,9 @@ dependencies = [
[[package]]
name = "tokio-util"
-version = "0.7.18"
+version = "0.7.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098"
+checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034"
dependencies = [
"bytes",
"futures-core",
@@ -4539,9 +4539,9 @@ dependencies = [
[[package]]
name = "toml"
-version = "0.8.23"
+version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"
+checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148"
dependencies = [
"serde",
"serde_spanned",
@@ -4551,20 +4551,20 @@ dependencies = [
[[package]]
name = "toml_datetime"
-version = "0.6.11"
+version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
+checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
dependencies = [
"serde",
]
[[package]]
name = "toml_edit"
-version = "0.22.27"
+version = "0.22.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
+checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474"
dependencies = [
- "indexmap 2.13.0",
+ "indexmap 2.8.0",
"serde",
"serde_spanned",
"toml_datetime",
@@ -4583,7 +4583,7 @@ dependencies = [
"bytes",
"futures-core",
"futures-util",
- "h2 0.3.27",
+ "h2 0.3.26",
"http 0.2.12",
"http-body 0.4.6",
"hyper 0.14.32",
@@ -4625,10 +4625,10 @@ dependencies = [
"indexmap 1.9.3",
"pin-project",
"pin-project-lite",
- "rand",
+ "rand 0.8.5",
"slab",
"tokio",
- "tokio-util 0.7.18",
+ "tokio-util 0.7.14",
"tower-layer",
"tower-service",
"tracing",
@@ -4641,7 +4641,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140"
dependencies = [
"base64 0.21.7",
- "bitflags 2.10.0",
+ "bitflags 2.9.0",
"bytes",
"futures-core",
"futures-util",
@@ -4669,9 +4669,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]]
name = "tracing"
-version = "0.1.44"
+version = "0.1.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
+checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
dependencies = [
"log",
"pin-project-lite",
@@ -4681,20 +4681,20 @@ dependencies = [
[[package]]
name = "tracing-attributes"
-version = "0.1.31"
+version = "0.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
+checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
[[package]]
name = "tracing-core"
-version = "0.1.36"
+version = "0.1.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
+checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c"
dependencies = [
"once_cell",
"valuable",
@@ -4712,9 +4712,9 @@ dependencies = [
[[package]]
name = "tracing-journald"
-version = "0.3.2"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d3a81ed245bfb62592b1e2bc153e77656d94ee6a0497683a65a12ccaf2438d0"
+checksum = "fc0b4143302cf1022dac868d521e36e8b27691f72c84b3311750d5188ebba657"
dependencies = [
"libc",
"tracing-core",
@@ -4734,14 +4734,14 @@ dependencies = [
[[package]]
name = "tracing-subscriber"
-version = "0.3.22"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
+checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008"
dependencies = [
"matchers",
"nu-ansi-term",
"once_cell",
- "regex-automata",
+ "regex",
"sharded-slab",
"smallvec",
"thread_local",
@@ -4758,9 +4758,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
[[package]]
name = "typenum"
-version = "1.19.0"
+version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
+checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
[[package]]
name = "ucd-trie"
@@ -4770,9 +4770,9 @@ checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971"
[[package]]
name = "unicode-ident"
-version = "1.0.22"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
+checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
[[package]]
name = "unicode-segmentation"
@@ -4810,16 +4810,21 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "url"
-version = "2.5.8"
+version = "2.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"
+checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60"
dependencies = [
"form_urlencoded",
"idna",
"percent-encoding",
- "serde",
]
+[[package]]
+name = "utf16_iter"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246"
+
[[package]]
name = "utf8_iter"
version = "1.0.4"
@@ -4832,14 +4837,37 @@ version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
+[[package]]
+name = "utoipa"
+version = "5.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "435c6f69ef38c9017b4b4eea965dfb91e71e53d869e896db40d1cf2441dd75c0"
+dependencies = [
+ "indexmap 2.8.0",
+ "serde",
+ "serde_json",
+ "utoipa-gen",
+]
+
+[[package]]
+name = "utoipa-gen"
+version = "5.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a77d306bc75294fd52f3e99b13ece67c02c1a2789190a6f31d32f736624326f7"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.100",
+]
+
[[package]]
name = "uuid"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d"
dependencies = [
- "getrandom 0.2.17",
- "rand",
+ "getrandom 0.2.15",
+ "rand 0.8.5",
]
[[package]]
@@ -4910,40 +4938,52 @@ dependencies = [
[[package]]
name = "wasi"
-version = "0.11.1+wasi-snapshot-preview1"
+version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
-name = "wasip2"
-version = "1.0.2+wasi-0.2.9"
+name = "wasi"
+version = "0.14.2+wasi-0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5"
+checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"
dependencies = [
- "wit-bindgen",
+ "wit-bindgen-rt",
]
[[package]]
name = "wasm-bindgen"
-version = "0.2.108"
+version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566"
+checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
dependencies = [
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
+dependencies = [
+ "bumpalo",
+ "log",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.100",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.58"
+version = "0.4.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f"
+checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61"
dependencies = [
"cfg-if",
- "futures-util",
"js-sys",
"once_cell",
"wasm-bindgen",
@@ -4952,9 +4992,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.108"
+version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608"
+checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -4962,31 +5002,31 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.108"
+version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55"
+checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
dependencies = [
- "bumpalo",
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
+ "wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.108"
+version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12"
+checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
dependencies = [
"unicode-ident",
]
[[package]]
name = "web-sys"
-version = "0.3.85"
+version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598"
+checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -5022,11 +5062,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
-version = "0.1.11"
+version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
+checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -5037,73 +5077,18 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-core"
-version = "0.62.2"
+version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
- "windows-implement",
- "windows-interface",
- "windows-link",
- "windows-result",
- "windows-strings",
-]
-
-[[package]]
-name = "windows-implement"
-version = "0.60.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.114",
-]
-
-[[package]]
-name = "windows-interface"
-version = "0.59.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.114",
+ "windows-targets 0.52.6",
]
[[package]]
name = "windows-link"
-version = "0.2.1"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
-
-[[package]]
-name = "windows-registry"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720"
-dependencies = [
- "windows-link",
- "windows-result",
- "windows-strings",
-]
-
-[[package]]
-name = "windows-result"
-version = "0.4.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
-dependencies = [
- "windows-link",
-]
-
-[[package]]
-name = "windows-strings"
-version = "0.5.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
-dependencies = [
- "windows-link",
-]
+checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
[[package]]
name = "windows-sys"
@@ -5132,24 +5117,6 @@ dependencies = [
"windows-targets 0.52.6",
]
-[[package]]
-name = "windows-sys"
-version = "0.60.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
-dependencies = [
- "windows-targets 0.53.5",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.61.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
-dependencies = [
- "windows-link",
-]
-
[[package]]
name = "windows-targets"
version = "0.48.5"
@@ -5174,30 +5141,13 @@ dependencies = [
"windows_aarch64_gnullvm 0.52.6",
"windows_aarch64_msvc 0.52.6",
"windows_i686_gnu 0.52.6",
- "windows_i686_gnullvm 0.52.6",
+ "windows_i686_gnullvm",
"windows_i686_msvc 0.52.6",
"windows_x86_64_gnu 0.52.6",
"windows_x86_64_gnullvm 0.52.6",
"windows_x86_64_msvc 0.52.6",
]
-[[package]]
-name = "windows-targets"
-version = "0.53.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
-dependencies = [
- "windows-link",
- "windows_aarch64_gnullvm 0.53.1",
- "windows_aarch64_msvc 0.53.1",
- "windows_i686_gnu 0.53.1",
- "windows_i686_gnullvm 0.53.1",
- "windows_i686_msvc 0.53.1",
- "windows_x86_64_gnu 0.53.1",
- "windows_x86_64_gnullvm 0.53.1",
- "windows_x86_64_msvc 0.53.1",
-]
-
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.5"
@@ -5210,12 +5160,6 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
-
[[package]]
name = "windows_aarch64_msvc"
version = "0.48.5"
@@ -5228,12 +5172,6 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
-
[[package]]
name = "windows_i686_gnu"
version = "0.48.5"
@@ -5246,24 +5184,12 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
-[[package]]
-name = "windows_i686_gnu"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
-
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
-[[package]]
-name = "windows_i686_gnullvm"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
-
[[package]]
name = "windows_i686_msvc"
version = "0.48.5"
@@ -5276,12 +5202,6 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
-[[package]]
-name = "windows_i686_msvc"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
-
[[package]]
name = "windows_x86_64_gnu"
version = "0.48.5"
@@ -5294,12 +5214,6 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
-
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.5"
@@ -5312,12 +5226,6 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
-
[[package]]
name = "windows_x86_64_msvc"
version = "0.48.5"
@@ -5330,17 +5238,11 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.53.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
-
[[package]]
name = "winnow"
-version = "0.7.14"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829"
+checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36"
dependencies = [
"memchr",
]
@@ -5356,16 +5258,25 @@ dependencies = [
]
[[package]]
-name = "wit-bindgen"
-version = "0.51.0"
+name = "wit-bindgen-rt"
+version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
+checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"
+dependencies = [
+ "bitflags 2.9.0",
+]
+
+[[package]]
+name = "write16"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936"
[[package]]
name = "writeable"
-version = "0.6.2"
+version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9"
+checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
[[package]]
name = "xmlparser"
@@ -5381,10 +5292,11 @@ checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3"
[[package]]
name = "yoke"
-version = "0.8.1"
+version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954"
+checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40"
dependencies = [
+ "serde",
"stable_deref_trait",
"yoke-derive",
"zerofrom",
@@ -5392,34 +5304,54 @@ dependencies = [
[[package]]
name = "yoke-derive"
-version = "0.8.1"
+version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d"
+checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
"synstructure",
]
[[package]]
name = "zerocopy"
-version = "0.8.33"
+version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd"
+checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
dependencies = [
- "zerocopy-derive",
+ "zerocopy-derive 0.7.35",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.8.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6"
+dependencies = [
+ "zerocopy-derive 0.8.23",
]
[[package]]
name = "zerocopy-derive"
-version = "0.8.33"
+version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1"
+checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.8.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.100",
]
[[package]]
@@ -5439,32 +5371,21 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
"synstructure",
]
[[package]]
name = "zeroize"
-version = "1.8.2"
+version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
-
-[[package]]
-name = "zerotrie"
-version = "0.2.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851"
-dependencies = [
- "displaydoc",
- "yoke",
- "zerofrom",
-]
+checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
[[package]]
name = "zerovec"
-version = "0.11.5"
+version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002"
+checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079"
dependencies = [
"yoke",
"zerofrom",
@@ -5473,21 +5394,15 @@ dependencies = [
[[package]]
name = "zerovec-derive"
-version = "0.11.2"
+version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3"
+checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.114",
+ "syn 2.0.100",
]
-[[package]]
-name = "zmij"
-version = "1.0.16"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfcd145825aace48cff44a8844de64bf75feec3080e0aa5cdbde72961ae51a65"
-
[[package]]
name = "zstd"
version = "0.13.3"
@@ -5499,18 +5414,18 @@ dependencies = [
[[package]]
name = "zstd-safe"
-version = "7.2.4"
+version = "7.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d"
+checksum = "f3051792fbdc2e1e143244dc28c60f73d8470e93f3f9cbd0ead44da5ed802722"
dependencies = [
"zstd-sys",
]
[[package]]
name = "zstd-sys"
-version = "2.0.16+zstd.1.5.7"
+version = "2.0.14+zstd.1.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748"
+checksum = "8fb060d4926e4ac3a3ad15d864e99ceb5f343c6b34f5bd6d81ae6ed417311be5"
dependencies = [
"cc",
"pkg-config",
diff --git a/Cargo.toml b/Cargo.toml
index df4005a3..7c82befd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,18 +24,18 @@ default-members = ["src/garage"]
# Internal Garage crates
format_table = { version = "0.1.1", path = "src/format-table" }
-garage_api_common = { version = "1.3.1", path = "src/api/common" }
-garage_api_admin = { version = "1.3.1", path = "src/api/admin" }
-garage_api_s3 = { version = "1.3.1", path = "src/api/s3" }
-garage_api_k2v = { version = "1.3.1", path = "src/api/k2v" }
-garage_block = { version = "1.3.1", path = "src/block" }
-garage_db = { version = "1.3.1", path = "src/db", default-features = false }
-garage_model = { version = "1.3.1", path = "src/model", default-features = false }
-garage_net = { version = "1.3.1", path = "src/net" }
-garage_rpc = { version = "1.3.1", path = "src/rpc" }
-garage_table = { version = "1.3.1", path = "src/table" }
-garage_util = { version = "1.3.1", path = "src/util" }
-garage_web = { version = "1.3.1", path = "src/web" }
+garage_api_common = { version = "2.1.0", path = "src/api/common" }
+garage_api_admin = { version = "2.1.0", path = "src/api/admin" }
+garage_api_s3 = { version = "2.1.0", path = "src/api/s3" }
+garage_api_k2v = { version = "2.1.0", path = "src/api/k2v" }
+garage_block = { version = "2.1.0", path = "src/block" }
+garage_db = { version = "2.1.0", path = "src/db", default-features = false }
+garage_model = { version = "2.1.0", path = "src/model", default-features = false }
+garage_net = { version = "2.1.0", path = "src/net" }
+garage_rpc = { version = "2.1.0", path = "src/rpc" }
+garage_table = { version = "2.1.0", path = "src/table" }
+garage_util = { version = "2.1.0", path = "src/util" }
+garage_web = { version = "2.1.0", path = "src/web" }
k2v-client = { version = "0.0.4", path = "src/k2v-client" }
# External crates from crates.io
@@ -48,9 +48,8 @@ blake2 = "0.10"
bytes = "1.0"
bytesize = "1.1"
cfg-if = "1.0"
-chrono = "0.4"
-crc32fast = "1.4"
-crc32c = "0.6"
+chrono = { version = "0.4", features = ["serde"] }
+crc-fast = "1.6"
crypto-common = "0.1"
gethostname = "0.4"
git-version = "0.3.4"
@@ -66,6 +65,7 @@ nix = { version = "0.29", default-features = false, features = ["fs"] }
nom = "7.1"
parking_lot = "0.12"
parse_duration = "2.1"
+paste = "1.0"
pin-project = "1.0.12"
pnet_datalink = "0.34"
rand = "0.8"
@@ -101,6 +101,7 @@ serde = { version = "1.0", default-features = false, features = ["derive", "rc"]
serde_bytes = "0.11"
serde_json = "1.0"
toml = { version = "0.8", default-features = false, features = ["parse"] }
+utoipa = { version = "5.3.1", features = ["chrono"] }
# newer version requires rust edition 2021
k8s-openapi = { version = "0.21", features = ["v1_24"] }
@@ -146,8 +147,12 @@ aws-smithy-runtime = { version = "1.8", default-features = false, features = ["t
aws-sdk-config = { version = "1.62", default-features = false }
aws-sdk-s3 = { version = "1.79", default-features = false, features = ["rt-tokio"] }
+[profile.dev]
+#lto = "thin" # disabled for now, adds 2-4 min to each CI build
+lto = "off"
+
[profile.release]
-lto = "thin"
-codegen-units = 16
+lto = true
+codegen-units = 1
opt-level = 3
-strip = "debuginfo"
+strip = true
diff --git a/doc/api/garage-admin-v0.html b/doc/api/garage-admin-v0.html
index dbdd9e1c..7eb11f25 100644
--- a/doc/api/garage-admin-v0.html
+++ b/doc/api/garage-admin-v0.html
@@ -1,7 +1,7 @@
- Garage Adminstration API v0
+ Garage administration API v0
diff --git a/doc/api/garage-admin-v1.html b/doc/api/garage-admin-v1.html
index 783d459e..e98306b8 100644
--- a/doc/api/garage-admin-v1.html
+++ b/doc/api/garage-admin-v1.html
@@ -1,7 +1,7 @@
- Garage Adminstration API v0
+ Garage administration API v1
diff --git a/doc/api/garage-admin-v2.html b/doc/api/garage-admin-v2.html
new file mode 100644
index 00000000..b079e760
--- /dev/null
+++ b/doc/api/garage-admin-v2.html
@@ -0,0 +1,24 @@
+
+
+
+ Garage administration API v2
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/doc/api/garage-admin-v2.json b/doc/api/garage-admin-v2.json
new file mode 100644
index 00000000..97a9dd5e
--- /dev/null
+++ b/doc/api/garage-admin-v2.json
@@ -0,0 +1,4418 @@
+{
+ "openapi": "3.1.0",
+ "info": {
+ "title": "Garage administration API",
+ "description": "Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks.\n\n*Disclaimer: This API may change in future Garage versions. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is early stage and can contain bugs, so be careful and please report any issues on our issue tracker.*",
+ "contact": {
+ "name": "The Garage team",
+ "url": "https://garagehq.deuxfleurs.fr/",
+ "email": "garagehq@deuxfleurs.fr"
+ },
+ "license": {
+ "name": "AGPL-3.0",
+ "identifier": "AGPL-3.0"
+ },
+ "version": "v2.1.0"
+ },
+ "servers": [
+ {
+ "url": "http://localhost:3903/",
+ "description": "A local server"
+ }
+ ],
+ "paths": {
+ "/check": {
+ "get": {
+ "tags": [
+ "Special endpoints"
+ ],
+ "description": "\nStatic website domain name check. Checks whether a bucket is configured to serve\na static website for the requested domain. This is used by reverse proxies such\nas Caddy or Tricot, to avoid requesting TLS certificates for domain names that\ndo not correspond to an actual website.\n ",
+ "operationId": "CheckDomain",
+ "parameters": [
+ {
+ "name": "domain",
+ "in": "query",
+ "description": "The domain name to check for",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The domain name redirects to a static website bucket"
+ },
+ "400": {
+ "description": "No static website bucket exists for this domain"
+ }
+ },
+ "security": [
+ {}
+ ]
+ }
+ },
+ "/health": {
+ "get": {
+ "tags": [
+ "Special endpoints"
+ ],
+ "description": "\nCheck cluster health. The status code returned by this function indicates\nwhether this Garage daemon can answer API requests.\nGarage will return `200 OK` even if some storage nodes are disconnected,\nas long as it is able to have a quorum of nodes for read and write operations.\n ",
+ "operationId": "Health",
+ "responses": {
+ "200": {
+ "description": "Garage is able to answer requests"
+ },
+ "503": {
+ "description": "This Garage daemon is not able to handle requests"
+ }
+ },
+ "security": [
+ {}
+ ]
+ }
+ },
+ "/metrics": {
+ "get": {
+ "tags": [
+ "Special endpoints"
+ ],
+ "description": "Prometheus metrics endpoint",
+ "operationId": "Metrics",
+ "responses": {
+ "200": {
+ "description": "Garage daemon metrics exported in Prometheus format"
+ }
+ },
+ "security": [
+ {},
+ {
+ "bearerAuth": []
+ }
+ ]
+ }
+ },
+ "/v2/AddBucketAlias": {
+ "post": {
+ "tags": [
+ "Bucket alias"
+ ],
+ "description": "Add an alias for the target bucket. This can be either a global or a local alias, depending on which fields are specified.",
+ "operationId": "AddBucketAlias",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AddBucketAliasRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Returns exhaustive information about the bucket",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AddBucketAliasResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/AllowBucketKey": {
+ "post": {
+ "tags": [
+ "Permission"
+ ],
+ "description": "\n⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious.\n\nAllows a key to do read/write/owner operations on a bucket.\n\nFlags in permissions which have the value true will be activated. Other flags will remain unchanged (ie. they will keep their internal value).\n\nFor example, if you set read to true, the key will be allowed to read the bucket.\nIf you set it to false, the key will keeps its previous read permission.\nIf you want to disallow read for the key, check the DenyBucketKey operation.\n ",
+ "operationId": "AllowBucketKey",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AllowBucketKeyRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Returns exhaustive information about the bucket",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/AllowBucketKeyResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/ApplyClusterLayout": {
+ "post": {
+ "tags": [
+ "Cluster layout"
+ ],
+ "description": "\nApplies to the cluster the layout changes currently registered as staged layout changes.\n\n*Note: do not try to parse the `message` field of the response, it is given as an array of string specifically because its format is not stable.*\n ",
+ "operationId": "ApplyClusterLayout",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ApplyClusterLayoutRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "The updated cluster layout has been applied in the cluster",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ApplyClusterLayoutResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/CleanupIncompleteUploads": {
+ "post": {
+ "tags": [
+ "Bucket"
+ ],
+ "description": "Removes all incomplete multipart uploads that are older than the specified number of seconds.",
+ "operationId": "CleanupIncompleteUploads",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CleanupIncompleteUploadsRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "The bucket was cleaned up successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CleanupIncompleteUploadsResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/ClusterLayoutSkipDeadNodes": {
+ "post": {
+ "tags": [
+ "Cluster layout"
+ ],
+ "description": "Force progress in layout update trackers",
+ "operationId": "ClusterLayoutSkipDeadNodes",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ClusterLayoutSkipDeadNodesRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Request has been taken into account",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ClusterLayoutSkipDeadNodesResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/ConnectClusterNodes": {
+ "post": {
+ "tags": [
+ "Cluster"
+ ],
+ "description": "Instructs this Garage node to connect to other Garage nodes at specified `@`. `node_id` is generated automatically on node start.",
+ "operationId": "ConnectClusterNodes",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ConnectClusterNodesRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "The request has been handled correctly but it does not mean that all connection requests succeeded; some might have fail, you need to check the body!",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ConnectClusterNodesResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/CreateAdminToken": {
+ "post": {
+ "tags": [
+ "Admin API token"
+ ],
+ "description": "Creates a new admin API token",
+ "operationId": "CreateAdminToken",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateAdminTokenRequestBody"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Admin token has been created",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateAdminTokenResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/CreateBucket": {
+ "post": {
+ "tags": [
+ "Bucket"
+ ],
+ "description": "\nCreates a new bucket, either with a global alias, a local one, or no alias at all.\nTechnically, you can also specify both `globalAlias` and `localAlias` and that would create two aliases.\n ",
+ "operationId": "CreateBucket",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateBucketRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Returns exhaustive information about the bucket",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateBucketResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/CreateKey": {
+ "post": {
+ "tags": [
+ "Access key"
+ ],
+ "description": "Creates a new API access key.",
+ "operationId": "CreateKey",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateKeyRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Access key has been created",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateKeyResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/CreateMetadataSnapshot": {
+ "post": {
+ "tags": [
+ "Node"
+ ],
+ "description": "\nInstruct one or several nodes to take a snapshot of their metadata databases.\n ",
+ "operationId": "CreateMetadataSnapshot",
+ "parameters": [
+ {
+ "name": "node",
+ "in": "query",
+ "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Responses from individual cluster nodes",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MultiResponse_LocalCreateMetadataSnapshotResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/DeleteAdminToken": {
+ "post": {
+ "tags": [
+ "Admin API token"
+ ],
+ "description": "Delete an admin API token from the cluster, revoking all its permissions.",
+ "operationId": "DeleteAdminToken",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "description": "Admin API token ID",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Admin token has been deleted"
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/DeleteBucket": {
+ "post": {
+ "tags": [
+ "Bucket"
+ ],
+ "description": "\nDeletes a storage bucket. A bucket cannot be deleted if it is not empty.\n\n**Warning:** this will delete all aliases associated with the bucket!\n ",
+ "operationId": "DeleteBucket",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "description": "ID of the bucket to delete",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Bucket has been deleted"
+ },
+ "400": {
+ "description": "Bucket is not empty"
+ },
+ "404": {
+ "description": "Bucket not found"
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/DeleteKey": {
+ "post": {
+ "tags": [
+ "Access key"
+ ],
+ "description": "Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before. ",
+ "operationId": "DeleteKey",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "description": "Access key ID",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Access key has been deleted"
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/DenyBucketKey": {
+ "post": {
+ "tags": [
+ "Permission"
+ ],
+ "description": "\n⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious.\n\nDenies a key from doing read/write/owner operations on a bucket.\n\nFlags in permissions which have the value true will be deactivated. Other flags will remain unchanged.\n\nFor example, if you set read to true, the key will be denied from reading.\nIf you set read to false, the key will keep its previous permissions.\nIf you want the key to have the reading permission, check the AllowBucketKey operation.\n ",
+ "operationId": "DenyBucketKey",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DenyBucketKeyRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Returns exhaustive information about the bucket",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/DenyBucketKeyResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/GetAdminTokenInfo": {
+ "get": {
+ "tags": [
+ "Admin API token"
+ ],
+ "description": "\nReturn information about a specific admin API token.\nYou can search by specifying the exact token identifier (`id`) or by specifying a pattern (`search`).\n ",
+ "operationId": "GetAdminTokenInfo",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "description": "Admin API token ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "search",
+ "in": "query",
+ "description": "Partial token ID or name to search for",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Information about the admin token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetAdminTokenInfoResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/GetBlockInfo": {
+ "post": {
+ "tags": [
+ "Block"
+ ],
+ "description": "\nGet detailed information about a data block stored on a Garage node, including all object versions and in-progress multipart uploads that contain a reference to this block.\n ",
+ "operationId": "GetBlockInfo",
+ "parameters": [
+ {
+ "name": "node",
+ "in": "query",
+ "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LocalGetBlockInfoRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Detailed block information",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MultiResponse_LocalGetBlockInfoResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/GetBucketInfo": {
+ "get": {
+ "tags": [
+ "Bucket"
+ ],
+ "description": "\nGiven a bucket identifier (`id`) or a global alias (`alias`), get its information.\nIt includes its aliases, its web configuration, keys that have some permissions\non it, some statistics (number of objects, size), number of dangling multipart uploads,\nand its quotas (if any).\n ",
+ "operationId": "GetBucketInfo",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "description": "Exact bucket ID to look up",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "globalAlias",
+ "in": "query",
+ "description": "Global alias of bucket to look up",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "search",
+ "in": "query",
+ "description": "Partial ID or alias to search for",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Returns exhaustive information about the bucket",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetBucketInfoResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/GetClusterHealth": {
+ "get": {
+ "tags": [
+ "Cluster"
+ ],
+ "description": "Returns the global status of the cluster, the number of connected nodes (over the number of known ones), the number of healthy storage nodes (over the declared ones), and the number of healthy partitions (over the total).",
+ "operationId": "GetClusterHealth",
+ "responses": {
+ "200": {
+ "description": "Cluster health report",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetClusterHealthResponse"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/v2/GetClusterLayout": {
+ "get": {
+ "tags": [
+ "Cluster layout"
+ ],
+ "description": "\nReturns the cluster's current layout, including:\n\n- Currently configured cluster layout\n- Staged changes to the cluster layout\n\n*Capacity is given in bytes*\n ",
+ "operationId": "GetClusterLayout",
+ "responses": {
+ "200": {
+ "description": "Current cluster layout",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetClusterLayoutResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/GetClusterLayoutHistory": {
+ "get": {
+ "tags": [
+ "Cluster layout"
+ ],
+ "description": "\nReturns the history of layouts in the cluster\n ",
+ "operationId": "GetClusterLayoutHistory",
+ "responses": {
+ "200": {
+ "description": "Cluster layout history",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetClusterLayoutHistoryResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/GetClusterStatistics": {
+ "get": {
+ "tags": [
+ "Cluster"
+ ],
+ "description": "\nFetch global cluster statistics.\n\n*Note: do not try to parse the `freeform` field of the response, it is given as a string specifically because its format is not stable.*\n ",
+ "operationId": "GetClusterStatistics",
+ "responses": {
+ "200": {
+ "description": "Global cluster statistics",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetClusterStatisticsResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/GetClusterStatus": {
+ "get": {
+ "tags": [
+ "Cluster"
+ ],
+ "description": "\nReturns the cluster's current status, including:\n\n- ID of the node being queried and its version of the Garage daemon\n- Live nodes\n- Currently configured cluster layout\n- Staged changes to the cluster layout\n\n*Capacity is given in bytes*\n ",
+ "operationId": "GetClusterStatus",
+ "responses": {
+ "200": {
+ "description": "Cluster status report",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetClusterStatusResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/GetCurrentAdminTokenInfo": {
+ "get": {
+ "tags": [
+ "Admin API token"
+ ],
+ "description": "\nReturn information about the calling admin API token.\n ",
+ "operationId": "GetCurrentAdminTokenInfo",
+ "responses": {
+ "200": {
+ "description": "Information about the admin token",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetCurrentAdminTokenInfoResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/GetKeyInfo": {
+ "get": {
+ "tags": [
+ "Access key"
+ ],
+ "description": "\nReturn information about a specific key like its identifiers, its permissions and buckets on which it has permissions.\nYou can search by specifying the exact key identifier (`id`) or by specifying a pattern (`search`).\n\nFor confidentiality reasons, the secret key is not returned by default: you must pass the `showSecretKey` query parameter to get it.\n ",
+ "operationId": "GetKeyInfo",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "description": "Access key ID",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "search",
+ "in": "query",
+ "description": "Partial key ID or name to search for",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "showSecretKey",
+ "in": "query",
+ "description": "Whether to return the secret access key",
+ "required": false,
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Information about the access key",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetKeyInfoResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/GetNodeInfo": {
+ "get": {
+ "tags": [
+ "Node"
+ ],
+ "description": "\nReturn information about the Garage daemon running on one or several nodes.\n ",
+ "operationId": "GetNodeInfo",
+ "parameters": [
+ {
+ "name": "node",
+ "in": "query",
+ "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Responses from individual cluster nodes",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MultiResponse_LocalGetNodeInfoResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/GetNodeStatistics": {
+ "get": {
+ "tags": [
+ "Node"
+ ],
+ "description": "\nFetch statistics for one or several Garage nodes.\n\n*Note: do not try to parse the `freeform` field of the response, it is given as a string specifically because its format is not stable.*\n ",
+ "operationId": "GetNodeStatistics",
+ "parameters": [
+ {
+ "name": "node",
+ "in": "query",
+ "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Responses from individual cluster nodes",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MultiResponse_LocalGetNodeStatisticsResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/GetWorkerInfo": {
+ "post": {
+ "tags": [
+ "Worker"
+ ],
+ "description": "\nGet information about the specified background worker on one or several cluster nodes.\n ",
+ "operationId": "GetWorkerInfo",
+ "parameters": [
+ {
+ "name": "node",
+ "in": "query",
+ "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LocalGetWorkerInfoRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Responses from individual cluster nodes",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MultiResponse_LocalGetWorkerInfoResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/GetWorkerVariable": {
+ "post": {
+ "tags": [
+ "Worker"
+ ],
+ "description": "\nFetch values of one or several worker variables, from one or several cluster nodes.\n ",
+ "operationId": "GetWorkerVariable",
+ "parameters": [
+ {
+ "name": "node",
+ "in": "query",
+ "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LocalGetWorkerVariableRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Responses from individual cluster nodes",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MultiResponse_LocalGetWorkerVariableResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/ImportKey": {
+ "post": {
+ "tags": [
+ "Access key"
+ ],
+ "description": "\nImports an existing API key. This feature must only be used for migrations and backup restore.\n\n**Do not use it to generate custom key identifiers or you will break your Garage cluster.**\n ",
+ "operationId": "ImportKey",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ImportKeyRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Access key has been imported",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ImportKeyResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/InspectObject": {
+ "get": {
+ "tags": [
+ "Bucket"
+ ],
+ "description": "\nReturns detailed information about an object in a bucket, including its internal state in Garage.\n\nThis API call can be used to list the data blocks referenced by an object,\nas well as to view metadata associated to the object.\n\nThis call may return a list of more than one version for the object, for instance in the\ncase where there is a currently stored version of the object, and a newer version whose\nupload is in progress and not yet finished.\n ",
+ "operationId": "InspectObject",
+ "parameters": [
+ {
+ "name": "bucketId",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "key",
+ "in": "query",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Returns exhaustive information about the object",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/InspectObjectResponse"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Object not found"
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/LaunchRepairOperation": {
+ "post": {
+ "tags": [
+ "Node"
+ ],
+ "description": "\nLaunch a repair operation on one or several cluster nodes.\n ",
+ "operationId": "LaunchRepairOperation",
+ "parameters": [
+ {
+ "name": "node",
+ "in": "query",
+ "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LocalLaunchRepairOperationRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Responses from individual cluster nodes",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MultiResponse_LocalLaunchRepairOperationResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/ListAdminTokens": {
+ "get": {
+ "tags": [
+ "Admin API token"
+ ],
+ "description": "Returns all admin API tokens in the cluster.",
+ "operationId": "ListAdminTokens",
+ "responses": {
+ "200": {
+ "description": "Returns info about all admin API tokens",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ListAdminTokensResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/ListBlockErrors": {
+ "get": {
+ "tags": [
+ "Block"
+ ],
+ "description": "\nList data blocks that are currently in an errored state on one or several Garage nodes.\n ",
+ "operationId": "ListBlockErrors",
+ "parameters": [
+ {
+ "name": "node",
+ "in": "query",
+ "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Responses from individual cluster nodes",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MultiResponse_LocalListBlockErrorsResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/ListBuckets": {
+ "get": {
+ "tags": [
+ "Bucket"
+ ],
+ "description": "List all the buckets on the cluster with their UUID and their global and local aliases.",
+ "operationId": "ListBuckets",
+ "responses": {
+ "200": {
+ "description": "Returns the UUID of all the buckets and all their aliases",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ListBucketsResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/ListKeys": {
+ "get": {
+ "tags": [
+ "Access key"
+ ],
+ "description": "Returns all API access keys in the cluster.",
+ "operationId": "ListKeys",
+ "responses": {
+ "200": {
+ "description": "Returns the key identifier (aka `AWS_ACCESS_KEY_ID`) and its associated, human friendly, name if any (otherwise return an empty string)",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ListKeysResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/ListWorkers": {
+ "post": {
+ "tags": [
+ "Worker"
+ ],
+ "description": "\nList background workers currently running on one or several cluster nodes.\n ",
+ "operationId": "ListWorkers",
+ "parameters": [
+ {
+ "name": "node",
+ "in": "query",
+ "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LocalListWorkersRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Responses from individual cluster nodes",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MultiResponse_LocalListWorkersResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/PreviewClusterLayoutChanges": {
+ "post": {
+ "tags": [
+ "Cluster layout"
+ ],
+ "description": "\nComputes a new layout taking into account the staged parameters, and returns it with detailed statistics. The new layout is not applied in the cluster.\n\n*Note: do not try to parse the `message` field of the response, it is given as an array of string specifically because its format is not stable.*\n ",
+ "operationId": "PreviewClusterLayoutChanges",
+ "responses": {
+ "200": {
+ "description": "Information about the new layout",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/PreviewClusterLayoutChangesResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/PurgeBlocks": {
+ "post": {
+ "tags": [
+ "Block"
+ ],
+ "description": "\nPurge references to one or several missing data blocks.\n\nThis will remove all objects and in-progress multipart uploads that contain the specified data block(s). The objects will be permanently deleted from the buckets in which they appear. Use with caution.\n ",
+ "operationId": "PurgeBlocks",
+ "parameters": [
+ {
+ "name": "node",
+ "in": "query",
+ "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LocalPurgeBlocksRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Responses from individual cluster nodes",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MultiResponse_LocalPurgeBlocksResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/RemoveBucketAlias": {
+ "post": {
+ "tags": [
+ "Bucket alias"
+ ],
+ "description": "Remove an alias for the target bucket. This can be either a global or a local alias, depending on which fields are specified.",
+ "operationId": "RemoveBucketAlias",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RemoveBucketAliasRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Returns exhaustive information about the bucket",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RemoveBucketAliasResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/RetryBlockResync": {
+ "post": {
+ "tags": [
+ "Block"
+ ],
+ "description": "\nInstruct Garage node(s) to retry the resynchronization of one or several missing data block(s).\n ",
+ "operationId": "RetryBlockResync",
+ "parameters": [
+ {
+ "name": "node",
+ "in": "query",
+ "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LocalRetryBlockResyncRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Responses from individual cluster nodes",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MultiResponse_LocalRetryBlockResyncResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/RevertClusterLayout": {
+ "post": {
+ "tags": [
+ "Cluster layout"
+ ],
+ "description": "Clear staged layout changes",
+ "operationId": "RevertClusterLayout",
+ "responses": {
+ "200": {
+ "description": "All pending changes to the cluster layout have been erased",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/RevertClusterLayoutResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/SetWorkerVariable": {
+ "post": {
+ "tags": [
+ "Worker"
+ ],
+ "description": "\nSet the value for a worker variable, on one or several cluster nodes.\n ",
+ "operationId": "SetWorkerVariable",
+ "parameters": [
+ {
+ "name": "node",
+ "in": "query",
+ "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/LocalSetWorkerVariableRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Responses from individual cluster nodes",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/MultiResponse_LocalSetWorkerVariableResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/UpdateAdminToken": {
+ "post": {
+ "tags": [
+ "Admin API token"
+ ],
+ "description": "\nUpdates information about the specified admin API token.\n ",
+ "operationId": "UpdateAdminToken",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "description": "Admin API token ID",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateAdminTokenRequestBody"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Admin token has been updated",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateAdminTokenResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/UpdateBucket": {
+ "post": {
+ "tags": [
+ "Bucket"
+ ],
+ "description": "\nAll fields (`websiteAccess` and `quotas`) are optional.\nIf they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed.\n\nIn `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified.\nThe field `errorDocument` is optional, if no error document is set a generic\nerror message is displayed when errors happen. Conversely, if `enabled` is\n`false`, neither `indexDocument` nor `errorDocument` must be specified.\n\nIn `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null`\nto remove the quotas. An absent value will be considered the same as a `null`. It is not possible\nto change only one of the two quotas.\n ",
+ "operationId": "UpdateBucket",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "description": "ID of the bucket to update",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateBucketRequestBody"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Bucket has been updated",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateBucketResponse"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Bucket not found"
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/UpdateClusterLayout": {
+ "post": {
+ "tags": [
+ "Cluster layout"
+ ],
+ "description": "\nSend modifications to the cluster layout. These modifications will be included in the staged role changes, visible in subsequent calls of `GET /GetClusterHealth`. Once the set of staged changes is satisfactory, the user may call `POST /ApplyClusterLayout` to apply the changed changes, or `POST /RevertClusterLayout` to clear all of the staged changes in the layout.\n\nSetting the capacity to `null` will configure the node as a gateway.\nOtherwise, capacity must be now set in bytes (before Garage 0.9 it was arbitrary weights).\nFor example to declare 100GB, you must set `capacity: 100000000000`.\n\nGarage uses internally the International System of Units (SI), it assumes that 1kB = 1000 bytes, and displays storage as kB, MB, GB (and not KiB, MiB, GiB that assume 1KiB = 1024 bytes).\n ",
+ "operationId": "UpdateClusterLayout",
+ "requestBody": {
+ "description": "\nTo add a new node to the layout or to change the configuration of an existing node, simply set the values you want (`zone`, `capacity`, and `tags`).\nTo remove a node, simply pass the `remove: true` field.\nThis logic is represented in OpenAPI with a 'One Of' object.\n\nContrary to the CLI that may update only a subset of the fields capacity, zone and tags, when calling this API all of these values must be specified.\n ",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateClusterLayoutRequest"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Proposed changes have been added to the list of pending changes",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateClusterLayoutResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ },
+ "/v2/UpdateKey": {
+ "post": {
+ "tags": [
+ "Access key"
+ ],
+ "description": "\nUpdates information about the specified API access key.\n\n*Note: the secret key is not returned in the response, `null` is sent instead.*\n ",
+ "operationId": "UpdateKey",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "query",
+ "description": "Access key ID",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateKeyRequestBody"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "Access key has been updated",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateKeyResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "Internal server error"
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "AddBucketAliasRequest": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/BucketAliasEnum"
+ },
+ {
+ "type": "object",
+ "required": [
+ "bucketId"
+ ],
+ "properties": {
+ "bucketId": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ },
+ "AddBucketAliasResponse": {
+ "$ref": "#/components/schemas/GetBucketInfoResponse"
+ },
+ "AllowBucketKeyRequest": {
+ "$ref": "#/components/schemas/BucketKeyPermChangeRequest"
+ },
+ "AllowBucketKeyResponse": {
+ "$ref": "#/components/schemas/GetBucketInfoResponse"
+ },
+ "ApiBucketKeyPerm": {
+ "type": "object",
+ "properties": {
+ "owner": {
+ "type": "boolean"
+ },
+ "read": {
+ "type": "boolean"
+ },
+ "write": {
+ "type": "boolean"
+ }
+ }
+ },
+ "ApiBucketQuotas": {
+ "type": "object",
+ "properties": {
+ "maxObjects": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64",
+ "minimum": 0
+ },
+ "maxSize": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64",
+ "minimum": 0
+ }
+ }
+ },
+ "ApplyClusterLayoutRequest": {
+ "type": "object",
+ "required": [
+ "version"
+ ],
+ "properties": {
+ "version": {
+ "type": "integer",
+ "format": "int64",
+ "description": "As a safety measure, the new version number of the layout must\nbe specified here",
+ "minimum": 0
+ }
+ }
+ },
+ "ApplyClusterLayoutResponse": {
+ "type": "object",
+ "required": [
+ "message",
+ "layout"
+ ],
+ "properties": {
+ "layout": {
+ "$ref": "#/components/schemas/GetClusterLayoutResponse",
+ "description": "Details about the new cluster layout"
+ },
+ "message": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Plain-text information about the layout computation\n(do not try to parse this)"
+ }
+ }
+ },
+ "BlockError": {
+ "type": "object",
+ "required": [
+ "blockHash",
+ "refcount",
+ "errorCount",
+ "lastTrySecsAgo",
+ "nextTryInSecs"
+ ],
+ "properties": {
+ "blockHash": {
+ "type": "string"
+ },
+ "errorCount": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "lastTrySecsAgo": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "nextTryInSecs": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "refcount": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ }
+ }
+ },
+ "BlockVersion": {
+ "type": "object",
+ "required": [
+ "versionId",
+ "refDeleted",
+ "versionDeleted",
+ "garbageCollected"
+ ],
+ "properties": {
+ "backlink": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/BlockVersionBacklink"
+ }
+ ]
+ },
+ "garbageCollected": {
+ "type": "boolean"
+ },
+ "refDeleted": {
+ "type": "boolean"
+ },
+ "versionDeleted": {
+ "type": "boolean"
+ },
+ "versionId": {
+ "type": "string"
+ }
+ }
+ },
+ "BlockVersionBacklink": {
+ "oneOf": [
+ {
+ "type": "object",
+ "required": [
+ "object"
+ ],
+ "properties": {
+ "object": {
+ "type": "object",
+ "required": [
+ "bucketId",
+ "key"
+ ],
+ "properties": {
+ "bucketId": {
+ "type": "string"
+ },
+ "key": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ },
+ {
+ "type": "object",
+ "required": [
+ "upload"
+ ],
+ "properties": {
+ "upload": {
+ "type": "object",
+ "required": [
+ "uploadId",
+ "uploadDeleted",
+ "uploadGarbageCollected"
+ ],
+ "properties": {
+ "bucketId": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "key": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "uploadDeleted": {
+ "type": "boolean"
+ },
+ "uploadGarbageCollected": {
+ "type": "boolean"
+ },
+ "uploadId": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ ]
+ },
+ "BucketAliasEnum": {
+ "oneOf": [
+ {
+ "type": "object",
+ "required": [
+ "globalAlias"
+ ],
+ "properties": {
+ "globalAlias": {
+ "type": "string"
+ }
+ }
+ },
+ {
+ "type": "object",
+ "required": [
+ "localAlias",
+ "accessKeyId"
+ ],
+ "properties": {
+ "accessKeyId": {
+ "type": "string"
+ },
+ "localAlias": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ },
+ "BucketKeyPermChangeRequest": {
+ "type": "object",
+ "required": [
+ "bucketId",
+ "accessKeyId",
+ "permissions"
+ ],
+ "properties": {
+ "accessKeyId": {
+ "type": "string"
+ },
+ "bucketId": {
+ "type": "string"
+ },
+ "permissions": {
+ "$ref": "#/components/schemas/ApiBucketKeyPerm"
+ }
+ }
+ },
+ "BucketLocalAlias": {
+ "type": "object",
+ "required": [
+ "accessKeyId",
+ "alias"
+ ],
+ "properties": {
+ "accessKeyId": {
+ "type": "string"
+ },
+ "alias": {
+ "type": "string"
+ }
+ }
+ },
+ "CleanupIncompleteUploadsRequest": {
+ "type": "object",
+ "required": [
+ "bucketId",
+ "olderThanSecs"
+ ],
+ "properties": {
+ "bucketId": {
+ "type": "string"
+ },
+ "olderThanSecs": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ }
+ }
+ },
+ "CleanupIncompleteUploadsResponse": {
+ "type": "object",
+ "required": [
+ "uploadsDeleted"
+ ],
+ "properties": {
+ "uploadsDeleted": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ }
+ }
+ },
+ "ClusterLayoutSkipDeadNodesRequest": {
+ "type": "object",
+ "required": [
+ "version",
+ "allowMissingData"
+ ],
+ "properties": {
+ "allowMissingData": {
+ "type": "boolean",
+ "description": "Allow the skip even if a quorum of nodes could not be found for\nthe data among the remaining nodes"
+ },
+ "version": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Version number of the layout to assume is currently up-to-date.\nThis will generally be the current layout version.",
+ "minimum": 0
+ }
+ }
+ },
+ "ClusterLayoutSkipDeadNodesResponse": {
+ "type": "object",
+ "required": [
+ "ackUpdated",
+ "syncUpdated"
+ ],
+ "properties": {
+ "ackUpdated": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Nodes for which the ACK update tracker has been updated to `version`"
+ },
+ "syncUpdated": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "If `allow_missing_data` is set,\nnodes for which the SYNC update tracker has been updated to `version`"
+ }
+ }
+ },
+ "ClusterLayoutVersion": {
+ "type": "object",
+ "required": [
+ "version",
+ "status",
+ "storageNodes",
+ "gatewayNodes"
+ ],
+ "properties": {
+ "gatewayNodes": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Number of nodes with a gateway role in this layout version",
+ "minimum": 0
+ },
+ "status": {
+ "$ref": "#/components/schemas/ClusterLayoutVersionStatus",
+ "description": "Status of this layout version"
+ },
+ "storageNodes": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Number of nodes with an assigned storage capacity in this layout version",
+ "minimum": 0
+ },
+ "version": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Version number of this layout version",
+ "minimum": 0
+ }
+ }
+ },
+ "ClusterLayoutVersionStatus": {
+ "type": "string",
+ "enum": [
+ "Current",
+ "Draining",
+ "Historical"
+ ]
+ },
+ "ConnectClusterNodesRequest": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "ConnectClusterNodesResponse": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ConnectNodeResponse"
+ }
+ },
+ "ConnectNodeResponse": {
+ "type": "object",
+ "required": [
+ "success"
+ ],
+ "properties": {
+ "error": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "description": "An error message if Garage did not manage to connect to this node"
+ },
+ "success": {
+ "type": "boolean",
+ "description": "`true` if Garage managed to connect to this node"
+ }
+ }
+ },
+ "CreateAdminTokenResponse": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/GetAdminTokenInfoResponse"
+ },
+ {
+ "type": "object",
+ "required": [
+ "secretToken"
+ ],
+ "properties": {
+ "secretToken": {
+ "type": "string",
+ "description": "The secret bearer token. **CAUTION:** This token will be shown only\nONCE, so this value MUST be remembered somewhere, or the token\nwill be unusable."
+ }
+ }
+ }
+ ]
+ },
+ "CreateBucketLocalAlias": {
+ "type": "object",
+ "required": [
+ "accessKeyId",
+ "alias"
+ ],
+ "properties": {
+ "accessKeyId": {
+ "type": "string"
+ },
+ "alias": {
+ "type": "string"
+ },
+ "allow": {
+ "$ref": "#/components/schemas/ApiBucketKeyPerm"
+ }
+ }
+ },
+ "CreateBucketRequest": {
+ "type": "object",
+ "properties": {
+ "globalAlias": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "localAlias": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/CreateBucketLocalAlias"
+ }
+ ]
+ }
+ }
+ },
+ "CreateBucketResponse": {
+ "$ref": "#/components/schemas/GetBucketInfoResponse"
+ },
+ "CreateKeyRequest": {
+ "$ref": "#/components/schemas/UpdateKeyRequestBody"
+ },
+ "CreateKeyResponse": {
+ "$ref": "#/components/schemas/GetKeyInfoResponse"
+ },
+ "DenyBucketKeyRequest": {
+ "$ref": "#/components/schemas/BucketKeyPermChangeRequest"
+ },
+ "DenyBucketKeyResponse": {
+ "$ref": "#/components/schemas/GetBucketInfoResponse"
+ },
+ "FreeSpaceResp": {
+ "type": "object",
+ "required": [
+ "available",
+ "total"
+ ],
+ "properties": {
+ "available": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Number of bytes available",
+ "minimum": 0
+ },
+ "total": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Total number of bytes",
+ "minimum": 0
+ }
+ }
+ },
+ "GetAdminTokenInfoResponse": {
+ "type": "object",
+ "required": [
+ "name",
+ "expired",
+ "scope"
+ ],
+ "properties": {
+ "created": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time",
+ "description": "Creation date"
+ },
+ "expiration": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time",
+ "description": "Expiration time and date, formatted according to RFC 3339"
+ },
+ "expired": {
+ "type": "boolean",
+ "description": "Whether this admin token is expired already"
+ },
+ "id": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "description": "Identifier of the admin token (which is also a prefix of the full bearer token)"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the admin API token"
+ },
+ "scope": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Scope of the admin API token, a list of admin endpoint names (such as\n`GetClusterStatus`, etc), or the special value `*` to allow all\nadmin endpoints"
+ }
+ }
+ },
+ "GetBucketInfoKey": {
+ "type": "object",
+ "required": [
+ "accessKeyId",
+ "name",
+ "permissions",
+ "bucketLocalAliases"
+ ],
+ "properties": {
+ "accessKeyId": {
+ "type": "string"
+ },
+ "bucketLocalAliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "name": {
+ "type": "string"
+ },
+ "permissions": {
+ "$ref": "#/components/schemas/ApiBucketKeyPerm"
+ }
+ }
+ },
+ "GetBucketInfoResponse": {
+ "type": "object",
+ "required": [
+ "id",
+ "created",
+ "globalAliases",
+ "websiteAccess",
+ "keys",
+ "objects",
+ "bytes",
+ "unfinishedUploads",
+ "unfinishedMultipartUploads",
+ "unfinishedMultipartUploadParts",
+ "unfinishedMultipartUploadBytes",
+ "quotas"
+ ],
+ "properties": {
+ "bytes": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Total number of bytes used by objects in this bucket"
+ },
+ "created": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Bucket creation date"
+ },
+ "globalAliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "List of global aliases for this bucket"
+ },
+ "id": {
+ "type": "string",
+ "description": "Identifier of the bucket"
+ },
+ "keys": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/GetBucketInfoKey"
+ },
+ "description": "List of access keys that have permissions granted on this bucket"
+ },
+ "objects": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Number of objects in this bucket"
+ },
+ "quotas": {
+ "$ref": "#/components/schemas/ApiBucketQuotas",
+ "description": "Quotas that apply to this bucket"
+ },
+ "unfinishedMultipartUploadBytes": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Total number of bytes used by unfinished multipart uploads in this bucket"
+ },
+ "unfinishedMultipartUploadParts": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Number of parts in unfinished multipart uploads in this bucket"
+ },
+ "unfinishedMultipartUploads": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Number of unfinished multipart uploads in this bucket"
+ },
+ "unfinishedUploads": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Number of unfinished uploads in this bucket"
+ },
+ "websiteAccess": {
+ "type": "boolean",
+ "description": "Whether website acces is enabled for this bucket"
+ },
+ "websiteConfig": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/GetBucketInfoWebsiteResponse",
+ "description": "Website configuration for this bucket"
+ }
+ ]
+ }
+ }
+ },
+ "GetBucketInfoWebsiteResponse": {
+ "type": "object",
+ "required": [
+ "indexDocument"
+ ],
+ "properties": {
+ "errorDocument": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "indexDocument": {
+ "type": "string"
+ }
+ }
+ },
+ "GetClusterHealthResponse": {
+ "type": "object",
+ "required": [
+ "status",
+ "knownNodes",
+ "connectedNodes",
+ "storageNodes",
+ "storageNodesUp",
+ "partitions",
+ "partitionsQuorum",
+ "partitionsAllOk"
+ ],
+ "properties": {
+ "connectedNodes": {
+ "type": "integer",
+ "description": "the nubmer of nodes this Garage node currently has an open connection to",
+ "minimum": 0
+ },
+ "knownNodes": {
+ "type": "integer",
+ "description": "the number of nodes this Garage node has had a TCP connection to since the daemon started",
+ "minimum": 0
+ },
+ "partitions": {
+ "type": "integer",
+ "description": "the total number of partitions of the data (currently always 256)",
+ "minimum": 0
+ },
+ "partitionsAllOk": {
+ "type": "integer",
+ "description": "the number of partitions for which we are connected to all storage nodes responsible of storing it",
+ "minimum": 0
+ },
+ "partitionsQuorum": {
+ "type": "integer",
+ "description": "the number of partitions for which a quorum of write nodes is available",
+ "minimum": 0
+ },
+ "status": {
+ "type": "string",
+ "description": "One of `healthy`, `degraded` or `unavailable`:\n- `healthy`: Garage node is connected to all storage nodes\n- `degraded`: Garage node is not connected to all storage nodes, but a quorum of write nodes is available for all partitions\n- `unavailable`: a quorum of write nodes is not available for some partitions"
+ },
+ "storageNodes": {
+ "type": "integer",
+ "description": "the number of storage nodes currently registered in the cluster layout",
+ "minimum": 0
+ },
+ "storageNodesUp": {
+ "type": "integer",
+ "description": "the number of storage nodes to which a connection is currently open",
+ "minimum": 0
+ }
+ }
+ },
+ "GetClusterLayoutHistoryResponse": {
+ "type": "object",
+ "required": [
+ "currentVersion",
+ "minAck",
+ "versions"
+ ],
+ "properties": {
+ "currentVersion": {
+ "type": "integer",
+ "format": "int64",
+ "description": "The current version number of the cluster layout",
+ "minimum": 0
+ },
+ "minAck": {
+ "type": "integer",
+ "format": "int64",
+ "description": "All nodes in the cluster are aware of layout versions up to\nthis version number (at least)",
+ "minimum": 0
+ },
+ "updateTrackers": {
+ "type": [
+ "object",
+ "null"
+ ],
+ "description": "Detailed update trackers for nodes (see\n`https://garagehq.deuxfleurs.fr/blog/2023-12-preserving-read-after-write-consistency/`)",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/NodeUpdateTrackers"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "versions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ClusterLayoutVersion"
+ },
+ "description": "Layout version history"
+ }
+ }
+ },
+ "GetClusterLayoutResponse": {
+ "type": "object",
+ "required": [
+ "version",
+ "roles",
+ "parameters",
+ "partitionSize",
+ "stagedRoleChanges"
+ ],
+ "properties": {
+ "parameters": {
+ "$ref": "#/components/schemas/LayoutParameters",
+ "description": "Layout parameters used when the current layout was computed"
+ },
+ "partitionSize": {
+ "type": "integer",
+ "format": "int64",
+ "description": "The size, in bytes, of one Garage partition (= a shard)",
+ "minimum": 0
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/LayoutNodeRole"
+ },
+ "description": "List of nodes that currently have a role in the cluster layout"
+ },
+ "stagedParameters": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/LayoutParameters",
+ "description": "Layout parameters to use when computing the next version of\nthe cluster layout"
+ }
+ ]
+ },
+ "stagedRoleChanges": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NodeRoleChange"
+ },
+ "description": "List of nodes that will have a new role or whose role will be\nremoved in the next version of the cluster layout"
+ },
+ "version": {
+ "type": "integer",
+ "format": "int64",
+ "description": "The current version number of the cluster layout",
+ "minimum": 0
+ }
+ }
+ },
+ "GetClusterStatisticsResponse": {
+ "type": "object",
+ "required": [
+ "freeform"
+ ],
+ "properties": {
+ "freeform": {
+ "type": "string"
+ }
+ }
+ },
+ "GetClusterStatusResponse": {
+ "type": "object",
+ "required": [
+ "layoutVersion",
+ "nodes"
+ ],
+ "properties": {
+ "layoutVersion": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Current version number of the cluster layout",
+ "minimum": 0
+ },
+ "nodes": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NodeResp"
+ },
+ "description": "List of nodes that are either currently connected, part of the\ncurrent cluster layout, or part of an older cluster layout that\nis still active in the cluster (being drained)."
+ }
+ }
+ },
+ "GetCurrentAdminTokenInfoResponse": {
+ "$ref": "#/components/schemas/GetAdminTokenInfoResponse"
+ },
+ "GetKeyInfoResponse": {
+ "type": "object",
+ "required": [
+ "accessKeyId",
+ "name",
+ "expired",
+ "permissions",
+ "buckets"
+ ],
+ "properties": {
+ "accessKeyId": {
+ "type": "string"
+ },
+ "buckets": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/KeyInfoBucketResponse"
+ }
+ },
+ "created": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "expiration": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "expired": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "string"
+ },
+ "permissions": {
+ "$ref": "#/components/schemas/KeyPerm"
+ },
+ "secretAccessKey": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ }
+ },
+ "ImportKeyRequest": {
+ "type": "object",
+ "required": [
+ "accessKeyId",
+ "secretAccessKey"
+ ],
+ "properties": {
+ "accessKeyId": {
+ "type": "string"
+ },
+ "name": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "secretAccessKey": {
+ "type": "string"
+ }
+ }
+ },
+ "ImportKeyResponse": {
+ "$ref": "#/components/schemas/GetKeyInfoResponse"
+ },
+ "InspectObjectBlock": {
+ "type": "object",
+ "required": [
+ "partNumber",
+ "offset",
+ "hash",
+ "size"
+ ],
+ "properties": {
+ "hash": {
+ "type": "string",
+ "description": "Hash (blake2 sum) of the block's data"
+ },
+ "offset": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Offset of this block within the part",
+ "minimum": 0
+ },
+ "partNumber": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Part number of the part containing this block, for multipart uploads",
+ "minimum": 0
+ },
+ "size": {
+ "type": "integer",
+ "format": "int64",
+ "description": "Length of the blocks's data",
+ "minimum": 0
+ }
+ }
+ },
+ "InspectObjectResponse": {
+ "type": "object",
+ "required": [
+ "bucketId",
+ "key",
+ "versions"
+ ],
+ "properties": {
+ "bucketId": {
+ "type": "string",
+ "description": "ID of the bucket containing the inspected object"
+ },
+ "key": {
+ "type": "string",
+ "description": "Key of the inspected object"
+ },
+ "versions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/InspectObjectVersion"
+ },
+ "description": "List of versions currently stored for this object"
+ }
+ }
+ },
+ "InspectObjectVersion": {
+ "type": "object",
+ "required": [
+ "uuid",
+ "timestamp",
+ "encrypted",
+ "uploading",
+ "aborted",
+ "deleteMarker",
+ "inline"
+ ],
+ "properties": {
+ "aborted": {
+ "type": "boolean",
+ "description": "Whether this is an aborted upload"
+ },
+ "blocks": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/InspectObjectBlock"
+ },
+ "description": "List of data blocks for this object version"
+ },
+ "deleteMarker": {
+ "type": "boolean",
+ "description": "Whether this version is a delete marker (a tombstone indicating that a previous version of\nthe object has been deleted)"
+ },
+ "encrypted": {
+ "type": "boolean",
+ "description": "Whether this object version was created with SSE-C encryption"
+ },
+ "etag": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "description": "Etag of this object version"
+ },
+ "headers": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": false,
+ "prefixItems": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "description": "Metadata (HTTP headers) associated with this object version"
+ },
+ "inline": {
+ "type": "boolean",
+ "description": "Whether the object's data is stored inline (for small objects)"
+ },
+ "size": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64",
+ "description": "Size of the object, in bytes",
+ "minimum": 0
+ },
+ "timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Creation timestamp of this object version"
+ },
+ "uploading": {
+ "type": "boolean",
+ "description": "Whether this object version is still uploading"
+ },
+ "uuid": {
+ "type": "string",
+ "description": "Version ID"
+ }
+ }
+ },
+ "KeyInfoBucketResponse": {
+ "type": "object",
+ "required": [
+ "id",
+ "globalAliases",
+ "localAliases",
+ "permissions"
+ ],
+ "properties": {
+ "globalAliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "id": {
+ "type": "string"
+ },
+ "localAliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "permissions": {
+ "$ref": "#/components/schemas/ApiBucketKeyPerm"
+ }
+ }
+ },
+ "KeyPerm": {
+ "type": "object",
+ "properties": {
+ "createBucket": {
+ "type": "boolean"
+ }
+ }
+ },
+ "LayoutNodeRole": {
+ "type": "object",
+ "required": [
+ "id",
+ "zone",
+ "tags"
+ ],
+ "properties": {
+ "capacity": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64",
+ "description": "Capacity (in bytes) assigned by the cluster administrator,\nabsent for gateway nodes",
+ "minimum": 0
+ },
+ "id": {
+ "type": "string",
+ "description": "Identifier of the node"
+ },
+ "storedPartitions": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64",
+ "description": "Number of partitions stored on this node\n(a result of the layout computation)",
+ "minimum": 0
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "List of tags assigned by the cluster administrator"
+ },
+ "usableCapacity": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64",
+ "description": "Capacity (in bytes) that is actually usable on this node in the current\nlayout, which is equal to `stored_partitions` × `partition_size`",
+ "minimum": 0
+ },
+ "zone": {
+ "type": "string",
+ "description": "Zone name assigned by the cluster administrator"
+ }
+ }
+ },
+ "LayoutParameters": {
+ "type": "object",
+ "required": [
+ "zoneRedundancy"
+ ],
+ "properties": {
+ "zoneRedundancy": {
+ "$ref": "#/components/schemas/ZoneRedundancy",
+ "description": "Minimum number of zones in which a data partition must be replicated"
+ }
+ }
+ },
+ "ListAdminTokensResponse": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/GetAdminTokenInfoResponse"
+ }
+ },
+ "ListBucketsResponse": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ListBucketsResponseItem"
+ }
+ },
+ "ListBucketsResponseItem": {
+ "type": "object",
+ "required": [
+ "id",
+ "created",
+ "globalAliases",
+ "localAliases"
+ ],
+ "properties": {
+ "created": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "globalAliases": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "id": {
+ "type": "string"
+ },
+ "localAliases": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/BucketLocalAlias"
+ }
+ }
+ }
+ },
+ "ListKeysResponse": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ListKeysResponseItem"
+ }
+ },
+ "ListKeysResponseItem": {
+ "type": "object",
+ "required": [
+ "id",
+ "name",
+ "expired"
+ ],
+ "properties": {
+ "created": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "expiration": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time"
+ },
+ "expired": {
+ "type": "boolean"
+ },
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "LocalCreateMetadataSnapshotResponse": {
+ "default": null
+ },
+ "LocalGetBlockInfoRequest": {
+ "type": "object",
+ "required": [
+ "blockHash"
+ ],
+ "properties": {
+ "blockHash": {
+ "type": "string"
+ }
+ }
+ },
+ "LocalGetBlockInfoResponse": {
+ "type": "object",
+ "required": [
+ "blockHash",
+ "refcount",
+ "versions"
+ ],
+ "properties": {
+ "blockHash": {
+ "type": "string"
+ },
+ "refcount": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "versions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/BlockVersion"
+ }
+ }
+ }
+ },
+ "LocalGetNodeInfoResponse": {
+ "type": "object",
+ "required": [
+ "nodeId",
+ "garageVersion",
+ "rustVersion",
+ "dbEngine"
+ ],
+ "properties": {
+ "dbEngine": {
+ "type": "string"
+ },
+ "garageFeatures": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "garageVersion": {
+ "type": "string"
+ },
+ "nodeId": {
+ "type": "string"
+ },
+ "rustVersion": {
+ "type": "string"
+ }
+ }
+ },
+ "LocalGetNodeStatisticsResponse": {
+ "type": "object",
+ "required": [
+ "freeform"
+ ],
+ "properties": {
+ "freeform": {
+ "type": "string"
+ }
+ }
+ },
+ "LocalGetWorkerInfoRequest": {
+ "type": "object",
+ "required": [
+ "id"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ }
+ }
+ },
+ "LocalGetWorkerInfoResponse": {
+ "$ref": "#/components/schemas/WorkerInfoResp"
+ },
+ "LocalGetWorkerVariableRequest": {
+ "type": "object",
+ "properties": {
+ "variable": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ }
+ },
+ "LocalGetWorkerVariableResponse": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "LocalLaunchRepairOperationRequest": {
+ "type": "object",
+ "required": [
+ "repairType"
+ ],
+ "properties": {
+ "repairType": {
+ "$ref": "#/components/schemas/RepairType"
+ }
+ }
+ },
+ "LocalLaunchRepairOperationResponse": {
+ "default": null
+ },
+ "LocalListBlockErrorsResponse": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/BlockError"
+ }
+ },
+ "LocalListWorkersRequest": {
+ "type": "object",
+ "properties": {
+ "busyOnly": {
+ "type": "boolean"
+ },
+ "errorOnly": {
+ "type": "boolean"
+ }
+ }
+ },
+ "LocalListWorkersResponse": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/WorkerInfoResp"
+ }
+ },
+ "LocalPurgeBlocksRequest": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "LocalPurgeBlocksResponse": {
+ "type": "object",
+ "required": [
+ "blocksPurged",
+ "objectsDeleted",
+ "uploadsDeleted",
+ "versionsDeleted",
+ "blockRefsPurged"
+ ],
+ "properties": {
+ "blockRefsPurged": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "blocksPurged": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "objectsDeleted": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "uploadsDeleted": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "versionsDeleted": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ }
+ }
+ },
+ "LocalRetryBlockResyncRequest": {
+ "oneOf": [
+ {
+ "type": "object",
+ "required": [
+ "all"
+ ],
+ "properties": {
+ "all": {
+ "type": "boolean"
+ }
+ }
+ },
+ {
+ "type": "object",
+ "required": [
+ "blockHashes"
+ ],
+ "properties": {
+ "blockHashes": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ ]
+ },
+ "LocalRetryBlockResyncResponse": {
+ "type": "object",
+ "required": [
+ "count"
+ ],
+ "properties": {
+ "count": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ }
+ }
+ },
+ "LocalSetWorkerVariableRequest": {
+ "type": "object",
+ "required": [
+ "variable",
+ "value"
+ ],
+ "properties": {
+ "value": {
+ "type": "string"
+ },
+ "variable": {
+ "type": "string"
+ }
+ }
+ },
+ "LocalSetWorkerVariableResponse": {
+ "type": "object",
+ "required": [
+ "variable",
+ "value"
+ ],
+ "properties": {
+ "value": {
+ "type": "string"
+ },
+ "variable": {
+ "type": "string"
+ }
+ }
+ },
+ "MultiResponse_LocalCreateMetadataSnapshotResponse": {
+ "type": "object",
+ "required": [
+ "success",
+ "error"
+ ],
+ "properties": {
+ "error": {
+ "type": "object",
+ "description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "success": {
+ "type": "object",
+ "description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
+ "additionalProperties": {
+ "default": null
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "MultiResponse_LocalGetBlockInfoResponse": {
+ "type": "object",
+ "required": [
+ "success",
+ "error"
+ ],
+ "properties": {
+ "error": {
+ "type": "object",
+ "description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "success": {
+ "type": "object",
+ "description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
+ "additionalProperties": {
+ "type": "object",
+ "required": [
+ "blockHash",
+ "refcount",
+ "versions"
+ ],
+ "properties": {
+ "blockHash": {
+ "type": "string"
+ },
+ "refcount": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "versions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/BlockVersion"
+ }
+ }
+ }
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "MultiResponse_LocalGetNodeInfoResponse": {
+ "type": "object",
+ "required": [
+ "success",
+ "error"
+ ],
+ "properties": {
+ "error": {
+ "type": "object",
+ "description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "success": {
+ "type": "object",
+ "description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
+ "additionalProperties": {
+ "type": "object",
+ "required": [
+ "nodeId",
+ "garageVersion",
+ "rustVersion",
+ "dbEngine"
+ ],
+ "properties": {
+ "dbEngine": {
+ "type": "string"
+ },
+ "garageFeatures": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "type": "string"
+ }
+ },
+ "garageVersion": {
+ "type": "string"
+ },
+ "nodeId": {
+ "type": "string"
+ },
+ "rustVersion": {
+ "type": "string"
+ }
+ }
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "MultiResponse_LocalGetNodeStatisticsResponse": {
+ "type": "object",
+ "required": [
+ "success",
+ "error"
+ ],
+ "properties": {
+ "error": {
+ "type": "object",
+ "description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "success": {
+ "type": "object",
+ "description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
+ "additionalProperties": {
+ "type": "object",
+ "required": [
+ "freeform"
+ ],
+ "properties": {
+ "freeform": {
+ "type": "string"
+ }
+ }
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "MultiResponse_LocalGetWorkerInfoResponse": {
+ "type": "object",
+ "required": [
+ "success",
+ "error"
+ ],
+ "properties": {
+ "error": {
+ "type": "object",
+ "description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "success": {
+ "type": "object",
+ "description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/WorkerInfoResp"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "MultiResponse_LocalGetWorkerVariableResponse": {
+ "type": "object",
+ "required": [
+ "success",
+ "error"
+ ],
+ "properties": {
+ "error": {
+ "type": "object",
+ "description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "success": {
+ "type": "object",
+ "description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "MultiResponse_LocalLaunchRepairOperationResponse": {
+ "type": "object",
+ "required": [
+ "success",
+ "error"
+ ],
+ "properties": {
+ "error": {
+ "type": "object",
+ "description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "success": {
+ "type": "object",
+ "description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
+ "additionalProperties": {
+ "default": null
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "MultiResponse_LocalListBlockErrorsResponse": {
+ "type": "object",
+ "required": [
+ "success",
+ "error"
+ ],
+ "properties": {
+ "error": {
+ "type": "object",
+ "description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "success": {
+ "type": "object",
+ "description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/BlockError"
+ }
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "MultiResponse_LocalListWorkersResponse": {
+ "type": "object",
+ "required": [
+ "success",
+ "error"
+ ],
+ "properties": {
+ "error": {
+ "type": "object",
+ "description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "success": {
+ "type": "object",
+ "description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/WorkerInfoResp"
+ }
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "MultiResponse_LocalPurgeBlocksResponse": {
+ "type": "object",
+ "required": [
+ "success",
+ "error"
+ ],
+ "properties": {
+ "error": {
+ "type": "object",
+ "description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "success": {
+ "type": "object",
+ "description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
+ "additionalProperties": {
+ "type": "object",
+ "required": [
+ "blocksPurged",
+ "objectsDeleted",
+ "uploadsDeleted",
+ "versionsDeleted",
+ "blockRefsPurged"
+ ],
+ "properties": {
+ "blockRefsPurged": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "blocksPurged": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "objectsDeleted": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "uploadsDeleted": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "versionsDeleted": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ }
+ }
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "MultiResponse_LocalRetryBlockResyncResponse": {
+ "type": "object",
+ "required": [
+ "success",
+ "error"
+ ],
+ "properties": {
+ "error": {
+ "type": "object",
+ "description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "success": {
+ "type": "object",
+ "description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
+ "additionalProperties": {
+ "type": "object",
+ "required": [
+ "count"
+ ],
+ "properties": {
+ "count": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ }
+ }
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "MultiResponse_LocalSetWorkerVariableResponse": {
+ "type": "object",
+ "required": [
+ "success",
+ "error"
+ ],
+ "properties": {
+ "error": {
+ "type": "object",
+ "description": "Map of node id to error message, for nodes that were unable to complete the API\ncall",
+ "additionalProperties": {
+ "type": "string"
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ },
+ "success": {
+ "type": "object",
+ "description": "Map of node id to response returned by this node, for nodes that were able to\nsuccessfully complete the API call",
+ "additionalProperties": {
+ "type": "object",
+ "required": [
+ "variable",
+ "value"
+ ],
+ "properties": {
+ "value": {
+ "type": "string"
+ },
+ "variable": {
+ "type": "string"
+ }
+ }
+ },
+ "propertyNames": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "NodeAssignedRole": {
+ "type": "object",
+ "required": [
+ "zone",
+ "tags"
+ ],
+ "properties": {
+ "capacity": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64",
+ "description": "Capacity (in bytes) assigned by the cluster administrator,\nabsent for gateway nodes",
+ "minimum": 0
+ },
+ "tags": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "List of tags assigned by the cluster administrator"
+ },
+ "zone": {
+ "type": "string",
+ "description": "Zone name assigned by the cluster administrator"
+ }
+ }
+ },
+ "NodeResp": {
+ "type": "object",
+ "required": [
+ "id",
+ "isUp",
+ "draining"
+ ],
+ "properties": {
+ "addr": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "description": "Socket address used by other nodes to connect to this node for RPC"
+ },
+ "dataPartition": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/FreeSpaceResp",
+ "description": "Total and available space on the disk partition(s) containing the data\ndirectory(ies)"
+ }
+ ]
+ },
+ "draining": {
+ "type": "boolean",
+ "description": "Whether this node is part of an older layout version and is draining data."
+ },
+ "garageVersion": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "description": "Garage version"
+ },
+ "hostname": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "description": "Hostname of the node"
+ },
+ "id": {
+ "type": "string",
+ "description": "Full-length node identifier"
+ },
+ "isUp": {
+ "type": "boolean",
+ "description": "Whether this node is connected in the cluster"
+ },
+ "lastSeenSecsAgo": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64",
+ "description": "For disconnected nodes, the number of seconds since last contact,\nor `null` if no contact was established since Garage restarted.",
+ "minimum": 0
+ },
+ "metadataPartition": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/FreeSpaceResp",
+ "description": "Total and available space on the disk partition containing the\nmetadata directory"
+ }
+ ]
+ },
+ "role": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/NodeAssignedRole",
+ "description": "Role assigned to this node in the current cluster layout"
+ }
+ ]
+ }
+ }
+ },
+ "NodeRoleChange": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/NodeRoleChangeEnum"
+ },
+ {
+ "type": "object",
+ "required": [
+ "id"
+ ],
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "ID of the node for which this change applies"
+ }
+ }
+ }
+ ]
+ },
+ "NodeRoleChangeEnum": {
+ "oneOf": [
+ {
+ "type": "object",
+ "required": [
+ "remove"
+ ],
+ "properties": {
+ "remove": {
+ "type": "boolean",
+ "description": "Set `remove` to `true` to remove the node from the layout"
+ }
+ }
+ },
+ {
+ "$ref": "#/components/schemas/NodeAssignedRole"
+ }
+ ]
+ },
+ "NodeUpdateTrackers": {
+ "type": "object",
+ "required": [
+ "ack",
+ "sync",
+ "syncAck"
+ ],
+ "properties": {
+ "ack": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "sync": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "syncAck": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ }
+ }
+ },
+ "PreviewClusterLayoutChangesResponse": {
+ "oneOf": [
+ {
+ "type": "object",
+ "required": [
+ "error"
+ ],
+ "properties": {
+ "error": {
+ "type": "string",
+ "description": "Error message indicating that the layout could not be computed\nwith the provided configuration"
+ }
+ }
+ },
+ {
+ "type": "object",
+ "required": [
+ "message",
+ "newLayout"
+ ],
+ "properties": {
+ "message": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Plain-text information about the layout computation\n(do not try to parse this)"
+ },
+ "newLayout": {
+ "$ref": "#/components/schemas/GetClusterLayoutResponse",
+ "description": "Details about the new cluster layout"
+ }
+ }
+ }
+ ]
+ },
+ "RemoveBucketAliasRequest": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/BucketAliasEnum"
+ },
+ {
+ "type": "object",
+ "required": [
+ "bucketId"
+ ],
+ "properties": {
+ "bucketId": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ },
+ "RemoveBucketAliasResponse": {
+ "$ref": "#/components/schemas/GetBucketInfoResponse"
+ },
+ "RepairType": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "tables"
+ ]
+ },
+ {
+ "type": "string",
+ "enum": [
+ "blocks"
+ ]
+ },
+ {
+ "type": "string",
+ "enum": [
+ "versions"
+ ]
+ },
+ {
+ "type": "string",
+ "enum": [
+ "multipartUploads"
+ ]
+ },
+ {
+ "type": "string",
+ "enum": [
+ "blockRefs"
+ ]
+ },
+ {
+ "type": "string",
+ "enum": [
+ "blockRc"
+ ]
+ },
+ {
+ "type": "string",
+ "enum": [
+ "rebalance"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "scrub"
+ ],
+ "properties": {
+ "scrub": {
+ "$ref": "#/components/schemas/ScrubCommand"
+ }
+ }
+ },
+ {
+ "type": "string",
+ "enum": [
+ "aliases"
+ ]
+ },
+ {
+ "type": "string",
+ "enum": [
+ "clearResyncQueue"
+ ]
+ }
+ ]
+ },
+ "RevertClusterLayoutResponse": {
+ "$ref": "#/components/schemas/GetClusterLayoutResponse"
+ },
+ "ScrubCommand": {
+ "type": "string",
+ "enum": [
+ "start",
+ "pause",
+ "resume",
+ "cancel"
+ ]
+ },
+ "UpdateAdminTokenRequestBody": {
+ "type": "object",
+ "properties": {
+ "expiration": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time",
+ "description": "Expiration time and date, formatted according to RFC 3339"
+ },
+ "name": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "description": "Name of the admin API token"
+ },
+ "neverExpires": {
+ "type": "boolean",
+ "description": "Set the admin token to never expire"
+ },
+ "scope": {
+ "type": [
+ "array",
+ "null"
+ ],
+ "items": {
+ "type": "string"
+ },
+ "description": "Scope of the admin API token, a list of admin endpoint names (such as\n`GetClusterStatus`, etc), or the special value `*` to allow all\nadmin endpoints. **WARNING:** Granting a scope of `CreateAdminToken` or\n`UpdateAdminToken` trivially allows for privilege escalation, and is thus\nfunctionnally equivalent to granting a scope of `*`."
+ }
+ }
+ },
+ "UpdateAdminTokenResponse": {
+ "$ref": "#/components/schemas/GetAdminTokenInfoResponse"
+ },
+ "UpdateBucketRequestBody": {
+ "type": "object",
+ "properties": {
+ "quotas": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/ApiBucketQuotas"
+ }
+ ]
+ },
+ "websiteAccess": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/UpdateBucketWebsiteAccess"
+ }
+ ]
+ }
+ }
+ },
+ "UpdateBucketResponse": {
+ "$ref": "#/components/schemas/GetBucketInfoResponse"
+ },
+ "UpdateBucketWebsiteAccess": {
+ "type": "object",
+ "required": [
+ "enabled"
+ ],
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ },
+ "errorDocument": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "indexDocument": {
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ }
+ },
+ "UpdateClusterLayoutRequest": {
+ "type": "object",
+ "properties": {
+ "parameters": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/LayoutParameters",
+ "description": "New layout computation parameters to use"
+ }
+ ]
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NodeRoleChange"
+ },
+ "description": "New node roles to assign or remove in the cluster layout"
+ }
+ }
+ },
+ "UpdateClusterLayoutResponse": {
+ "$ref": "#/components/schemas/GetClusterLayoutResponse"
+ },
+ "UpdateKeyRequestBody": {
+ "type": "object",
+ "properties": {
+ "allow": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/KeyPerm",
+ "description": "Permissions to allow for the key"
+ }
+ ]
+ },
+ "deny": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/KeyPerm",
+ "description": "Permissions to deny for the key"
+ }
+ ]
+ },
+ "expiration": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "format": "date-time",
+ "description": "Expiration time and date, formatted according to RFC 3339"
+ },
+ "name": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "description": "Name of the API key"
+ },
+ "neverExpires": {
+ "type": "boolean",
+ "description": "Set the access key to never expire"
+ }
+ }
+ },
+ "UpdateKeyResponse": {
+ "$ref": "#/components/schemas/GetKeyInfoResponse"
+ },
+ "WorkerInfoResp": {
+ "type": "object",
+ "required": [
+ "id",
+ "name",
+ "state",
+ "errors",
+ "consecutiveErrors",
+ "freeform"
+ ],
+ "properties": {
+ "consecutiveErrors": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "errors": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "freeform": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "id": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ },
+ "lastError": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/WorkerLastError"
+ }
+ ]
+ },
+ "name": {
+ "type": "string"
+ },
+ "persistentErrors": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64",
+ "minimum": 0
+ },
+ "progress": {
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "queueLength": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int64",
+ "minimum": 0
+ },
+ "state": {
+ "$ref": "#/components/schemas/WorkerStateResp"
+ },
+ "tranquility": {
+ "type": [
+ "integer",
+ "null"
+ ],
+ "format": "int32",
+ "minimum": 0
+ }
+ }
+ },
+ "WorkerLastError": {
+ "type": "object",
+ "required": [
+ "message",
+ "secsAgo"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "secsAgo": {
+ "type": "integer",
+ "format": "int64",
+ "minimum": 0
+ }
+ }
+ },
+ "WorkerStateResp": {
+ "oneOf": [
+ {
+ "type": "string",
+ "enum": [
+ "busy"
+ ]
+ },
+ {
+ "type": "object",
+ "required": [
+ "throttled"
+ ],
+ "properties": {
+ "throttled": {
+ "type": "object",
+ "required": [
+ "durationSecs"
+ ],
+ "properties": {
+ "durationSecs": {
+ "type": "number",
+ "format": "float"
+ }
+ }
+ }
+ }
+ },
+ {
+ "type": "string",
+ "enum": [
+ "idle"
+ ]
+ },
+ {
+ "type": "string",
+ "enum": [
+ "done"
+ ]
+ }
+ ]
+ },
+ "ZoneRedundancy": {
+ "oneOf": [
+ {
+ "type": "object",
+ "description": "Partitions must be replicated in at least this number of\ndistinct zones.",
+ "required": [
+ "atLeast"
+ ],
+ "properties": {
+ "atLeast": {
+ "type": "integer",
+ "description": "Partitions must be replicated in at least this number of\ndistinct zones.",
+ "minimum": 0
+ }
+ }
+ },
+ {
+ "type": "string",
+ "description": "Partitions must be replicated in as many zones as possible:\nas many zones as there are replicas, if there are enough distinct\nzones, or at least one in each zone otherwise.",
+ "enum": [
+ "maximum"
+ ]
+ }
+ ]
+ }
+ },
+ "securitySchemes": {
+ "bearerAuth": {
+ "type": "http",
+ "scheme": "bearer"
+ }
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+}
diff --git a/doc/book/cookbook/ansible.md b/doc/book/cookbook/ansible.md
index 8b0d2969..58457881 100644
--- a/doc/book/cookbook/ansible.md
+++ b/doc/book/cookbook/ansible.md
@@ -8,7 +8,7 @@ have published Ansible roles. We list them and compare them below.
## Comparison of Ansible roles
-| Feature | [ansible-role-garage](#zorun-ansible-role-garage) | [garage-docker-ansible-deploy](#moan0s-garage-docker-ansible-deploy) | [eddster ansible-role-garage](#eddster-ansible-role-garage) |
+| Feature | [ansible-role-garage](#zorun-ansible-role-garage) | [garage-docker-ansible-deploy](#moan0s-garage-docker-ansible-deploy) | [eddster2309 ansible-role-garage](#eddster2309-ansible-role-garage) |
|------------------------------------|---------------------------------------------|---------------------------------------------------------------|---------------------------------|
| **Runtime** | Systemd | Docker | Systemd |
| **Target OS** | Any Linux | Any Linux | Any Linux |
diff --git a/doc/book/cookbook/binary-packages.md b/doc/book/cookbook/binary-packages.md
index ce6beb7b..0a6ad8fc 100644
--- a/doc/book/cookbook/binary-packages.md
+++ b/doc/book/cookbook/binary-packages.md
@@ -15,10 +15,9 @@ Alpine Linux repositories (available since v3.17):
apk add garage
```
-The default configuration file is installed to `/etc/garage/garage.toml`. You can run
-Garage using: `rc-service garage start`.
-
-If you don't specify `rpc_secret`, it will be automatically replaced with a random string on the first start.
+The default configuration file is installed to `/etc/garage.toml`. You can run
+Garage using: `rc-service garage start`. If you don't specify `rpc_secret`, it
+will be automatically replaced with a random string on the first start.
Please note that this package is built without Consul discovery, Kubernetes
discovery, OpenTelemetry exporter, and K2V features (K2V will be enabled once
@@ -27,7 +26,7 @@ it's stable).
## Arch Linux
-Garage is available in the official repositories under [extra](https://archlinux.org/packages/extra/x86_64/garage).
+Garage is available in the [AUR](https://aur.archlinux.org/packages/garage).
## FreeBSD
diff --git a/doc/book/cookbook/kubernetes.md b/doc/book/cookbook/kubernetes.md
index f5bceec8..fde6ee4e 100644
--- a/doc/book/cookbook/kubernetes.md
+++ b/doc/book/cookbook/kubernetes.md
@@ -11,7 +11,7 @@ Firstly clone the repository:
```bash
git clone https://git.deuxfleurs.fr/Deuxfleurs/garage
-cd garage/script/helm
+cd garage/scripts/helm
```
Deploy with default options:
@@ -52,7 +52,7 @@ This is an example `values.overrride.yaml` for deploying in a microk8s cluster w
```yaml
garage:
# Use only 2 replicas per object
- replicationMode: "2"
+ replicationFactor: 2
# Start 4 instances (StatefulSets) of garage
deployment:
diff --git a/doc/book/cookbook/real-world.md b/doc/book/cookbook/real-world.md
index b9927c06..61adeb58 100644
--- a/doc/book/cookbook/real-world.md
+++ b/doc/book/cookbook/real-world.md
@@ -96,14 +96,14 @@ to store 2 TB of data in total.
## Get a Docker image
Our docker image is currently named `dxflrs/garage` and is stored on the [Docker Hub](https://hub.docker.com/r/dxflrs/garage/tags?page=1&ordering=last_updated).
-We encourage you to use a fixed tag (eg. `v1.3.0`) and not the `latest` tag.
-For this example, we will use the latest published version at the time of the writing which is `v1.3.0` but it's up to you
+We encourage you to use a fixed tag (eg. `v2.1.0`) and not the `latest` tag.
+For this example, we will use the latest published version at the time of the writing which is `v2.1.0` but it's up to you
to check [the most recent versions on the Docker Hub](https://hub.docker.com/r/dxflrs/garage/tags?page=1&ordering=last_updated).
For example:
```
-sudo docker pull dxflrs/garage:v1.3.0
+sudo docker pull dxflrs/garage:v2.1.0
```
## Deploying and configuring Garage
@@ -171,7 +171,7 @@ docker run \
-v /etc/garage.toml:/etc/garage.toml \
-v /var/lib/garage/meta:/var/lib/garage/meta \
-v /var/lib/garage/data:/var/lib/garage/data \
- dxflrs/garage:v1.3.0
+ dxflrs/garage:v2.1.0
```
With this command line, Garage should be started automatically at each boot.
@@ -185,7 +185,7 @@ If you want to use `docker-compose`, you may use the following `docker-compose.y
version: "3"
services:
garage:
- image: dxflrs/garage:v1.3.0
+ image: dxflrs/garage:v2.1.0
network_mode: "host"
restart: unless-stopped
volumes:
diff --git a/doc/book/cookbook/reverse-proxy.md b/doc/book/cookbook/reverse-proxy.md
index bdc1c549..e4a0f6c3 100644
--- a/doc/book/cookbook/reverse-proxy.md
+++ b/doc/book/cookbook/reverse-proxy.md
@@ -97,7 +97,7 @@ server {
location / {
proxy_pass http://s3_backend;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $host;
+ proxy_set_header Host $http_host;
# Disable buffering to a temporary file.
proxy_max_temp_file_size 0;
}
diff --git a/doc/book/design/goals.md b/doc/book/design/goals.md
index efa3cd33..3fe80e8f 100644
--- a/doc/book/design/goals.md
+++ b/doc/book/design/goals.md
@@ -59,11 +59,13 @@ Garage themselves for the following tasks:
- Hosting of their homepage, [privacyguides.org](https://www.privacyguides.org/), and various other static sites
-- As a Mastodon object storage backend for [mstdn.party](https://mstdn.party/) and [mstdn.plus](https://mstdn.plus/)
+- As a PowerDNS authoritative zone backend through [Lightning Stream](https://doc.powerdns.com/lightningstream/latest/index.html) and [LMDB](https://doc.powerdns.com/authoritative/backends/lmdb.html)
+
+- As a Mastodon media storage backend for [mstdn.party](https://mstdn.party/) and [mstdn.plus](https://mstdn.plus/)
- As a PeerTube storage backend for [neat.tube](https://neat.tube/)
- As a [Matrix media backend](https://github.com/matrix-org/synapse-s3-storage-provider)
Triplebit's Garage cluster is a multi-site cluster currently composed of
-10 nodes in 3 physical locations.
+15 storage nodes in 3 physical locations.
diff --git a/doc/book/operations/durability-repairs.md b/doc/book/operations/durability-repairs.md
index fdf163e2..8a307c84 100644
--- a/doc/book/operations/durability-repairs.md
+++ b/doc/book/operations/durability-repairs.md
@@ -42,7 +42,7 @@ You may pause an ongoing scrub using `garage repair scrub pause`, but note that
the scrub will resume automatically 24 hours later as Garage will not let your
cluster run without a regular scrub. If the scrub procedure is too intensive
for your servers and is slowing down your workload, the recommended solution
-is to increase the "scrub tranquility" using `garage repair scrub set-tranquility`.
+is to increase the "scrub tranquility" using `garage worker set scrub-tranquility`.
A higher tranquility value will make Garage take longer pauses between two block
verifications. Of course, scrubbing the entire data store will also take longer.
diff --git a/doc/book/operations/recovering.md b/doc/book/operations/recovering.md
index 05322b67..fb20656d 100644
--- a/doc/book/operations/recovering.md
+++ b/doc/book/operations/recovering.md
@@ -161,4 +161,7 @@ your recovery options are as follows:
- **Option 3: restoring a filesystem-level snapshot.** If you are using ZFS or
BTRFS to snapshot your metadata partition, refer to their specific
- documentation on rolling back or copying files from an old snapshot.
+ documentation on rolling back or copying files from an old snapshot.
+ Note that, depending on the properties of the filesystem and of the DB engine,
+ if these snapshots were taken during a write operation to the database, they may
+ also be corrupted and thus unfit for recovery.
diff --git a/doc/book/quick-start/_index.md b/doc/book/quick-start/_index.md
index 633b785a..993f28bf 100644
--- a/doc/book/quick-start/_index.md
+++ b/doc/book/quick-start/_index.md
@@ -132,7 +132,7 @@ docker run \
-v /path/to/garage.toml:/etc/garage.toml \
-v /path/to/garage/meta:/var/lib/garage/meta \
-v /path/to/garage/data:/var/lib/garage/data \
- dxflrs/garage:v1.3.0
+ dxflrs/garage:v2.1.0
```
Under Linux, you can substitute `--network host` for `-p 3900:3900 -p 3901:3901 -p 3902:3902 -p 3903:3903`
diff --git a/doc/book/reference-manual/admin-api.md b/doc/book/reference-manual/admin-api.md
index fcf49e8c..e96fcaff 100644
--- a/doc/book/reference-manual/admin-api.md
+++ b/doc/book/reference-manual/admin-api.md
@@ -6,41 +6,167 @@ weight = 40
The Garage administration API is accessible through a dedicated server whose
listen address is specified in the `[admin]` section of the configuration
file (see [configuration file
-reference](@/documentation/reference-manual/configuration.md))
+reference](@/documentation/reference-manual/configuration.md)).
-**WARNING.** At this point, there is no commitment to the stability of the APIs described in this document.
-We will bump the version numbers prefixed to each API endpoint each time the syntax
-or semantics change, meaning that code that relies on these endpoint will break
-when changes are introduced.
-
-Versions:
- - Before Garage 0.7.2 - no admin API
- - Garage 0.7.2 - admin APIv0
- - Garage 0.9.0 - admin APIv1, deprecate admin APIv0
+The current version of the admin API is v2. No breaking changes to the Garage
+administration API will be published outside of a major release.
+History of previous versions:
+ - Before Garage v0.7.2 - no admin API
+ - Garage v0.7.2 - admin API v0
+ - Garage v0.9.0 - admin API v1, deprecate admin API v0
+ - Garage v2.0.0 - admin API v2, deprecate admin API v1
## Access control
-The admin API uses two different tokens for access control, that are specified in the config file's `[admin]` section:
+### Using an API token
-- `metrics_token`: the token for accessing the Metrics endpoint (if this token
- is not set in the config file, the Metrics endpoint can be accessed without
- access control);
-
-- `admin_token`: the token for accessing all of the other administration
- endpoints (if this token is not set in the config file, access to these
- endpoints is disabled entirely).
-
-These tokens are used as simple HTTP bearer tokens. In other words, to
-authenticate access to an admin API endpoint, add the following HTTP header
-to your request:
+Administration API tokens tokens are used as simple HTTP bearer tokens. In
+other words, to authenticate access to an admin API endpoint, add the following
+HTTP header to your request:
```
Authorization: Bearer
```
-## Administration API endpoints
+### User-defined API tokens
+
+Cluster administrators may dynamically define administration tokens using the CLI commands under `garage admin-token`.
+Such tokens may be limited in scope, meaning that they may enable access to only a subset of API calls.
+They may also have an expiration date to limit their use in time.
+
+Here is an example to create an administration token that is valid for 30 days
+and gives access to only a subset of API calls, allowing it to create buckets
+and access keys and give keys permissions on buckets:
+
+```bash
+$ garage admin-token create --expires-in 30d \
+ --scope ListBuckets,GetBucketInfo,ListKeys,GetKeyInfo,CreateBucket,CreateKey,AllowBucketKey,DenyBucketKey \
+ my-token
+This is your secret bearer token, it will not be shown again by Garage:
+
+ 8ed1830b10a276ff57061950.kOSIpxWK9zSGbTO9Xadpv3YndSFWma0_snXcYHaORXk
+
+==== ADMINISTRATION TOKEN INFORMATION ====
+Token ID: 8ed1830b10a276ff57061950
+Token name: my-token
+Created: 2025-06-15 15:12:44.160 +02:00
+Validity: valid
+Expiration: 2025-07-15 15:12:44.117 +02:00
+
+Scope: ListBuckets
+ GetBucketInfo
+ ListKeys
+ GetKeyInfo
+ CreateBucket
+ CreateKey
+ AllowBucketKey
+ DenyBucketKey
+```
+
+When running this command, your token will be shown only once and **will never
+be shown again by Garage**, so make sure to save it directly. The token is
+hashed internally, and is identified by its prefix (32 hex digits followed by a
+dot) which is saved in clear.
+
+When running `garage admin-token list`, you might see something like this:
+
+```
+ID Created Name Expiration Scope
+- - metrics_token (from daemon configuration) never Metrics
+8ed1830b10a276ff57061950 2025-06-15 my-token 2025-07-15 15:12:44.117 +02:00 ListBuckets, ... (8)
+```
+
+### Master API tokens
+
+The admin API can also use two different master tokens for access control,
+specified in the config file's `[admin]` section:
+
+- `metrics_token`: the token for accessing the Metrics endpoint. If this token
+ is not set in the config file, the Metrics endpoint can be accessed without
+ access control.
+
+- `admin_token`: the token for accessing all of the other administration
+ endpoints. If this token is not set in the config file, access to these
+ endpoints is only possible with a user-defined admin token.
+
+With the introduction of multiple user-defined admin tokens, the use of master
+API tokens is now discouraged.
+
+
+## Using the admin API
+
+All of the admin API endpoints are described in the OpenAPI specification:
+
+ - APIv2 - [HTML spec](https://garagehq.deuxfleurs.fr/api/garage-admin-v2.html) - [OpenAPI JSON](https://garagehq.deuxfleurs.fr/api/garage-admin-v2.json)
+ - APIv1 (deprecated) - [HTML spec](https://garagehq.deuxfleurs.fr/api/garage-admin-v1.html) - [OpenAPI YAML](https://garagehq.deuxfleurs.fr/api/garage-admin-v1.yml)
+ - APIv0 (deprecated) - [HTML spec](https://garagehq.deuxfleurs.fr/api/garage-admin-v0.html) - [OpenAPI YAML](https://garagehq.deuxfleurs.fr/api/garage-admin-v0.yml)
+
+Making a request to the API from the command line can be as simple as running:
+
+```bash
+curl -H 'Authorization: Bearer s3cr3t' http://localhost:3903/v2/GetClusterStatus | jq
+```
+
+For more advanced use cases, we recommend using an SDK.
+[Go to the "Build your own app" section to know how to use our SDKs](@/documentation/build/_index.md)
+
+### Making API calls from the `garage` CLI
+
+Since v2.0.0, the `garage` binary provides a subcommand `garage json-api` that
+allows you to invoke the API without making an HTTP request. This can be
+useful for scripting Garage deployments.
+
+`garage json-api` proxies API calls through Garage's internal RPC protocol,
+therefore it does not require any form of authentication: RPC connection
+parameters are discovered automatically to contact the locally-running Garage
+instance (as when running any other `garage` CLI command).
+
+For simple calls that take no parameters, usage is as follows:
+
+```
+$ garage json-api GetClusterHealth
+{
+ "connectedNodes": 3,
+ "knownNodes": 3,
+ "partitions": 256,
+ "partitionsAllOk": 256,
+ "partitionsQuorum": 256,
+ "status": "healthy",
+ "storageNodes": 3,
+ "storageNodesOk": 3
+}
+```
+
+If you need to specify a JSON body for your call, you can add it directly after
+the name of the function you are calling:
+
+```
+$ garage json-api CreateAdminToken '{"name": "test"}'
+```
+
+Or you can feed it through stdin by adding a `-` as the last command parameter:
+
+```
+$ garage json-api CreateAdminToken -
+{"name": "test"}
+
+```
+
+For admin API calls that would have taken query parameters in their HTTP version, these parameters can be passed in the JSON body object:
+
+```
+$ garage json-api GetAdminTokenInfo '{"id":"b0e6e0ace2c0b2aca4cdb2de"}'
+```
+
+For admin API calls that take both query parameters and a JSON body, combine them in the following fashion:
+
+```
+$ garage json-api UpdateAdminToken '{"id":"b0e6e0ace2c0b2aca4cdb2de", "body":{"name":"not a test"}}'
+```
+
+## Special administration API endpoints
### Metrics `GET /metrics`
@@ -83,7 +209,7 @@ content-length: 102
date: Tue, 08 Aug 2023 07:22:38 GMT
Garage is fully operational
-Consult the full health check API endpoint at /v0/health for more details
+Consult the full health check API endpoint at /v2/GetClusterHealth for more details
```
### On-demand TLS `GET /check`
@@ -126,23 +252,7 @@ $ curl -so /dev/null -w "%{http_code}" http://localhost:3903/check?domain=exampl
200
```
-
**References:**
- [Using On-Demand TLS](https://caddyserver.com/docs/automatic-https#using-on-demand-tls)
- [Add option for a backend check to approve use of on-demand TLS](https://github.com/caddyserver/caddy/pull/1939)
- [Serving tens of thousands of domains over HTTPS with Caddy](https://caddy.community/t/serving-tens-of-thousands-of-domains-over-https-with-caddy/11179)
-
-### Cluster operations
-
-These endpoints have a dedicated OpenAPI spec.
- - APIv1 - [HTML spec](https://garagehq.deuxfleurs.fr/api/garage-admin-v1.html) - [OpenAPI YAML](https://garagehq.deuxfleurs.fr/api/garage-admin-v1.yml)
- - APIv0 (deprecated) - [HTML spec](https://garagehq.deuxfleurs.fr/api/garage-admin-v0.html) - [OpenAPI YAML](https://garagehq.deuxfleurs.fr/api/garage-admin-v0.yml)
-
-Requesting the API from the command line can be as simple as running:
-
-```bash
-curl -H 'Authorization: Bearer s3cr3t' http://localhost:3903/v0/status | jq
-```
-
-For more advanced use cases, we recommend using a SDK.
-[Go to the "Build your own app" section to know how to use our SDKs](@/documentation/build/_index.md)
diff --git a/doc/book/reference-manual/configuration.md b/doc/book/reference-manual/configuration.md
index 1f583fe6..d26d9253 100644
--- a/doc/book/reference-manual/configuration.md
+++ b/doc/book/reference-manual/configuration.md
@@ -25,7 +25,7 @@ db_engine = "lmdb"
block_size = "1M"
block_ram_buffer_max = "256MiB"
block_max_concurrent_reads = 16
-block_max_concurrent_writes_per_request =10
+
lmdb_map_size = "1T"
compression_level = 1
@@ -82,6 +82,7 @@ add_host_to_metrics = true
[admin]
api_bind_addr = "0.0.0.0:3903"
metrics_token = "BCAdFjoa9G0KJR0WXnHHm7fs1ZAbfpI8iIZ+Z/a2NgI="
+metrics_require_token = true
admin_token = "UkLeGWEvHnXBqnueR3ISEMWpOnm40jH2tM2HnnL/0F4="
trace_sink = "http://localhost:4317"
```
@@ -97,9 +98,8 @@ The following gives details about each available configuration option.
Top-level configuration options, in alphabetical order:
[`allow_punycode`](#allow_punycode),
[`allow_world_readable_secrets`](#allow_world_readable_secrets),
-[`block_max_concurrent_reads`](`block_max_concurrent_reads),
+[`block_max_concurrent_reads`](#block_max_concurrent_reads),
[`block_ram_buffer_max`](#block_ram_buffer_max),
-[`block_max_concurrent_writes_per_request`](#block_max_concurrent_writes_per_request),
[`block_size`](#block_size),
[`bootstrap_peers`](#bootstrap_peers),
[`compression_level`](#compression_level),
@@ -150,6 +150,7 @@ The `[s3_web]` section:
The `[admin]` section:
[`api_bind_addr`](#admin_api_bind_addr),
+[`metrics_require_token`](#admin_metrics_require_token),
[`metrics_token`/`metrics_token_file`](#admin_metrics_token),
[`admin_token`/`admin_token_file`](#admin_token),
[`trace_sink`](#admin_trace_sink),
@@ -336,7 +337,7 @@ Since `v0.8.0`, Garage can use alternative storage backends as follows:
| --------- | ----------------- | ------------- |
| [LMDB](https://www.symas.com/lmdb) (since `v0.8.0`, default since `v0.9.0`) | `"lmdb"` | `/db.lmdb/` |
| [Sqlite](https://sqlite.org) (since `v0.8.0`) | `"sqlite"` | `/db.sqlite` |
-| [Fjall](https://github.com/fjall-rs/fjall) (**experimental support** since `v1.3.0`) | `"fjall"` | `/db.fjall/` |
+| [Fjall](https://github.com/fjall-rs/fjall) (**experimental support** since `v1.3.0`/`v2.1.0`) | `"fjall"` | `/db.fjall/` |
| [Sled](https://sled.rs) (old default, removed since `v1.0`) | `"sled"` | `/db/` |
Sled was supported until Garage v0.9.x, and was removed in Garage v1.0.
@@ -345,8 +346,16 @@ old Sled metadata databases to another engine.
Performance characteristics of the different DB engines are as follows:
-- LMDB: the recommended database engine for high-performance distributed clusters.
-LMDB works very well, but is known to have the following limitations:
+- **LMDB:** the recommended database engine for high-performance distributed clusters
+ with `replication_factor` ≥ 2.
+ LMDB works well, but is known to have the following limitations:
+
+ - LMDB is prone to database corruption after an unclean shutdown (e.g. a process kill
+ or a power outage). It is recommended to configure
+ [`metadata_auto_snapshot_interval`](#metadata_auto_snapshot_interval) to be
+ able to easily recover from this situation. With `replication_factor` ≥ 2,
+ metadata can also be reconstructed from remote nodes upon corruption
+ (see [Recovering from failures](@/documentation/operations/recovering.md#corrupted_meta)).
- The data format of LMDB is not portable between architectures, so for
instance the Garage database of an x86-64 node cannot be moved to an ARM64
@@ -356,30 +365,21 @@ LMDB works very well, but is known to have the following limitations:
node to very small database sizes due to how LMDB works; it is therefore
not recommended.
- - Several users have reported corrupted LMDB database files after an unclean
- shutdown (e.g. a power outage). This situation can generally be recovered
- from if your cluster is geo-replicated (by rebuilding your metadata db from
- other nodes), or if you have saved regular snapshots at the filesystem
- level.
-
- Keys in LMDB are limited to 511 bytes. This limit translates to limits on
object keys in S3 and sort keys in K2V that are limted to 479 bytes.
-- Sqlite: Garage supports Sqlite as an alternative storage backend for
- metadata, which does not have the issues listed above for LMDB.
- On versions 0.8.x and earlier, Sqlite should be avoided due to abysmal
- performance, which was fixed with the addition of `metadata_fsync`.
- Sqlite is still probably slower than LMDB due to the way we use it,
- so it is not the best choice for high-performance storage clusters,
- but it should work fine in many cases.
+- **Sqlite:** Garage supports Sqlite as an alternative storage backend for
+ metadata, which does not have the issues listed above for LMDB. Sqlite is
+ slower than LMDB, so it is not the best choice for high-performance storage
+ clusters.
-- Fjall: a storage engine based on LSM trees, which theoretically allow for
+- **Fjall:** a storage engine based on LSM trees, which theoretically allow for
higher write throughput than other storage engines that are based on B-trees.
Using Fjall could potentially improve Garage's performance significantly in
write-heavy workloads. **Support for Fjall is experimental at this point**,
- we have added it to Garage for evaluation purposes only. **Do not use it for
- production-critical workloads.**
-
+ we have added it to Garage for evaluation purposes only. **Use it only with
+ test data, and report any issues to our bug tracker. Do not use it for
+ production workloads.**
It is possible to convert Garage's metadata directory from one format to another
using the `garage convert-db` command, which should be used as follows:
@@ -438,7 +438,8 @@ if geographical replication is used.
#### `metadata_auto_snapshot_interval` (since `v0.9.4`) {#metadata_auto_snapshot_interval}
If this value is set, Garage will automatically take a snapshot of the metadata
-DB file at a regular interval and save it in the metadata directory.
+DB file at a regular interval and save it in the metadata directory,
+or in [`metadata_snapshots_dir`](#metadata_snapshots_dir) if it is set.
This parameter can take any duration string that can be parsed by
the [`parse_duration`](https://docs.rs/parse_duration/latest/parse_duration/#syntax) crate.
@@ -447,14 +448,19 @@ corrupted, for instance after an unclean shutdown. See [this
page](@/documentation/operations/recovering.md#corrupted_meta) for details.
Garage keeps only the two most recent snapshots of the metadata DB and deletes
older ones automatically.
+You can also create metadata snapshots manually at any point using the
+`garage meta snapshot` command.
+
+Using snapshots created by Garage is the best option to make snapshots of your
+node's metadata for potential recovery, as they are guaranteed to be clean and
+consistent, contrarily to filesystem-level snapshots that may be taken while
+some writes are in-flight and thus might be corrupted.
Note that taking a metadata snapshot is a relatively intensive operation as the
entire data file is copied. A snapshot being taken might have performance
impacts on the Garage node while it is running. If the cluster is under heavy
write load when a snapshot operation is running, this might also cause the
database file to grow in size significantly as pages cannot be recycled easily.
-For this reason, it might be better to use filesystem-level snapshots instead
-if possible.
#### `disable_scrub` {#disable_scrub}
@@ -548,14 +554,6 @@ metric in Prometheus: a non-zero number of such events indicates an I/O
bottleneck on HDD read speed.
-#### `block_max_concurrent_writes_per_request` (since `v2.1.0`) {#block_max_concurrent_writes_per_request}
-
-This parameter is designed to adapt to the concurrent write performance of
-different storage media.Maximum number of parallel block writes per put request
-Higher values improve throughput but increase memory usage.
-
-Default: 3, Recommended: 10-30 for NVMe, 3-10 for HDD
-
#### `lmdb_map_size` {#lmdb_map_size}
This parameters can be used to set the map size used by LMDB,
@@ -824,10 +822,34 @@ See [administration API reference](@/documentation/reference-manual/admin-api.md
Alternatively, since `v0.8.5`, a path can be used to create a unix socket. Note that for security reasons,
the socket will have 0220 mode. Make sure to set user and group permissions accordingly.
+#### `admin_token`, `admin_token_file` or `GARAGE_ADMIN_TOKEN`, `GARAGE_ADMIN_TOKEN_FILE` (env) {#admin_token}
+
+The token for accessing all administration functions on the admin endpoint,
+with the exception of the metrics endpoint (see `metrics_token`).
+
+You can use any random string for this value. We recommend generating a random
+token with `openssl rand -base64 32`.
+
+For Garage version earlier than `v2.0`, if this token is not set,
+access to these endpoints is disabled entirely.
+
+Since Garage `v2.0`, additional admin API tokens can be defined dynamically
+in your Garage cluster using administration commands. This new admin token system
+is more flexible since it allows admin tokens to have an expiration date,
+and to have a scope restricted to certain admin API functions. If `admin_token`
+is set, it behaves as an admin token without expiration and with full scope.
+Otherwise, only admin API tokens defined dynamically can be used.
+
+`admin_token` was introduced in Garage `v0.7.2`.
+`admin_token_file` and the `GARAGE_ADMIN_TOKEN` environment variable are supported since Garage `v0.8.2`.
+
+`GARAGE_ADMIN_TOKEN_FILE` is supported since `v0.8.5` / `v0.9.1`.
+
#### `metrics_token`, `metrics_token_file` or `GARAGE_METRICS_TOKEN`, `GARAGE_METRICS_TOKEN_FILE` (env) {#admin_metrics_token}
-The token for accessing the Metrics endpoint. If this token is not set, the
-Metrics endpoint can be accessed without access control.
+The token for accessing the Prometheus metrics endpoint (`/metrics`).
+If this token is not set, and unless `metrics_require_token` is set to `true`,
+the metrics endpoint can be accessed without access control.
You can use any random string for this value. We recommend generating a random token with `openssl rand -base64 32`.
@@ -836,17 +858,12 @@ You can use any random string for this value. We recommend generating a random t
`GARAGE_METRICS_TOKEN_FILE` is supported since `v0.8.5` / `v0.9.1`.
-#### `admin_token`, `admin_token_file` or `GARAGE_ADMIN_TOKEN`, `GARAGE_ADMIN_TOKEN_FILE` (env) {#admin_token}
+#### `metrics_require_token` (since `v2.0.0`) {#admin_metrics_require_token}
-The token for accessing all of the other administration endpoints. If this
-token is not set, access to these endpoints is disabled entirely.
-
-You can use any random string for this value. We recommend generating a random token with `openssl rand -base64 32`.
-
-`admin_token` was introduced in Garage `v0.7.2`.
-`admin_token_file` and the `GARAGE_ADMIN_TOKEN` environment variable are supported since Garage `v0.8.2`.
-
-`GARAGE_ADMIN_TOKEN_FILE` is supported since `v0.8.5` / `v0.9.1`.
+If this is set to `true`, accessing the metrics endpoint will always require
+an access token. Valid tokens include the `metrics_token` if it is set,
+and admin API token defined dynamicaly in Garage which have
+the `Metrics` endpoint in their scope.
#### `trace_sink` {#admin_trace_sink}
diff --git a/doc/book/reference-manual/features.md b/doc/book/reference-manual/features.md
index 481aef01..a74b1467 100644
--- a/doc/book/reference-manual/features.md
+++ b/doc/book/reference-manual/features.md
@@ -129,5 +129,5 @@ related to objects stored in an S3 bucket.
In the context of our research project, [Aérogramme](https://aerogramme.deuxfleurs.fr),
K2V is used to provide metadata and log storage for operations on encrypted e-mail storage.
-Learn more on the specification of K2V [here](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/k2v/doc/drafts/k2v-spec.md)
+Learn more on the specification of K2V [here](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/commit/f8be15c37db857e177d543de7be863692628d567/doc/drafts/k2v-spec.md)
and on how to enable it in Garage [here](@/documentation/reference-manual/k2v.md).
diff --git a/doc/book/reference-manual/k2v.md b/doc/book/reference-manual/k2v.md
index c01f641e..f8e003d9 100644
--- a/doc/book/reference-manual/k2v.md
+++ b/doc/book/reference-manual/k2v.md
@@ -16,7 +16,7 @@ the `k2v` feature flag enabled can be obtained from our download page under
with `-k2v` (example: `v0.7.2-k2v`).
The specification of the K2V API can be found
-[here](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/doc/drafts/k2v-spec.md).
+[here](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/commit/f8be15c37db857e177d543de7be863692628d567/doc/drafts/k2v-spec.md).
This document also includes a high-level overview of K2V's design.
The K2V API uses AWSv4 signatures for authentification, same as the S3 API.
diff --git a/doc/book/reference-manual/s3-compatibility.md b/doc/book/reference-manual/s3-compatibility.md
index b869b6f4..edf8de0d 100644
--- a/doc/book/reference-manual/s3-compatibility.md
+++ b/doc/book/reference-manual/s3-compatibility.md
@@ -27,7 +27,7 @@ Feel free to open a PR to suggest fixes this table. Minio is missing because the
| Feature | Garage | [Openstack Swift](https://docs.openstack.org/swift/latest/s3_compat.html) | [Ceph Object Gateway](https://docs.ceph.com/en/latest/radosgw/s3/) | [Riak CS](https://docs.riak.com/riak/cs/2.1.1/references/apis/storage/s3/index.html) | [OpenIO](https://docs.openio.io/latest/source/arch-design/s3_compliancy.html) |
|------------------------------|----------------------------------|-----------------|---------------|---------|-----|
-| [signature v2](https://docs.aws.amazon.com/AmazonS3/latest/API/Appendix-Sigv2.html) (deprecated) | ❌ Missing | ✅ | ✅ | ✅ | ✅ |
+| [signature v2](https://docs.aws.amazon.com/general/latest/gr/signature-version-2.html) (deprecated) | ❌ Missing | ✅ | ✅ | ✅ | ✅ |
| [signature v4](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html) | ✅ Implemented | ✅ | ✅ | ❌ | ✅ |
| [URL path-style](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access) (eg. `host.tld/bucket/key`) | ✅ Implemented | ✅ | ✅ | ❓| ✅ |
| [URL vhost-style](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#virtual-hosted-style-access) URL (eg. `bucket.host.tld/key`) | ✅ Implemented | ❌| ✅| ✅ | ✅ |
diff --git a/doc/book/working-documents/migration-04.md b/doc/book/working-documents/migration-04.md
index 52c56737..5aae2a42 100644
--- a/doc/book/working-documents/migration-04.md
+++ b/doc/book/working-documents/migration-04.md
@@ -1,6 +1,6 @@
+++
title = "Migrating from 0.3 to 0.4"
-weight = 20
+weight = 80
+++
**Migrating from 0.3 to 0.4 is unsupported. This document is only intended to
diff --git a/doc/book/working-documents/migration-06.md b/doc/book/working-documents/migration-06.md
index 006b036b..5fa29120 100644
--- a/doc/book/working-documents/migration-06.md
+++ b/doc/book/working-documents/migration-06.md
@@ -1,6 +1,6 @@
+++
title = "Migrating from 0.5 to 0.6"
-weight = 15
+weight = 75
+++
**This guide explains how to migrate to 0.6 if you have an existing 0.5 cluster.
diff --git a/doc/book/working-documents/migration-07.md b/doc/book/working-documents/migration-07.md
index 03cdfedc..392c75a9 100644
--- a/doc/book/working-documents/migration-07.md
+++ b/doc/book/working-documents/migration-07.md
@@ -1,6 +1,6 @@
+++
title = "Migrating from 0.6 to 0.7"
-weight = 14
+weight = 74
+++
**This guide explains how to migrate to 0.7 if you have an existing 0.6 cluster.
We don't recommend trying to migrate to 0.7 directly from 0.5 or older.**
diff --git a/doc/book/working-documents/migration-08.md b/doc/book/working-documents/migration-08.md
index b7c4c783..17fe078b 100644
--- a/doc/book/working-documents/migration-08.md
+++ b/doc/book/working-documents/migration-08.md
@@ -1,6 +1,6 @@
+++
title = "Migrating from 0.7 to 0.8"
-weight = 13
+weight = 73
+++
**This guide explains how to migrate to 0.8 if you have an existing 0.7 cluster.
diff --git a/doc/book/working-documents/migration-09.md b/doc/book/working-documents/migration-09.md
index ba758093..cf5f309c 100644
--- a/doc/book/working-documents/migration-09.md
+++ b/doc/book/working-documents/migration-09.md
@@ -1,6 +1,6 @@
+++
title = "Migrating from 0.8 to 0.9"
-weight = 12
+weight = 72
+++
**This guide explains how to migrate to 0.9 if you have an existing 0.8 cluster.
diff --git a/doc/book/working-documents/migration-1.md b/doc/book/working-documents/migration-1.md
index b6c0bb85..9a04d101 100644
--- a/doc/book/working-documents/migration-1.md
+++ b/doc/book/working-documents/migration-1.md
@@ -1,6 +1,6 @@
+++
title = "Migrating from 0.9 to 1.0"
-weight = 11
+weight = 71
+++
**This guide explains how to migrate to 1.0 if you have an existing 0.9 cluster.
diff --git a/doc/book/working-documents/migration-2.md b/doc/book/working-documents/migration-2.md
new file mode 100644
index 00000000..01d984b3
--- /dev/null
+++ b/doc/book/working-documents/migration-2.md
@@ -0,0 +1,70 @@
++++
+title = "Migrating from 1.0 to 2.0"
+weight = 70
++++
+
+**This guide explains how to migrate to v2.x if you have an existing v1.x.x cluster.
+We don't recommend trying to migrate to v2.x directly from v0.9.x or older.**
+
+This migration procedure has been tested on several clusters without issues.
+However, it is still a *critical procedure* that might cause issues.
+**Make sure to back up all your data before attempting it!**
+
+You might also want to read our [general documentation on upgrading Garage](@/documentation/operations/upgrading.md).
+
+## Changes introduced in v2.0
+
+The following are **breaking changes** in Garage v2.0 that require your attention when migrating:
+
+- The administration API has been completely reworked.
+ Some calls to the `/v1/` endpoints will still work but most will not.
+ New endpoints are prefixed by `/v2/`. **You will need to update all your code that makes use of the admin API.**
+
+- `replication_mode` is no longer a supported configuration parameter,
+ please use `replication_factor` and `consistency_mode` instead.
+
+## Migration procedure
+
+The migration to Garage v2.0 can be done with almost no downtime,
+by restarting all nodes at once in the new version.
+
+The migration steps are as follows:
+
+1. Do a `garage repair --all-nodes --yes tables`, check the logs and check that
+ all data seems to be synced correctly between nodes. If you have time, do
+ additional `garage repair` procedures (`blocks`, `versions`, `block_refs`,
+ etc.)
+
+2. Ensure you have a snapshot of your Garage installation that you can restore
+ to in case the upgrade goes wrong, with one of the following options:
+
+ - You may use the `garage meta snapshot --all` command
+ to make a backup snapshot of the metadata directories of your nodes
+ for backup purposes. Once this command has completed, copy the following
+ files and directories from the `metadata_dir` of all your nodes
+ to somewhere safe: `snapshots`, `cluster_layout`, `data_layout`,
+ `node_key`, `node_key.pub`. (If you have set the `metadata_snapshots_dir`
+ to a different value in your config file, back up that directory instead.)
+
+ - If you are running a filesystem such as ZFS or BTRFS that support
+ snapshotting, you can create a filesystem-level snapshot of the `metadata_dir`
+ of all your nodes to be used as a restoration point if needed.
+
+ - You may also make a back-up manually: turn off each node
+ individually; back up its metadata folder (for instance, use the following
+ command if your metadata directory is `/var/lib/garage/meta`: `cd
+ /var/lib/garage ; tar -acf meta-v1.0.tar.zst meta/`); turn it back on
+ again. This will allow you to take a backup of all nodes without
+ impacting global cluster availability. You can do all nodes of a single
+ zone at once as this does not impact the availability of Garage.
+
+3. Prepare your updated binaries and configuration files for Garage v2.0.
+ **Remember to update your configuration file to remove `replication_mode` and replace it by `replication_factor`.**
+
+4. Shut down all v1.0 nodes simultaneously, and restart them all simultaneously
+ in v2.0. Use your favorite deployment tool (Ansible, Kubernetes, Nomad) to
+ achieve this as fast as possible. Garage v2.0 should be in a working state
+ as soon as enough nodes have started.
+
+5. Monitor your cluster in the following hours to see if it works well under
+ your production load.
diff --git a/doc/book/working-documents/testing-strategy.md b/doc/book/working-documents/testing-strategy.md
index fff706d7..3c29e47b 100644
--- a/doc/book/working-documents/testing-strategy.md
+++ b/doc/book/working-documents/testing-strategy.md
@@ -1,6 +1,6 @@
+++
title = "Testing strategy"
-weight = 30
+weight = 100
+++
diff --git a/doc/drafts/admin-api.md b/doc/drafts/admin-api.md
index 3ee948cb..18dfb627 100644
--- a/doc/drafts/admin-api.md
+++ b/doc/drafts/admin-api.md
@@ -13,8 +13,12 @@ We will bump the version numbers prefixed to each API endpoint each time the syn
or semantics change, meaning that code that relies on these endpoints will break
when changes are introduced.
-The Garage administration API was introduced in version 0.7.2, this document
-does not apply to older versions of Garage.
+The Garage administration API was introduced in version 0.7.2, and was
+changed several times.
+
+**THIS DOCUMENT IS DEPRECATED.** We now have an OpenAPI spec which is automatically generated
+from Garage's source code and is always up-to-date. See `doc/api/garage-admin-v2.html`.
+Text in this document is no longer kept in sync with the admin API's actual behavior.
## Access control
@@ -52,34 +56,28 @@ Returns an HTTP status 200 if the node is ready to answer user's requests,
and an HTTP status 503 (Service Unavailable) if there are some partitions
for which a quorum of nodes is not available.
A simple textual message is also returned in a body with content-type `text/plain`.
-See `/v1/health` for an API that also returns JSON output.
+See `/v2/GetClusterHealth` for an API that also returns JSON output.
+
+### Other special endpoints
+
+#### CheckDomain `GET /check?domain=`
+
+Checks whether this Garage cluster serves a website for domain ``.
+Returns HTTP 200 Ok if yes, or HTTP 4xx if no website is available for this domain.
### Cluster operations
-#### GetClusterStatus `GET /v1/status`
+#### GetClusterStatus `GET /v2/GetClusterStatus`
Returns the cluster's current status in JSON, including:
-- ID of the node being queried and its version of the Garage daemon
- Live nodes
- Currently configured cluster layout
-- Staged changes to the cluster layout
Example response body:
```json
{
- "node": "b10c110e4e854e5aa3f4637681befac755154b20059ec163254ddbfae86b09df",
- "garageVersion": "v1.3.0",
- "garageFeatures": [
- "k2v",
- "lmdb",
- "sqlite",
- "metrics",
- "bundled-libs"
- ],
- "rustVersion": "1.68.0",
- "dbEngine": "LMDB (using Heed crate)",
"layoutVersion": 5,
"nodes": [
{
@@ -169,7 +167,7 @@ Example response body:
}
```
-#### GetClusterHealth `GET /v1/health`
+#### GetClusterHealth `GET /v2/GetClusterHealth`
Returns the cluster's current health in JSON format, with the following variables:
@@ -202,7 +200,7 @@ Example response body:
}
```
-#### ConnectClusterNodes `POST /v1/connect`
+#### ConnectClusterNodes `POST /v2/ConnectClusterNodes`
Instructs this Garage node to connect to other Garage nodes at specified addresses.
@@ -232,7 +230,7 @@ Example response:
]
```
-#### GetClusterLayout `GET /v1/layout`
+#### GetClusterLayout `GET /v2/GetClusterLayout`
Returns the cluster's current layout in JSON, including:
@@ -293,7 +291,7 @@ Example response body:
}
```
-#### UpdateClusterLayout `POST /v1/layout`
+#### UpdateClusterLayout `POST /v2/UpdateClusterLayout`
Send modifications to the cluster layout. These modifications will
be included in the staged role changes, visible in subsequent calls
@@ -330,7 +328,7 @@ This returns the new cluster layout with the proposed staged changes,
as returned by GetClusterLayout.
-#### ApplyClusterLayout `POST /v1/layout/apply`
+#### ApplyClusterLayout `POST /v2/ApplyClusterLayout`
Applies to the cluster the layout changes currently registered as
staged layout changes.
@@ -350,23 +348,11 @@ existing layout in the cluster.
This returns the message describing all the calculations done to compute the new
layout, as well as the description of the layout as returned by GetClusterLayout.
-#### RevertClusterLayout `POST /v1/layout/revert`
+#### RevertClusterLayout `POST /v2/RevertClusterLayout`
Clears all of the staged layout changes.
-Request body format:
-
-```json
-{
- "version": 13
-}
-```
-
-Reverting the staged changes is done by incrementing the version number
-and clearing the contents of the staged change list.
-Similarly to the CLI, the body must include the incremented
-version number, which MUST be 1 + the value of the currently
-existing layout in the cluster.
+This requests contains an empty body.
This returns the new cluster layout with all changes reverted,
as returned by GetClusterLayout.
@@ -374,7 +360,7 @@ as returned by GetClusterLayout.
### Access key operations
-#### ListKeys `GET /v1/key`
+#### ListKeys `GET /v2/ListKeys`
Returns all API access keys in the cluster.
@@ -393,8 +379,8 @@ Example response:
]
```
-#### GetKeyInfo `GET /v1/key?id=`
-#### GetKeyInfo `GET /v1/key?search=`
+#### GetKeyInfo `GET /v2/GetKeyInfo?id=`
+#### GetKeyInfo `GET /v2/GetKeyInfo?search=`
Returns information about the requested API access key.
@@ -468,7 +454,7 @@ Example response:
}
```
-#### CreateKey `POST /v1/key`
+#### CreateKey `POST /v2/CreateKey`
Creates a new API access key.
@@ -483,7 +469,7 @@ Request body format:
This returns the key info, including the created secret key,
in the same format as the result of GetKeyInfo.
-#### ImportKey `POST /v1/key/import`
+#### ImportKey `POST /v2/ImportKey`
Imports an existing API key.
This will check that the imported key is in the valid format, i.e.
@@ -501,7 +487,7 @@ Request body format:
This returns the key info in the same format as the result of GetKeyInfo.
-#### UpdateKey `POST /v1/key?id=`
+#### UpdateKey `POST /v2/UpdateKey?id=`
Updates information about the specified API access key.
@@ -523,14 +509,14 @@ The possible flags in `allow` and `deny` are: `createBucket`.
This returns the key info in the same format as the result of GetKeyInfo.
-#### DeleteKey `DELETE /v1/key?id=`
+#### DeleteKey `POST /v2/DeleteKey?id=`
Deletes an API access key.
### Bucket operations
-#### ListBuckets `GET /v1/bucket`
+#### ListBuckets `GET /v2/ListBuckets`
Returns all storage buckets in the cluster.
@@ -572,8 +558,8 @@ Example response:
]
```
-#### GetBucketInfo `GET /v1/bucket?id=`
-#### GetBucketInfo `GET /v1/bucket?globalAlias=`
+#### GetBucketInfo `GET /v2/GetBucketInfo?id=`
+#### GetBucketInfo `GET /v2/GetBucketInfo?globalAlias=`
Returns information about the requested storage bucket.
@@ -616,7 +602,7 @@ Example response:
}
```
-#### CreateBucket `POST /v1/bucket`
+#### CreateBucket `POST /v2/CreateBucket`
Creates a new storage bucket.
@@ -656,7 +642,7 @@ or no alias at all.
Technically, you can also specify both `globalAlias` and `localAlias` and that would create
two aliases, but I don't see why you would want to do that.
-#### UpdateBucket `PUT /v1/bucket?id=`
+#### UpdateBucket `POST /v2/UpdateBucket?id=`
Updates configuration of the given bucket.
@@ -688,16 +674,38 @@ In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or
to remove the quotas. An absent value will be considered the same as a `null`. It is not possible
to change only one of the two quotas.
-#### DeleteBucket `DELETE /v1/bucket?id=`
+#### DeleteBucket `POST /v2/DeleteBucket?id=`
Deletes a storage bucket. A bucket cannot be deleted if it is not empty.
Warning: this will delete all aliases associated with the bucket!
+#### CleanupIncompleteUploads `POST /v2/CleanupIncompleteUploads`
+
+Cleanup all incomplete uploads in a bucket that are older than a specified number
+of seconds.
+
+Request body format:
+
+```json
+{
+ "bucketId": "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b",
+ "olderThanSecs": 3600
+}
+```
+
+Response format
+
+```json
+{
+ "uploadsDeleted": 12
+}
+```
+
### Operations on permissions for keys on buckets
-#### BucketAllowKey `POST /v1/bucket/allow`
+#### AllowBucketKey `POST /v2/AllowBucketKey`
Allows a key to do read/write/owner operations on a bucket.
@@ -718,7 +726,7 @@ Request body format:
Flags in `permissions` which have the value `true` will be activated.
Other flags will remain unchanged.
-#### BucketDenyKey `POST /v1/bucket/deny`
+#### DenyBucketKey `POST /v2/DenyBucketKey`
Denies a key from doing read/write/owner operations on a bucket.
@@ -742,19 +750,35 @@ Other flags will remain unchanged.
### Operations on bucket aliases
-#### GlobalAliasBucket `PUT /v1/bucket/alias/global?id=&alias=`
+#### AddBucketAlias `POST /v2/AddBucketAlias`
-Empty body. Creates a global alias for a bucket.
+Creates an alias for a bucket in the namespace of a specific access key.
+To create a global alias, specify the `globalAlias` field.
+To create a local alias, specify the `localAlias` and `accessKeyId` fields.
-#### GlobalUnaliasBucket `DELETE /v1/bucket/alias/global?id=&alias=`
+Request body format:
-Removes a global alias for a bucket.
+```json
+{
+ "bucketId": "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b",
+ "globalAlias": "my-bucket"
+}
+```
-#### LocalAliasBucket `PUT /v1/bucket/alias/local?id=&accessKeyId=&alias=`
+or:
-Empty body. Creates a local alias for a bucket in the namespace of a specific access key.
+```json
+{
+ "bucketId": "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b",
+ "accessKeyId": "GK31c2f218a2e44f485b94239e",
+ "localAlias": "my-bucket"
+}
+```
-#### LocalUnaliasBucket `DELETE /v1/bucket/alias/local?id=&accessKeyId&alias=`
+#### RemoveBucketAlias `POST /v2/RemoveBucketAlias`
-Removes a local alias for a bucket in the namespace of a specific access key.
+Removes an alias for a bucket in the namespace of a specific access key.
+To remove a global alias, specify the `globalAlias` field.
+To remove a local alias, specify the `localAlias` and `accessKeyId` fields.
+Request body format: same as AddBucketAlias.
diff --git a/doc/drafts/garbage-collector.md b/doc/drafts/garbage-collector.md
new file mode 100644
index 00000000..41be3c76
--- /dev/null
+++ b/doc/drafts/garbage-collector.md
@@ -0,0 +1,142 @@
+# [RFC] Garbage Collector Elimination
+
+## Statement of problem and prior art
+
+Currently, Garage's garbage collector has a few identified issues.
+Namely, it can only be run if all nodes in a partition are currently online,
+it may not be correct in front of a rebalancing (this is partially mitigated by a 24h delay added to tombstone deletion),
+and it isn't resilient to a subset of nodes being restored from snapshots.
+It's not clear if it is possible to implement a garbage collection process that can eliminate tombstones, but also support
+a node rollback to a point in time where a key existed.
+
+This problematic, perhaps unsurprisingly, maps very well to the general abstraction of CRDTs for sets, where a whole partition
+would be a single CRDT. The semantic required in Garage demands reinsertion of deleted keys, which excludes the most simple
+forms of sets such as G-Sets and 2P-Sets. As the goal is to not handle garbage collection of tombstones, a standard ORSet
+is also unfitting. In fact it could be argued Garage already uses something akin to an ORSet with a garbage collector today.
+
+There exists CRDTs supporting this feature-set, one of which is an OptORSet[^1].
+It only needs a set-wide metadata proportional in the number of writers, and a per alive-key metadata proportional in the number
+of writers to that key (but no metadata for dead keys).
+These metadata are akin to DVVs[^2]. An element is considered new if its DVV comes causaly after the current DVV of the set.
+Correctness of this algorithm depends however on having causal delivery, which isn't given in Garage, neither in general nor in
+presence of snapshot restoration.
+
+## Proposal
+
+We devise a new kind of CRDT based on the core ideas of an OptORSet, but replacing each version inside its DVVs with a list of
+range of observed updates, which we name a Seen Vector (SV). Such metadata can in the worst case grow linearly with the number of
+insertion. In practice, assuming all elements are eventually known to every replica, the storage requirement of a SV is equivalent
+to that of a standard DVV. Under causal delivery, a SV degenerates into a standard DVV.
+
+To add an element to the set, a node increments its own version counter, and sends an update containing (element, replica, version).
+On receiving such an update, a node checks if it has already seen this particular (replica, version), and if so ignore it.
+If it hasn't seen that update, it saves the new element, and update its SV to include that new (replica, version).
+
+TODO: describe formaly the algorithm
+
+
+Algorithm 1, Seen Vector:
+```
+payload set S -- S: set of triple (replica i, timestamp s, timestamp e)
+
+initial ∅
+query seen (replica i, timestamp c): boolean b
+ let b = (∃s <= c,e > c: (i,s,e) ∈ S)
+
+update increment ()
+ prepare ()
+ let r = myID()
+ let t = e|∀s,s', ∄e' > e: (r,s,e) ∈ S, (r,s',e') ∈ S -- t is the maximum end bound for this replica
+ effect(r, t)
+ if ¬seen (r, t) then
+ if seen (r, t - 1) ∧ seen (r, t + 1) then
+ let R = {∃s: (r, s, t) ∈ S}
+ let R' = {∃e: (r, t + 1, e) ∈ S}
+ let M = S \ R
+ let M' = M \ R'
+ S := M' ∪ {(r, s, e)}
+ else if seen (r, t - 1)then
+ let R = {∃s: (r, s, t) ∈ S}
+ let M = S \ R
+ S := M ∪ {(r, s, t+1)}
+ else if seen (r, t + 1)then
+ let R = {∃e: (r, t + 1, e) ∈ S}
+ let M = S \ R
+ E := E ∪ {(r, t, e)}
+ else
+ E := E ∪ {(r, t, t+1)}
+
+merge (B)
+ # TODO this is correct, but largelly suboptimal. We should perform the increment.effect subroutine for all elements of B instead
+ S := S ∪ B.S
+```
+
+Algorithm 2, OptORSet with SV. This algorithm is largely copied and adapted from Figure 3 of [^1]
+```
+payload set E, SV sv -- E: elements, set of triples (element e, timestamp c, replica i)
+ -- sv: SeenVector of received triples
+
+initial ∅, ∅
+query contains (element e) : boolean b
+ let b = (∃c, i : (e, c, i) ∈ E)
+
+query elements () : set S
+ let S = {e|∃c, i : (e, c, i) ∈ E}
+
+update add (element e)
+ prepare (e)
+ let r = myID() -- r = source replica
+ let c = sv.increment.prepare().t
+ effect (e, c, r)
+ if ¬sv.seen(r, c) then
+ let O = {(e, c′, r) ∈ E|c′ < c}
+ sv.increment.effect(r, c)
+ E := E ∪ {(e, c, r)} \ O
+
+update remove (element e)
+ prepare (e) -- Collect all unique triples containing e
+ let R = {(e, c, i) ∈ E}
+ effect (R) -- Remove triples observed at source
+ pre causal delivery
+ E := E \ R
+
+merge (B)
+ let M = (E ∩ B.E)
+ let M ′ = {(e, c, i) ∈ E \ B.E| ¬B.sv.seen(i, c)}
+ let M ′′ = {(e, c, i) ∈ B.E \ E| ¬sv.seen(i, c)}
+ let U = M ∪ M ′ ∪ M ′′
+ let O = {(e, c, i) ∈ U |∃(e, c′, i) ∈ U : c < c′}
+ E := U \ O
+ sv := sv.merge(B.sv)
+```
+
+## Storage evaluation
+
+As stated, if all updates are received, the SV is similar in size to that of a standard DVV. It may be however that a node create and
+immediately delete an element, creating holes in its sequence from the point of view of other replicas. These holes could be filled
+through an interactive process where the replica observing holes asks the node to scan over the whole set, and for each version in these
+hole, reply if no element has that exact version number. Holes caused by existing elements should be eventually fixed by an anti-entropy
+process, so replying with these elements appears unnecessary.
+
+The per-element storage requirement is proportional to the number of replicas having modified that element, even under non steady-state.
+This happens because as we always exchange whole elements, we have causal delivery for individual keys.
+
+## Replica version rollback
+
+This scheme assumes the same node won't issue the same version twice, which isn't a given when a node might be rollback to a previous state.
+The author proposes that on initialization, a replica asks all other replicas for the highest version number they know for it.
+If all replicas reply with a number less than or equal to the current version, it is safe to reuse the currently known number.
+If some replicas reply with a number higher, the node increase its version to that number.
+If at least one replica doesn't reply, it can't make any assumption about its actual version number.
+The node then increment a generation number, which is made part of its replica id, starts a new sequence from zero.
+
+## Appendix: providing SV to the underlying elements
+
+Some more complexe elements may want to have access to a version id and the Seen Vector to perform their own internal merge operations.
+The author reckon this may help implementing S3 versioning, by giving a simple way for Objects to know if an ObjectVersion was yet
+unknown or is known and already deleted.
+
+## References
+
+[^1]: An optimized conflict-free replicated set, https://doi.org/10.48550/arXiv.1210.3368
+[^2]: Dotted Version Vectors: Logical Clocks for Optimistic Replication, https://doi.org/10.48550/arXiv.1011.5808
diff --git a/doc/talks/2025-10-06-josy/.gitignore b/doc/talks/2025-10-06-josy/.gitignore
new file mode 100644
index 00000000..9f1f00e6
--- /dev/null
+++ b/doc/talks/2025-10-06-josy/.gitignore
@@ -0,0 +1,17 @@
+*
+
+!*.txt
+!*.md
+
+!assets
+
+!.gitignore
+!*.svg
+!*.png
+!*.jpg
+!*.tex
+!Makefile
+!.gitignore
+!assets/*.drawio.pdf
+
+!talk.pdf
diff --git a/doc/talks/2025-10-06-josy/Makefile b/doc/talks/2025-10-06-josy/Makefile
new file mode 100644
index 00000000..f0aae6a8
--- /dev/null
+++ b/doc/talks/2025-10-06-josy/Makefile
@@ -0,0 +1,19 @@
+ASSETS=../assets/lattice/lattice1.pdf_tex \
+ ../assets/lattice/lattice2.pdf_tex \
+ ../assets/lattice/lattice3.pdf_tex \
+ ../assets/lattice/lattice4.pdf_tex \
+ ../assets/lattice/lattice5.pdf_tex \
+ ../assets/lattice/lattice6.pdf_tex \
+ ../assets/lattice/lattice7.pdf_tex \
+ ../assets/lattice/lattice8.pdf_tex \
+ ../assets/logos/deuxfleurs.pdf \
+ ../assets/timeline-22-24.pdf
+
+talk.pdf: talk.tex $(ASSETS)
+ pdflatex talk.tex
+
+%.pdf: %.svg
+ inkscape -D -z --file=$^ --export-pdf=$@
+
+%.pdf_tex: %.svg
+ inkscape -D -z --file=$^ --export-pdf=$@ --export-latex
diff --git a/doc/talks/2025-10-06-josy/talk.pdf b/doc/talks/2025-10-06-josy/talk.pdf
new file mode 100644
index 00000000..2194908a
Binary files /dev/null and b/doc/talks/2025-10-06-josy/talk.pdf differ
diff --git a/doc/talks/2025-10-06-josy/talk.tex b/doc/talks/2025-10-06-josy/talk.tex
new file mode 100644
index 00000000..aa483766
--- /dev/null
+++ b/doc/talks/2025-10-06-josy/talk.tex
@@ -0,0 +1,702 @@
+\nonstopmode
+\documentclass[aspectratio=169,xcolor={svgnames}]{beamer}
+\usepackage[utf8]{inputenc}
+% \usepackage[frenchb]{babel}
+\usepackage{amsmath}
+\usepackage{mathtools}
+\usepackage{breqn}
+\usepackage{multirow}
+\usetheme{boxes}
+\usepackage{graphicx}
+\usepackage{import}
+\usepackage{adjustbox}
+\usepackage[absolute,overlay]{textpos}
+%\useoutertheme[footline=authortitle,subsection=false]{miniframes}
+%\useoutertheme[footline=authorinstitute,subsection=false]{miniframes}
+\useoutertheme{infolines}
+\setbeamertemplate{headline}{}
+
+\beamertemplatenavigationsymbolsempty
+
+\definecolor{TitleOrange}{RGB}{255,137,0}
+\setbeamercolor{title}{fg=TitleOrange}
+\setbeamercolor{frametitle}{fg=TitleOrange}
+
+\definecolor{ListOrange}{RGB}{255,145,5}
+\setbeamertemplate{itemize item}{\color{ListOrange}$\blacktriangleright$}
+
+\definecolor{verygrey}{RGB}{70,70,70}
+\setbeamercolor{normal text}{fg=verygrey}
+
+
+\usepackage{tabu}
+\usepackage{multicol}
+\usepackage{vwcol}
+\usepackage{stmaryrd}
+\usepackage{graphicx}
+
+\usepackage[normalem]{ulem}
+
+\AtBeginSection[]{
+ \begin{frame}
+ \vfill
+ \centering
+ \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
+ \usebeamerfont{title}\insertsectionhead\par%
+ \end{beamercolorbox}
+ \vfill
+ \end{frame}
+}
+
+\title{Garage, an S3 backend as reliable as possible}
+\author{Garage Authors}
+\date{JoSy S3, 2025-10-08}
+
+\begin{document}
+
+\begin{frame}
+ \centering
+ \includegraphics[width=.3\linewidth]{../../sticker/Garage.png}
+ \vspace{1em}
+
+ {\large\bf Garage, an S3 backend as reliable as possible}
+ \vspace{1em}
+
+ \url{https://garagehq.deuxfleurs.fr/}\\
+ \url{mailto:garagehq@deuxfleurs.fr}\\
+ \texttt{\#garage:deuxfleurs.fr} on Matrix
+\end{frame}
+
+
+\section{Meet Garage}
+
+\begin{frame}
+ \frametitle{A non-profit initiative}
+
+
+ \begin{columns}[t]
+ \begin{column}{.2\textwidth}
+ \centering
+ \adjincludegraphics[width=.5\linewidth, valign=t]{../assets/logos/deuxfleurs.pdf}
+ \end{column}
+ \begin{column}{.8\textwidth}
+ \textbf{Part of a degrowth initiative}\\
+ Garage has been created at Deuxfleurs where we experiment running Internet services without datacenter on commodity and refurbished hardware.
+ \end{column}
+
+ \end{columns}
+ \vspace{2em}
+ \begin{columns}[t]
+ \begin{column}{.2\textwidth}
+ \centering
+ \adjincludegraphics[width=.5\linewidth, valign=t]{../assets/community.png}
+ \end{column}
+ \begin{column}{.8\textwidth}
+ \textbf{Developed by a community}\\
+ {\small Some recent contributors: Arthur C, Charles H, dongdigua, Etienne L, Jonah A, Julien K, Lapineige, MagicRR, Milas B, Niklas M, RockWolf, Schwitzd, trinity-1686a, Xavier S, babykart, Baptiste J, eddster2309, James O'C, Joker9944, Maximilien R, Renjaya RZ, Yureka...}
+ \end{column}
+
+ \end{columns}
+ \vspace{2em}
+ \begin{columns}[t]
+ \begin{column}{.2\textwidth}
+ \centering
+ \adjincludegraphics[width=.5\linewidth, valign=t]{../assets/logos/AGPLv3_Logo.png}
+ \end{column}
+ \begin{column}{.8\textwidth}
+ \textbf{Owned by nobody, open-core is impossible, zero VC money}\\
+ AGPL + no Contributor License Agreement = Garage ownership spreads among hundredth of contributors.
+ \end{column}
+
+ \end{columns}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Getting support for Garage}
+ \begin{columns}[t]
+ \begin{column}{.2\textwidth}
+ \centering
+ \adjincludegraphics[width=.4\linewidth, valign=t]{../assets/alex.jpg}
+ \end{column}
+ \begin{column}{.4\textwidth}
+ \textbf{Alex Auvolat}\\
+ PhD; co-founder of Deuxfleurs\\
+ Garage maintainer, Freelance
+ \end{column}
+ \begin{column}{.3\textwidth}
+ \centering
+ \adjincludegraphics[width=.4\linewidth, valign=t]{../assets/support.png}
+ \end{column}
+ \begin{column}{.1\textwidth}
+ ~
+ \end{column}
+ \end{columns}
+ \vspace{2em}
+ \begin{columns}[t]
+ \begin{column}{.2\textwidth}
+ \centering
+ \adjincludegraphics[width=.4\linewidth, valign=t]{../assets/quentin.jpg}
+ \end{column}
+ \begin{column}{.4\textwidth}
+ \textbf{Quentin Dufour}\\
+ PhD; co-founder of Deuxfleurs\\
+ Garage contributor, Freelance
+ \end{column}
+ \begin{column}{.4\textwidth}
+ For support requests, write at: \\
+ \url{garagehq@deuxfleurs.fr}
+ \end{column}
+ \end{columns}
+ \vspace{2em}
+ \begin{columns}[t]
+ \begin{column}{.2\textwidth}
+ \centering
+ \adjincludegraphics[width=.4\linewidth, valign=t]{../assets/armael.jpg}
+ \end{column}
+ \begin{column}{.4\textwidth}
+ \textbf{Armaël Guéneau}\\
+ PhD; member of Deuxfleurs\\
+ Garage contributor, Freelance
+ \end{column}
+ \begin{column}{.4\textwidth}
+ Eligible: email support, architecture design, specific feature development, etc.
+ \end{column}
+ \end{columns}
+
+
+\end{frame}
+
+\begin{frame}
+ \frametitle{Our initial goal}
+
+ \centering
+ \Large
+
+ Being a self-sovereign community to be free of our degrowth choice
+
+ $\big\downarrow$
+
+ As web citizens, datacenters are big black boxes. \\
+ We want to leave them to autonoumously manage our servers.
+
+ $\big\downarrow$
+
+ We want reliable services without relying on dedicated hardware or places.
+
+\end{frame}
+
+\begin{frame}
+ \frametitle{Building a resilient system with cheap stuff}
+
+ \only<1,4-7>{
+ \begin{itemize}
+ \item \textcolor<5->{gray}{Commodity hardware (e.g. old desktop PCs)\\
+ \vspace{.5em}
+ \visible<4->{{\footnotesize (can die at any time)}}}
+ \vspace{1.5em}
+ \item<5-> \textcolor<7->{gray}{Regular Internet (e.g. FTTB, FTTH) and power grid connections\\
+ \vspace{.5em}
+ \visible<6->{{\footnotesize (can be unavailable randomly)}}}
+ \vspace{1.5em}
+ \item<7-> \textbf{Geographical redundancy} (multi-site replication)
+ \end{itemize}
+ }
+ \only<2>{
+ \begin{center}
+ \includegraphics[width=.8\linewidth]{../assets/neptune.jpg}
+ \end{center}
+ }
+ \only<3>{
+ \begin{center}
+ \includegraphics[width=.8\linewidth]{../assets/atuin.jpg}
+ \end{center}
+ }
+ \only<8>{
+ \begin{center}
+ \includegraphics[width=.8\linewidth]{../assets/inframap_jdll2023.pdf}
+ \end{center}
+ }
+\end{frame}
+
+\begin{frame}
+ \frametitle{Object storage: a crucial component}
+ \begin{center}
+ \includegraphics[height=6em]{../assets/logos/Amazon-S3.jpg}
+ \hspace{3em}
+ \visible<2->{\includegraphics[height=5em]{../assets/logos/minio.png}}
+ \hspace{3em}
+ \visible<3>{\includegraphics[height=6em]{../../logo/garage_hires_crop.png}}
+ \end{center}
+ \vspace{1em}
+ S3: a de-facto standard, many compatible applications
+
+ \vspace{1em}
+ \visible<2->{MinIO is self-hostable but not suited for geo-distributed deployments}
+
+ \vspace{1em}
+ \visible<3->{\textbf{Garage is a self-hosted drop-in replacement for the Amazon S3 object store}}
+\end{frame}
+
+\begin{frame}
+ \frametitle{CRDTs / weak consistency instead of consensus}
+
+ \underline{Internally, Garage uses only CRDTs} (conflict-free replicated data types)
+
+ \vspace{2em}
+ Why not Raft, Paxos, ...? Issues of consensus algorithms:
+
+ \vspace{1em}
+ \begin{itemize}
+ \item<2-> \textbf{Software complexity}
+ \vspace{1em}
+ \item<3-> \textbf{Performance issues:}
+ \vspace{.5em}
+ \begin{itemize}
+ \item<4-> The leader is a \textbf{bottleneck} for all requests\\
+ \vspace{.5em}
+ \item<5-> \textbf{Sensitive to higher latency} between nodes
+ \vspace{.5em}
+ \item<6-> \textbf{Takes time to reconverge} when disrupted (e.g. node going down)
+ \end{itemize}
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{The data model of object storage}
+ Object storage is basically a \textbf{key-value store}:
+ \vspace{.5em}
+
+ {\scriptsize
+ \begin{center}
+ \begin{tabular}{|l|p{7cm}|}
+ \hline
+ \textbf{Key: file path + name} & \textbf{Value: file data + metadata} \\
+ \hline
+ \hline
+ \texttt{index.html} &
+ \texttt{Content-Type: text/html; charset=utf-8} \newline
+ \texttt{Content-Length: 24929} \newline
+ \texttt{} \\
+ \hline
+ \texttt{img/logo.svg} &
+ \texttt{Content-Type: text/svg+xml} \newline
+ \texttt{Content-Length: 13429} \newline
+ \texttt{} \\
+ \hline
+ \texttt{download/index.html} &
+ \texttt{Content-Type: text/html; charset=utf-8} \newline
+ \texttt{Content-Length: 26563} \newline
+ \texttt{} \\
+ \hline
+ \end{tabular}
+ \end{center}
+ }
+
+ \vspace{1em}
+ \begin{itemize}
+ \item<2> Maps well to CRDT data types
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Performance gains in practice}
+ \begin{center}
+ \includegraphics[width=.8\linewidth]{../assets/perf/endpoint_latency_0.7_0.8_minio.png}
+ \end{center}
+\end{frame}
+
+% ======================================== OPERATING
+% ======================================== OPERATING
+% ======================================== OPERATING
+
+
+\section{Production clusters}
+
+\begin{frame}
+ \frametitle{Deployment kinds}
+
+ \includegraphics[width=.9\linewidth]{../assets/cluster_kind.png}
+ \vspace{1em}
+
+\end{frame}
+
+\begin{frame}
+ \frametitle{How big they are?}
+
+ \includegraphics[width=.9\linewidth]{../assets/cluster_size.png}
+ \vspace{1em}
+
+ \textit{"Petabyte storage setup for a video site. Nginx as CDN in-front using garage-s3-website feature. Each storage node has ~64TB storage with raid10, no replication within garage. 25gbit nic. haproxy to loadbalance across 5 nodes. mostly reads with very few writes."}
+
+ \vspace{1em}
+ \textit{"We currently manage 7 Garage nodes, 28TB total storage, 6M blocks for 3M objects and 4TB of object data. We have been running Garage in production for 2.5 years."}
+
+\end{frame}
+
+\begin{frame}
+ \frametitle{Operating Garage}
+ \begin{center}
+ \only<1-2>{
+ \includegraphics[width=.9\linewidth]{../assets/screenshots/garage_status_0.10.png}
+ \\\vspace{1em}
+ \visible<2>{\includegraphics[width=.9\linewidth]{../assets/screenshots/garage_status_unhealthy_0.10.png}}
+ }
+ \end{center}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Garage's architecture}
+ \begin{center}
+ \only<1>{\includegraphics[width=.45\linewidth]{../assets/garage.drawio.pdf}}%
+ \only<2>{\includegraphics[width=.6\linewidth]{../assets/garage_sync.drawio.pdf}}%
+ \end{center}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Digging deeper}
+ \begin{center}
+ \only<1>{\includegraphics[width=.9\linewidth]{../assets/screenshots/garage_stats_0.10.png}}
+ \only<2>{\includegraphics[width=.5\linewidth]{../assets/screenshots/garage_worker_list_0.10.png}}
+ \only<3>{\includegraphics[width=.6\linewidth]{../assets/screenshots/garage_worker_param_0.10.png}}
+ \end{center}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Potential limitations and bottlenecks}
+ \begin{itemize}
+ \item Global:
+ \begin{itemize}
+ \item Max. $\sim$100 nodes per cluster (excluding gateways)
+ \end{itemize}
+ \vspace{1em}
+ \item Metadata:
+ \begin{itemize}
+ \item One big bucket = bottleneck, object list on 3 nodes only
+ \end{itemize}
+ \vspace{1em}
+ \item Block manager:
+ \begin{itemize}
+ \item Lots of small files on disk
+ \item Processing the resync queue can be slow
+ \end{itemize}
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Deployment advice for very large clusters}
+ \begin{itemize}
+ \item Metadata storage:
+ \begin{itemize}
+ \item ZFS mirror (x2) on fast NVMe
+ \item Use LMDB storage engine
+ \end{itemize}
+ \vspace{.5em}
+ \item Data block storage:
+ \begin{itemize}
+ \item Use Garage's native multi-HDD support
+ \item XFS on individual drives
+ \item Increase block size (1MB $\to$ 10MB, requires more RAM and good networking)
+ \item Tune \texttt{resync-tranquility} and \texttt{resync-worker-count} dynamically
+ \end{itemize}
+ \vspace{.5em}
+ \item Other :
+ \begin{itemize}
+ \item Split data over several buckets
+ \item Use less than 100 storage nodes
+ \item Use gateway nodes
+ \end{itemize}
+ \vspace{.5em}
+ \end{itemize}
+\end{frame}
+
+
+\begin{frame}
+ \frametitle{Focus on Deuxfleurs}
+
+ Host institutional websites, partnership with a web agency.
+ Matrix media backend.
+
+ Plan to use it as an email backend for an internally developed email server.
+
+\end{frame}
+
+
+% ======================================== TIMELINE
+% ======================================== TIMELINE
+% ======================================== TIMELINE
+
+\section{Recent developments}
+
+% ====================== v0.7.0 ===============================
+
+\begin{frame}
+ \begin{center}
+ \includegraphics[width=.8\linewidth]{../assets/tl.drawio.png}
+ \end{center}
+\end{frame}
+
+\begin{frame}
+ \frametitle{April 2022 - Garage v0.7.0}
+ Focus on \underline{observability and ecosystem integration}
+ \vspace{2em}
+ \begin{itemize}
+ \item \textbf{Monitoring:} metrics and traces, using OpenTelemetry
+ \vspace{1em}
+ \item Replication modes with 1 or 2 copies / weaker consistency
+ \vspace{1em}
+ \item Kubernetes integration for node discovery
+ \vspace{1em}
+ \item Admin API (v0.7.2)
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Metrics (Prometheus + Grafana)}
+ \begin{center}
+ \includegraphics[width=.9\linewidth]{../assets/screenshots/grafana_dashboard.png}
+ \end{center}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Traces (Jaeger)}
+ \begin{center}
+ \includegraphics[width=.8\linewidth]{../assets/screenshots/jaeger_listobjects.png}
+ \end{center}
+\end{frame}
+
+% ====================== v0.8.0 ===============================
+
+\begin{frame}
+ \begin{center}
+ \includegraphics[width=.8\linewidth]{../assets/tl.drawio.png}
+ \end{center}
+\end{frame}
+
+\begin{frame}
+ \frametitle{November 2022 - Garage v0.8.0}
+ Focus on \underline{performance}
+ \vspace{2em}
+ \begin{itemize}
+ \item \textbf{Alternative metadata DB engines} (LMDB, Sqlite)
+ \vspace{1em}
+ \item \textbf{Performance improvements:} block streaming, various optimizations...
+ \vspace{1em}
+ \item Bucket quotas (max size, max \#objects)
+ \vspace{1em}
+ \item Quality of life improvements, observability, etc.
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{About metadata DB engines}
+ \textbf{Issues with Sled:}
+ \vspace{1em}
+ \begin{itemize}
+ \item Huge files on disk
+ \vspace{.5em}
+ \item Unpredictable performance, especially on HDD
+ \vspace{.5em}
+ \item API limitations
+ \vspace{.5em}
+ \item Not actively maintained
+ \end{itemize}
+
+ \vspace{2em}
+ \textbf{LMDB:} very stable, good performance, file size is reasonable\\
+ \textbf{Sqlite} also available as a second choice
+
+ \vspace{1em}
+ Sled will be removed in Garage v1.0
+\end{frame}
+
+\begin{frame}
+ \frametitle{DB engine performance comparison}
+ \begin{center}
+ \includegraphics[width=.6\linewidth]{../assets/perf/db_engine.png}
+ \end{center}
+ NB: Sqlite was slow due to synchronous mode, now configurable
+\end{frame}
+
+\begin{frame}
+ \frametitle{Block streaming}
+ \begin{center}
+ \only<1>{\includegraphics[width=.8\linewidth]{../assets/schema-streaming-1.png}}
+ \only<2>{\includegraphics[width=.8\linewidth]{../assets/schema-streaming-2.png}}
+ \end{center}
+\end{frame}
+
+\begin{frame}
+ \frametitle{TTFB benchmark}
+ \begin{center}
+ \includegraphics[width=.8\linewidth]{../assets/perf/ttfb.png}
+ \end{center}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Throughput benchmark}
+ \begin{center}
+ \includegraphics[width=.7\linewidth]{../assets/perf/io-0.7-0.8-minio.png}
+ \end{center}
+\end{frame}
+
+% ====================== v0.9.0 ===============================
+
+\begin{frame}
+ \begin{center}
+ \includegraphics[width=.8\linewidth]{../assets/tl.drawio.png}
+ \end{center}
+\end{frame}
+
+\begin{frame}
+ \frametitle{October 2023 - Garage v0.9.0}
+ Focus on \underline{streamlining \& usability}
+ \vspace{2em}
+ \begin{itemize}
+ \item Support multiple HDDs per node
+ \vspace{1em}
+ \item S3 compatibility:
+ \vspace{1em}
+ \begin{itemize}
+ \item support basic lifecycle configurations
+ \vspace{.5em}
+ \item allow for multipart upload part retries
+ \end{itemize}
+ \vspace{1em}
+ \item LMDB by default, deprecation of Sled
+ \vspace{1em}
+ \item New layout computation algorithm
+ \end{itemize}
+\end{frame}
+
+
+\begin{frame}
+ \frametitle{Layout computation}
+ \begin{overprint}
+ \onslide<1>
+ \begin{center}
+ \includegraphics[width=\linewidth, trim=0 0 0 -4cm]{../assets/screenshots/garage_status_0.9_prod_zonehl.png}
+ \end{center}
+ \onslide<2>
+ \begin{center}
+ \includegraphics[width=.7\linewidth]{../assets/map.png}
+ \end{center}
+ \end{overprint}
+ \vspace{1em}
+ Garage stores replicas on different zones when possible
+\end{frame}
+
+\begin{frame}
+ \frametitle{What a "layout" is}
+ \textbf{A layout is a precomputed index table:}
+ \vspace{1em}
+
+ {\footnotesize
+ \begin{center}
+ \begin{tabular}{|l|l|l|l|}
+ \hline
+ \textbf{Partition} & \textbf{Node 1} & \textbf{Node 2} & \textbf{Node 3} \\
+ \hline
+ \hline
+ Partition 0 & df-ymk (bespin) & Abricot (scorpio) & Courgette (neptune) \\
+ \hline
+ Partition 1 & Ananas (scorpio) & Courgette (neptune) & df-ykl (bespin) \\
+ \hline
+ Partition 2 & df-ymf (bespin) & Celeri (neptune) & Abricot (scorpio) \\
+ \hline
+ \hspace{1em}$\vdots$ & \hspace{1em}$\vdots$ & \hspace{1em}$\vdots$ & \hspace{1em}$\vdots$ \\
+ \hline
+ Partition 255 & Concombre (neptune) & df-ykl (bespin) & Abricot (scorpio) \\
+ \hline
+ \end{tabular}
+ \end{center}
+ }
+
+ \vspace{2em}
+ \visible<2->{
+ The index table is built centrally using an optimal algorithm,\\
+ then propagated to all nodes
+ }
+
+ \vspace{1em}
+ \visible<3->{
+ \footnotesize
+ Oulamara, M., \& Auvolat, A. (2023). \emph{An algorithm for geo-distributed and redundant storage in Garage}.\\ arXiv preprint arXiv:2302.13798.
+ }
+\end{frame}
+
+
+
+% ====================== v1.0.0 ===============================
+
+\begin{frame}
+ \begin{center}
+ \includegraphics[width=.8\linewidth]{../assets/tl.drawio.png}
+ \end{center}
+\end{frame}
+
+\begin{frame}
+ \frametitle{April 2024 - Garage v1.0.0}
+ Focus on \underline{consistency, security \& stability}
+ \vspace{2em}
+ \begin{itemize}
+ \item Fix consistency issues when reshuffling data (Jepsen testing)
+ \vspace{1em}
+ \item \textbf{Security audit} by Radically Open Security
+ \vspace{1em}
+ \item Misc. S3 features (SSE-C, checksums, ...) and compatibility fixes
+ \end{itemize}
+\end{frame}
+
+% ====================== v2.0.0 ===============================
+
+\begin{frame}
+ \begin{center}
+ \includegraphics[width=.8\linewidth]{../assets/tl.drawio.png}
+ \end{center}
+\end{frame}
+
+\begin{frame}
+ \frametitle{Garage v2.0.0}
+ Focus on \underline{}
+ \vspace{2em}
+ \begin{itemize}
+ \item TODO
+ \end{itemize}
+\end{frame}
+
+
+\begin{frame}
+ \frametitle{Currently funding...}
+
+ \textit{...}
+\end{frame}
+
+\begin{frame}
+ \frametitle{We run community surveys}
+ \begin{center}
+ \includegraphics[width=.6\linewidth]{../assets/survey_requested_features.png}
+ \end{center}
+\end{frame}
+
+% ======================================== END
+% ======================================== END
+% ======================================== END
+
+\begin{frame}
+ \frametitle{Where to find us}
+ \begin{center}
+ \includegraphics[width=.25\linewidth]{../../logo/garage_hires.png}\\
+ \vspace{-1em}
+ \url{https://garagehq.deuxfleurs.fr/}\\
+ \url{mailto:garagehq@deuxfleurs.fr}\\
+ \texttt{\#garage:deuxfleurs.fr} on Matrix
+
+ \vspace{1.5em}
+ \includegraphics[width=.06\linewidth]{../assets/logos/rust_logo.png}
+ \includegraphics[width=.13\linewidth]{../assets/logos/AGPLv3_Logo.png}
+ \end{center}
+\end{frame}
+
+\end{document}
+
+%% vim: set ts=4 sw=4 tw=0 noet spelllang=en :
diff --git a/doc/talks/assets/armael.jpg b/doc/talks/assets/armael.jpg
new file mode 100644
index 00000000..54b97662
Binary files /dev/null and b/doc/talks/assets/armael.jpg differ
diff --git a/doc/talks/assets/cluster_kind.png b/doc/talks/assets/cluster_kind.png
new file mode 100644
index 00000000..80f8f4b5
Binary files /dev/null and b/doc/talks/assets/cluster_kind.png differ
diff --git a/doc/talks/assets/cluster_size.png b/doc/talks/assets/cluster_size.png
new file mode 100644
index 00000000..b4b0f5ce
Binary files /dev/null and b/doc/talks/assets/cluster_size.png differ
diff --git a/doc/talks/assets/community.png b/doc/talks/assets/community.png
new file mode 100644
index 00000000..06c7a1af
Binary files /dev/null and b/doc/talks/assets/community.png differ
diff --git a/doc/talks/assets/quentin.jpg b/doc/talks/assets/quentin.jpg
new file mode 100644
index 00000000..a68d9d7b
Binary files /dev/null and b/doc/talks/assets/quentin.jpg differ
diff --git a/doc/talks/assets/support.png b/doc/talks/assets/support.png
new file mode 100644
index 00000000..c20d179b
Binary files /dev/null and b/doc/talks/assets/support.png differ
diff --git a/doc/talks/assets/tl.drawio.png b/doc/talks/assets/tl.drawio.png
new file mode 100644
index 00000000..c60c310a
Binary files /dev/null and b/doc/talks/assets/tl.drawio.png differ
diff --git a/flake.lock b/flake.lock
index 211b70e0..f1b77c6c 100644
--- a/flake.lock
+++ b/flake.lock
@@ -50,17 +50,17 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1763977559,
- "narHash": "sha256-g4MKqsIRy5yJwEsI+fYODqLUnAqIY4kZai0nldAP6EM=",
+ "lastModified": 1747825515,
+ "narHash": "sha256-BWpMQymVI73QoKZdcVCxUCCK3GNvr/xa2Dc4DM1o2BE=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "cfe2c7d5b5d3032862254e68c37a6576b633d632",
+ "rev": "cd2812de55cf87df88a9e09bf3be1ce63d50c1a6",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "cfe2c7d5b5d3032862254e68c37a6576b633d632",
+ "rev": "cd2812de55cf87df88a9e09bf3be1ce63d50c1a6",
"type": "github"
}
},
@@ -80,17 +80,17 @@
]
},
"locked": {
- "lastModified": 1763952169,
- "narHash": "sha256-+PeDBD8P+NKauH+w7eO/QWCIp8Cx4mCfWnh9sJmy9CM=",
+ "lastModified": 1738549608,
+ "narHash": "sha256-GdyT9QEUSx5k/n8kILuNy83vxxdyUfJ8jL5mMpQZWfw=",
"owner": "oxalica",
"repo": "rust-overlay",
- "rev": "ab726555a9a72e6dc80649809147823a813fa95b",
+ "rev": "35c6f8c4352f995ecd53896200769f80a3e8f22d",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
- "rev": "ab726555a9a72e6dc80649809147823a813fa95b",
+ "rev": "35c6f8c4352f995ecd53896200769f80a3e8f22d",
"type": "github"
}
},
diff --git a/flake.nix b/flake.nix
index 01a077c4..e3e5e69d 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,13 +2,13 @@
description =
"Garage, an S3-compatible distributed object store for self-hosted deployments";
- # Nixpkgs 25.05 as of 2025-11-24
+ # Nixpkgs 25.05 as of 2025-05-22
inputs.nixpkgs.url =
- "github:NixOS/nixpkgs/cfe2c7d5b5d3032862254e68c37a6576b633d632";
+ "github:NixOS/nixpkgs/cd2812de55cf87df88a9e09bf3be1ce63d50c1a6";
- # Rust overlay as of 2025-11-24
+ # Rust overlay as of 2025-02-03
inputs.rust-overlay.url =
- "github:oxalica/rust-overlay/ab726555a9a72e6dc80649809147823a813fa95b";
+ "github:oxalica/rust-overlay/35c6f8c4352f995ecd53896200769f80a3e8f22d";
inputs.rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
inputs.crane.url = "github:ipetkov/crane";
@@ -30,10 +30,6 @@
inherit system nixpkgs crane rust-overlay extraTestEnv;
release = false;
}).garage-test;
- lints = (compile {
- inherit system nixpkgs crane rust-overlay;
- release = false;
- });
in
{
packages = {
@@ -60,10 +56,6 @@
tests-fjall = testWith {
GARAGE_TEST_INTEGRATION_DB_ENGINE = "fjall";
};
-
- # lints (fmt, clippy)
- fmt = lints.garage-cargo-fmt;
- clippy = lints.garage-cargo-clippy;
};
# ---- developpment shell, for making native builds only ----
@@ -89,6 +81,9 @@
cargo-outdated
cargo-machete
nixpkgs-fmt
+ openssl
+ socat
+ killall
];
};
};
diff --git a/nix/compile.nix b/nix/compile.nix
index c6df9dbd..7e9f79ab 100644
--- a/nix/compile.nix
+++ b/nix/compile.nix
@@ -48,7 +48,7 @@ let
inherit (pkgs) lib stdenv;
- toolchainFn = (p: p.rust-bin.stable."1.91.0".default.override {
+ toolchainFn = (p: p.rust-bin.stable."1.82.0".default.override {
targets = lib.optionals (target != null) [ rustTarget ];
extensions = [
"rust-src"
@@ -190,15 +190,4 @@ in rec {
pkgs.cacert
];
} // extraTestEnv);
-
- # ---- source code linting ----
-
- garage-cargo-fmt = craneLib.cargoFmt (commonArgs // {
- cargoExtraArgs = "";
- });
-
- garage-cargo-clippy = craneLib.cargoClippy (commonArgs // {
- cargoArtifacts = garage-deps;
- cargoClippyExtraArgs = "--all-targets -- -D warnings";
- });
}
diff --git a/script/dev-bucket.sh b/script/dev-bucket.sh
index 708c2c43..82e73652 100755
--- a/script/dev-bucket.sh
+++ b/script/dev-bucket.sh
@@ -17,13 +17,19 @@ else
fi
$GARAGE_BIN -c /tmp/config.1.toml bucket create eprouvette
-if [ "$GARAGE_08" = "1" ]; then
+if [ "$GARAGE_OLDVER" = "v08" ]; then
KEY_INFO=$($GARAGE_BIN -c /tmp/config.1.toml key new --name opérateur)
-else
+ ACCESS_KEY=`echo $KEY_INFO|grep -Po 'GK[a-f0-9]+'`
+ SECRET_KEY=`echo $KEY_INFO|grep -Po 'Secret key: [a-f0-9]+'|grep -Po '[a-f0-9]+$'`
+elif [ "$GARAGE_OLDVER" = "v1" ]; then
KEY_INFO=$($GARAGE_BIN -c /tmp/config.1.toml key create opérateur)
+ ACCESS_KEY=`echo $KEY_INFO|grep -Po 'GK[a-f0-9]+'`
+ SECRET_KEY=`echo $KEY_INFO|grep -Po 'Secret key: [a-f0-9]+'|grep -Po '[a-f0-9]+$'`
+else
+ KEY_INFO=$($GARAGE_BIN -c /tmp/config.1.toml json-api CreateKey '{"name":"opérateur"}')
+ ACCESS_KEY=`echo $KEY_INFO|jq -r .accessKeyId`
+ SECRET_KEY=`echo $KEY_INFO|jq -r .secretAccessKey`
fi
-ACCESS_KEY=`echo $KEY_INFO|grep -Po 'GK[a-f0-9]+'`
-SECRET_KEY=`echo $KEY_INFO|grep -Po 'Secret key: [a-f0-9]+'|grep -Po '[a-f0-9]+$'`
$GARAGE_BIN -c /tmp/config.1.toml bucket allow eprouvette --read --write --owner --key $ACCESS_KEY
echo "$ACCESS_KEY $SECRET_KEY" > /tmp/garage.s3
diff --git a/script/dev-cluster.sh b/script/dev-cluster.sh
index 998ffdb9..81a37099 100755
--- a/script/dev-cluster.sh
+++ b/script/dev-cluster.sh
@@ -30,6 +30,12 @@ for count in $(seq 1 3); do
CONF_PATH="/tmp/config.$count.toml"
LABEL="\e[${FANCYCOLORS[$count]}[$count]\e[49m"
+if [ "$GARAGE_OLDVER" == "v08" ]; then
+ REPLICATION_MODE="replication_mode = \"3\""
+else
+ REPLICATION_MODE="replication_factor = 3"
+fi
+
cat > $CONF_PATH <&1|grep -q HEALTHY ; do
sleep 1
done
-if [ "$GARAGE_08" = "1" ]; then
+if [ "$GARAGE_OLDVER" = "v08" ]; then
$GARAGE_BIN -c /tmp/config.1.toml status \
| grep 'NO ROLE' \
| grep -Po '^[0-9a-f]+' \
diff --git a/script/dev-env-aws.sh b/script/dev-env-aws.sh
index 41f1fdde..808f9cf1 100644
--- a/script/dev-env-aws.sh
+++ b/script/dev-env-aws.sh
@@ -1,7 +1,6 @@
export AWS_ACCESS_KEY_ID=`cat /tmp/garage.s3 |cut -d' ' -f1`
export AWS_SECRET_ACCESS_KEY=`cat /tmp/garage.s3 |cut -d' ' -f2`
export AWS_DEFAULT_REGION='garage'
-export AWS_REQUEST_CHECKSUM_CALCULATION='when_required'
# FUTUREWORK: set AWS_ENDPOINT_URL instead, once nixpkgs bumps awscli to >=2.13.0.
function aws { command aws --endpoint-url http://127.0.0.1:3911 $@ ; }
diff --git a/script/helm/garage/Chart.yaml b/script/helm/garage/Chart.yaml
index b3a7b921..2b8e39b3 100644
--- a/script/helm/garage/Chart.yaml
+++ b/script/helm/garage/Chart.yaml
@@ -2,8 +2,8 @@ apiVersion: v2
name: garage
description: S3-compatible object store for small self-hosted geo-distributed deployments
type: application
-version: 0.7.3
-appVersion: "v1.3.1"
+version: 0.9.1
+appVersion: "v2.1.0"
home: https://garagehq.deuxfleurs.fr/
icon: https://garagehq.deuxfleurs.fr/images/garage-logo.svg
diff --git a/script/helm/garage/README.md b/script/helm/garage/README.md
index bdf69ec4..de2ae3ff 100644
--- a/script/helm/garage/README.md
+++ b/script/helm/garage/README.md
@@ -1,6 +1,6 @@
# garage
-  
+  
S3-compatible object store for small self-hosted geo-distributed deployments
@@ -15,6 +15,7 @@ S3-compatible object store for small self-hosted geo-distributed deployments
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
+| commonLabels | object | `{}` | Extra labels for all resources |
| deployment.kind | string | `"StatefulSet"` | Switchable to DaemonSet |
| deployment.podManagementPolicy | string | `"OrderedReady"` | If using statefulset, allow Parallel or OrderedReady (default) |
| deployment.replicaCount | int | `3` | Number of StatefulSet replicas/garage nodes to start |
@@ -22,15 +23,16 @@ S3-compatible object store for small self-hosted geo-distributed deployments
| extraVolumeMounts | object | `{}` | |
| extraVolumes | object | `{}` | |
| fullnameOverride | string | `""` | |
-| garage.blockSize | string | `"1048576"` | Defaults is 1MB An increase can result in better performance in certain scenarios https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#block-size |
+| garage.blockSize | string | `"1048576"` | Defaults is 1MB An increase can result in better performance in certain scenarios https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#block_size |
| garage.bootstrapPeers | list | `[]` | This is not required if you use the integrated kubernetes discovery |
-| garage.compressionLevel | string | `"1"` | zstd compression level of stored blocks https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#compression-level |
-| garage.dbEngine | string | `"lmdb"` | Can be changed for better performance on certain systems https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#db-engine-since-v0-8-0 |
+| garage.compressionLevel | string | `"1"` | zstd compression level of stored blocks https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#compression_level |
+| garage.dbEngine | string | `"lmdb"` | Can be changed for better performance on certain systems https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#db_engine |
| garage.existingConfigMap | string | `""` | if not empty string, allow using an existing ConfigMap for the garage.toml, if set, ignores garage.toml |
| garage.garageTomlString | string | `""` | String Template for the garage configuration if set, ignores above values. Values can be templated, see https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/ |
| garage.kubernetesSkipCrd | bool | `false` | Set to true if you want to use k8s discovery but install the CRDs manually outside of the helm chart, for example if you operate at namespace level without cluster ressources |
+| garage.replicationFactor | string | `"3"` | Default to 3 replicas, see the replication_factor section at https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#replication_factor |
+| garage.consistencyMode | string | `"consistent"` | Default to read-after-write consistency, see the consistency_mode section at https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#consistency_mode |
| garage.metadataAutoSnapshotInterval | string | `""` | If this value is set, Garage will automatically take a snapshot of the metadata DB file at a regular interval and save it in the metadata directory. https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#metadata_auto_snapshot_interval |
-| garage.replicationMode | string | `"3"` | Default to 3 replicas, see the replication_mode section at https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#replication-mode |
| garage.rpcBindAddr | string | `"[::]:3901"` | |
| garage.rpcSecret | string | `""` | If not given, a random secret will be generated and stored in a Secret object |
| garage.s3.api.region | string | `"garage"` | |
diff --git a/script/helm/garage/templates/_helpers.tpl b/script/helm/garage/templates/_helpers.tpl
index 037a5f1c..187e1223 100644
--- a/script/helm/garage/templates/_helpers.tpl
+++ b/script/helm/garage/templates/_helpers.tpl
@@ -27,7 +27,7 @@ If release name contains chart name it will be used as a full name.
Create the name of the rpc secret
*/}}
{{- define "garage.rpcSecretName" -}}
-{{- printf "%s-rpc-secret" (include "garage.fullname" .) -}}
+{{- .Values.garage.existingRpcSecret | default (printf "%s-rpc-secret" (include "garage.fullname" .)) -}}
{{- end }}
{{/*
@@ -47,6 +47,9 @@ helm.sh/chart: {{ include "garage.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{ with .Values.commonLabels }}
+{{- toYaml . }}
+{{- end }}
{{- end }}
{{/*
diff --git a/script/helm/garage/templates/configmap.yaml b/script/helm/garage/templates/configmap.yaml
index ab5b84db..bfdc6255 100644
--- a/script/helm/garage/templates/configmap.yaml
+++ b/script/helm/garage/templates/configmap.yaml
@@ -15,7 +15,8 @@ data:
block_size = {{ .Values.garage.blockSize }}
- replication_mode = "{{ .Values.garage.replicationMode }}"
+ replication_factor = {{ .Values.garage.replicationFactor }}
+ consistency_mode = "{{ .Values.garage.consistencyMode }}"
compression_level = {{ .Values.garage.compressionLevel }}
@@ -29,6 +30,10 @@ data:
bootstrap_peers = {{ .Values.garage.bootstrapPeers }}
+ {{- if .Values.garage.additionalTopLevelConfig }}
+ {{ .Values.garage.additionalTopLevelConfig | nindent 4 }}
+ {{- end }}
+
[kubernetes_discovery]
namespace = "{{ .Release.Namespace }}"
service_name = "{{ include "garage.fullname" . }}"
diff --git a/script/helm/garage/templates/secret.yaml b/script/helm/garage/templates/secret.yaml
index 54749424..c0c45b93 100644
--- a/script/helm/garage/templates/secret.yaml
+++ b/script/helm/garage/templates/secret.yaml
@@ -1,3 +1,4 @@
+{{- if not .Values.garage.existingRpcSecret }}
apiVersion: v1
kind: Secret
metadata:
@@ -12,3 +13,4 @@ data:
{{- $prevRpcSecret := $prevSecretData.rpcSecret | default "" | b64dec }}
{{/* Priority is: 1. from values, 2. previous value, 3. generate random */}}
rpcSecret: {{ .Values.garage.rpcSecret | default $prevRpcSecret | default (include "jupyterhub.randHex" 64) | b64enc | quote }}
+{{- end }}
diff --git a/script/helm/garage/templates/service.yaml b/script/helm/garage/templates/service.yaml
index 887c90d0..37218872 100644
--- a/script/helm/garage/templates/service.yaml
+++ b/script/helm/garage/templates/service.yaml
@@ -4,10 +4,6 @@ metadata:
name: {{ include "garage.fullname" . }}
labels:
{{- include "garage.labels" . | nindent 4 }}
- {{- with .Values.service.annotations }}
- annotations:
- {{- toYaml . | nindent 4 }}
- {{- end }}
spec:
type: {{ .Values.service.type }}
ports:
@@ -41,4 +37,4 @@ spec:
name: metrics
selector:
{{- include "garage.selectorLabels" . | nindent 4 }}
-{{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/script/helm/garage/templates/workload.yaml b/script/helm/garage/templates/workload.yaml
index d144cb41..4264253e 100644
--- a/script/helm/garage/templates/workload.yaml
+++ b/script/helm/garage/templates/workload.yaml
@@ -21,7 +21,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
- {{- include "garage.selectorLabels" . | nindent 8 }}
+ {{- include "garage.labels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
diff --git a/script/helm/garage/values.yaml b/script/helm/garage/values.yaml
index 5e419fe2..b0dfd292 100644
--- a/script/helm/garage/values.yaml
+++ b/script/helm/garage/values.yaml
@@ -2,23 +2,32 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
+# -- Additional labels to add to all resources created by this chart
+commonLabels: {}
+# app.kubernetes.io/part-of: storage
+# team: platform
+
# Garage configuration. These values go to garage.toml
garage:
# -- Can be changed for better performance on certain systems
- # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#db-engine-since-v0-8-0
+ # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#db_engine
dbEngine: "lmdb"
# -- Defaults is 1MB
# An increase can result in better performance in certain scenarios
- # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#block-size
+ # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#block_size
blockSize: "1048576"
- # -- Default to 3 replicas, see the replication_mode section at
- # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#replication-mode
- replicationMode: "3"
+ # -- Default to 3 replicas, see the replication_factor section at
+ # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#replication_factor
+ replicationFactor: "3"
+
+ # -- By default, enable read-after-write consistency guarantees, see the consistency_mode section at
+ # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#consistency_mode
+ consistencyMode: "consistent"
# -- zstd compression level of stored blocks
- # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#compression-level
+ # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#compression_level
compressionLevel: "1"
# -- If this value is set, Garage will automatically take a snapshot of the metadata DB file at a regular interval and save it in the metadata directory.
@@ -28,6 +37,10 @@ garage:
rpcBindAddr: "[::]:3901"
# -- If not given, a random secret will be generated and stored in a Secret object
rpcSecret: ""
+ # -- If you want to provide an rpcSecret within an existing k8s secret,
+ # specify the secret name here, and store the value under the secret key `rpcSecret`
+ # the default secret will not be created
+ existingRpcSecret: ""
# -- This is not required if you use the integrated kubernetes discovery
bootstrapPeers: []
# -- Set to true if you want to use k8s discovery but install the CRDs manually outside
@@ -41,6 +54,12 @@ garage:
rootDomain: ".web.garage.tld"
index: "index.html"
+ # -- Additional configuration to append to garage.toml. Use a multi-line string for custom config.
+ # Example:
+ # additionalTopLevelConfig: |-
+ # data_fsync = true
+ additionalTopLevelConfig: ""
+
# -- if not empty string, allow using an existing ConfigMap for the garage.toml,
# if set, ignores garage.toml
existingConfigMap: ""
@@ -108,6 +127,7 @@ podSecurityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
+ fsGroupChangePolicy: "OnRootMismatch"
runAsNonRoot: true
securityContext:
@@ -124,8 +144,6 @@ service:
# - NodePort (+ Ingress)
# - LoadBalancer
type: ClusterIP
- # -- Annotations to add to the service
- annotations: {}
s3:
api:
port: 3900
diff --git a/script/jepsen.garage/src/jepsen/garage/daemon.clj b/script/jepsen.garage/src/jepsen/garage/daemon.clj
index 0ea773fb..9267a03a 100644
--- a/script/jepsen.garage/src/jepsen/garage/daemon.clj
+++ b/script/jepsen.garage/src/jepsen/garage/daemon.clj
@@ -43,7 +43,7 @@
"rpc_bind_addr = \"0.0.0.0:3901\"\n"
"rpc_public_addr = \"" node ":3901\"\n"
"db_engine = \"lmdb\"\n"
- "replication_mode = \"3\"\n"
+ "replication_factor = 3\n"
"data_dir = \"" data-dir "\"\n"
"metadata_dir = \"" meta-dir "\"\n"
"[s3_api]\n"
diff --git a/script/k8s/config.yaml b/script/k8s/config.yaml
index 8cf40fc2..bfefd999 100644
--- a/script/k8s/config.yaml
+++ b/script/k8s/config.yaml
@@ -8,7 +8,7 @@ data:
metadata_dir = "/tmp/meta"
data_dir = "/tmp/data"
- replication_mode = "3"
+ replication_factor = 3
rpc_bind_addr = "[::]:3901"
rpc_secret = "1799bccfd7411eddcf9ebd316bc1f5287ad12a68094e1c6ac6abde7e6feae1ec"
diff --git a/script/telemetry/grafana-garage-dashboard-prometheus.json b/script/telemetry/grafana-garage-dashboard-prometheus.json
index 28ef1ec0..1e127f8a 100644
--- a/script/telemetry/grafana-garage-dashboard-prometheus.json
+++ b/script/telemetry/grafana-garage-dashboard-prometheus.json
@@ -694,32 +694,7 @@
]
}
},
- "overrides": [
- {
- "__systemRef": "hideSeriesFrom",
- "matcher": {
- "id": "byNames",
- "options": {
- "mode": "exclude",
- "names": [
- "10.83.2.3:3903"
- ],
- "prefix": "All except:",
- "readOnly": true
- }
- },
- "properties": [
- {
- "id": "custom.hideFrom",
- "value": {
- "legend": false,
- "tooltip": false,
- "viz": true
- }
- }
- ]
- }
- ]
+ "overrides": []
},
"gridPos": {
"h": 8,
diff --git a/script/test-smoke.sh b/script/test-smoke.sh
index acf56a90..eee206ba 100755
--- a/script/test-smoke.sh
+++ b/script/test-smoke.sh
@@ -112,6 +112,23 @@ if [ -z "$SKIP_S3CMD" ]; then
done
fi
+# BOTO3
+if [ -z "$SKIP_BOTO3" ]; then
+ echo "🛠️ Testing with boto3 for STREAMING-UNSIGNED-PAYLOAD-TRAILER"
+ source ${SCRIPT_FOLDER}/dev-env-aws.sh
+ AWS_ENDPOINT_URL=https://localhost:4443 python <> /tmp/garage.log 2>&1 &
sleep 3
echo "🛠️ Retrieving data from old cluster"
-rclone copy garage:eprouvette/test_dotgit /tmp/test_dotgit --stats=1s --stats-log-level=NOTICE --stats-one-line --fast-list
+rclone copy garage:eprouvette/test_dotgit /tmp/test_dotgit \
+ --stats=1s --stats-log-level=NOTICE --stats-one-line --fast-list
if ! diff <(find "${SCRIPT_FOLDER}/../.git" -type f | xargs md5sum | cut -d ' ' -f 1 | sort) <(find /tmp/test_dotgit -type f | xargs md5sum | cut -d ' ' -f 1 | sort); then
echo "TEST FAILURE: directories are different"
@@ -68,6 +93,23 @@ if ! diff <(find "${SCRIPT_FOLDER}/../.git" -type f | xargs md5sum | cut -d ' '
fi
rm -r /tmp/test_dotgit
+if [ "$DO_SSEC_TEST" = "1" ]; then
+ rclone copy garage:eprouvette/test-ssec /tmp/test_ssec_out \
+ --s3-sse-customer-algorithm AES256 \
+ --s3-sse-customer-key-base64 "$SSEC_KEY" \
+ --stats=1s --stats-log-level=NOTICE --stats-one-line
+ if ! diff "/tmp/test_ssec_out/test-upgrade.sh" "${SCRIPT_FOLDER}/test-upgrade.sh"; then
+ echo "SSEC-FAILURE (small file)"
+ exit 1
+ fi
+ if ! diff "/tmp/test_ssec_out/randfile-for-upgrade" "/tmp/randfile-for-upgrade"; then
+ echo "SSEC-FAILURE (big file)"
+ exit 1
+ fi
+ rm -r /tmp/test_ssec_out
+ rm /tmp/randfile-for-upgrade
+fi
+
echo "🏁 Teardown"
rm -rf /tmp/garage-{data,meta}-*
rm -rf /tmp/config.*.toml
diff --git a/shell.nix b/shell.nix
index c3dedca8..373507b3 100644
--- a/shell.nix
+++ b/shell.nix
@@ -26,6 +26,8 @@ in
s3cmd
minio-client
rclone
+ (python312.withPackages (ps: [ ps.boto3 ]))
+
socat
psmisc
which
@@ -34,9 +36,8 @@ in
jq
];
shellHook = ''
- export AWS_REQUEST_CHECKSUM_CALCULATION='when_required'
-
function to_s3 {
+ AWS_REQUEST_CHECKSUM_CALCULATION=WHEN_REQUIRED AWS_RESPONSE_CHECKSUM_VALIDATION=WHEN_REQUIRED \
aws \
--endpoint-url https://garage.deuxfleurs.fr \
--region garage \
@@ -93,6 +94,7 @@ in
nix-build nix/build_index.nix
+ AWS_REQUEST_CHECKSUM_CALCULATION=WHEN_REQUIRED AWS_RESPONSE_CHECKSUM_VALIDATION=WHEN_REQUIRED \
aws \
--endpoint-url https://garage.deuxfleurs.fr \
--region garage \
@@ -100,6 +102,7 @@ in
result/share/_releases.json \
s3://garagehq.deuxfleurs.fr/
+ AWS_REQUEST_CHECKSUM_CALCULATION=WHEN_REQUIRED AWS_RESPONSE_CHECKSUM_VALIDATION=WHEN_REQUIRED \
aws \
--endpoint-url https://garage.deuxfleurs.fr \
--region garage \
diff --git a/src/api/admin/Cargo.toml b/src/api/admin/Cargo.toml
index 656c6825..9f6c06b7 100644
--- a/src/api/admin/Cargo.toml
+++ b/src/api/admin/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "garage_api_admin"
-version = "1.3.1"
+version = "2.1.0"
authors = ["Alex Auvolat "]
edition = "2018"
license = "AGPL-3.0"
@@ -14,7 +14,9 @@ path = "lib.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
+format_table.workspace = true
garage_model.workspace = true
+garage_block.workspace = true
garage_table.workspace = true
garage_util.workspace = true
garage_rpc.workspace = true
@@ -22,8 +24,11 @@ garage_api_common.workspace = true
argon2.workspace = true
async-trait.workspace = true
+bytesize.workspace = true
+chrono.workspace = true
thiserror.workspace = true
hex.workspace = true
+paste.workspace = true
tracing.workspace = true
futures.workspace = true
@@ -34,6 +39,7 @@ url.workspace = true
serde.workspace = true
serde_json.workspace = true
+utoipa.workspace = true
opentelemetry.workspace = true
opentelemetry-prometheus = { workspace = true, optional = true }
@@ -41,3 +47,4 @@ prometheus = { workspace = true, optional = true }
[features]
metrics = [ "opentelemetry-prometheus", "prometheus" ]
+k2v = [ "garage_model/k2v" ]
diff --git a/src/api/admin/admin_token.rs b/src/api/admin/admin_token.rs
new file mode 100644
index 00000000..0f9c66d2
--- /dev/null
+++ b/src/api/admin/admin_token.rs
@@ -0,0 +1,292 @@
+use std::sync::Arc;
+
+use chrono::{DateTime, Utc};
+
+use garage_table::*;
+use garage_util::time::now_msec;
+
+use garage_model::admin_token_table::*;
+use garage_model::garage::Garage;
+
+use crate::api::*;
+use crate::error::*;
+use crate::{Admin, RequestHandler};
+
+impl RequestHandler for ListAdminTokensRequest {
+ type Response = ListAdminTokensResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let now = now_msec();
+
+ let mut res = garage
+ .admin_token_table
+ .get_range(
+ &EmptyKey,
+ None,
+ Some(KeyFilter::Deleted(DeletedFilter::NotDeleted)),
+ 10000,
+ EnumerationOrder::Forward,
+ )
+ .await?
+ .iter()
+ .map(|t| admin_token_info_results(t, now))
+ .collect::>();
+
+ if garage.config.admin.metrics_token.is_some() {
+ res.insert(
+ 0,
+ GetAdminTokenInfoResponse {
+ id: None,
+ created: None,
+ name: "metrics_token (from daemon configuration)".into(),
+ expiration: None,
+ expired: false,
+ scope: vec!["Metrics".into()],
+ },
+ );
+ }
+
+ if garage.config.admin.admin_token.is_some() {
+ res.insert(
+ 0,
+ GetAdminTokenInfoResponse {
+ id: None,
+ created: None,
+ name: "admin_token (from daemon configuration)".into(),
+ expiration: None,
+ expired: false,
+ scope: vec!["*".into()],
+ },
+ );
+ }
+
+ Ok(ListAdminTokensResponse(res))
+ }
+}
+
+impl RequestHandler for GetAdminTokenInfoRequest {
+ type Response = GetAdminTokenInfoResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let token = match (self.id, self.search) {
+ (Some(id), None) => get_existing_admin_token(garage, &id).await?,
+ (None, Some(search)) => {
+ let candidates = garage
+ .admin_token_table
+ .get_range(
+ &EmptyKey,
+ None,
+ Some(KeyFilter::MatchesAndNotDeleted(search.to_string())),
+ 10,
+ EnumerationOrder::Forward,
+ )
+ .await?
+ .into_iter()
+ .collect::>();
+ if candidates.len() != 1 {
+ return Err(Error::bad_request(format!(
+ "{} matching admin tokens",
+ candidates.len()
+ )));
+ }
+ candidates.into_iter().next().unwrap()
+ }
+ _ => {
+ return Err(Error::bad_request(
+ "Either id or search must be provided (but not both)",
+ ));
+ }
+ };
+
+ Ok(admin_token_info_results(&token, now_msec()))
+ }
+}
+
+impl RequestHandler for CreateAdminTokenRequest {
+ type Response = CreateAdminTokenResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let (mut token, secret) = if self.0.name.is_some() {
+ AdminApiToken::new("")
+ } else {
+ AdminApiToken::new(&format!("token_{}", Utc::now().format("%Y%m%d_%H%M")))
+ };
+
+ apply_token_updates(&mut token, self.0)?;
+
+ garage.admin_token_table.insert(&token).await?;
+
+ Ok(CreateAdminTokenResponse {
+ secret_token: secret,
+ info: admin_token_info_results(&token, now_msec()),
+ })
+ }
+}
+
+impl RequestHandler for UpdateAdminTokenRequest {
+ type Response = UpdateAdminTokenResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let mut token = get_existing_admin_token(&garage, &self.id).await?;
+
+ apply_token_updates(&mut token, self.body)?;
+
+ garage.admin_token_table.insert(&token).await?;
+
+ Ok(UpdateAdminTokenResponse(admin_token_info_results(
+ &token,
+ now_msec(),
+ )))
+ }
+}
+
+impl RequestHandler for DeleteAdminTokenRequest {
+ type Response = DeleteAdminTokenResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let token = get_existing_admin_token(&garage, &self.id).await?;
+
+ garage
+ .admin_token_table
+ .insert(&AdminApiToken::delete(token.prefix))
+ .await?;
+
+ Ok(DeleteAdminTokenResponse)
+ }
+}
+
+impl RequestHandler for GetCurrentAdminTokenInfoRequest {
+ type Response = GetCurrentAdminTokenInfoResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let now = now_msec();
+
+ if garage
+ .config
+ .admin
+ .metrics_token
+ .as_ref()
+ .is_some_and(|s| s == &self.admin_token)
+ {
+ return Ok(GetCurrentAdminTokenInfoResponse(
+ GetAdminTokenInfoResponse {
+ id: None,
+ created: None,
+ name: "metrics_token (from daemon configuration)".into(),
+ expiration: None,
+ expired: false,
+ scope: vec!["Metrics".into()],
+ },
+ ));
+ }
+
+ if garage
+ .config
+ .admin
+ .admin_token
+ .as_ref()
+ .is_some_and(|s| s == &self.admin_token)
+ {
+ return Ok(GetCurrentAdminTokenInfoResponse(
+ GetAdminTokenInfoResponse {
+ id: None,
+ created: None,
+ name: "admin_token (from daemon configuration)".into(),
+ expiration: None,
+ expired: false,
+ scope: vec!["*".into()],
+ },
+ ));
+ }
+
+ let (prefix, _) = self.admin_token.split_once('.').unwrap();
+ let token = get_existing_admin_token(&garage, &prefix.to_string()).await?;
+
+ Ok(GetCurrentAdminTokenInfoResponse(admin_token_info_results(
+ &token, now,
+ )))
+ }
+}
+
+// ---- helpers ----
+
+fn admin_token_info_results(token: &AdminApiToken, now: u64) -> GetAdminTokenInfoResponse {
+ let params = token.params().unwrap();
+
+ GetAdminTokenInfoResponse {
+ id: Some(token.prefix.clone()),
+ created: Some(
+ DateTime::from_timestamp_millis(params.created as i64)
+ .expect("invalid timestamp stored in db"),
+ ),
+ name: params.name.get().to_string(),
+ expiration: params.expiration.get().map(|x| {
+ DateTime::from_timestamp_millis(x as i64).expect("invalid timestamp stored in db")
+ }),
+ expired: params.is_expired(now),
+ scope: params.scope.get().0.clone(),
+ }
+}
+
+async fn get_existing_admin_token(garage: &Garage, id: &String) -> Result {
+ garage
+ .admin_token_table
+ .get(&EmptyKey, id)
+ .await?
+ .filter(|k| !k.state.is_deleted())
+ .ok_or_else(|| Error::NoSuchAdminToken(id.to_string()))
+}
+
+fn apply_token_updates(
+ token: &mut AdminApiToken,
+ updates: UpdateAdminTokenRequestBody,
+) -> Result<(), Error> {
+ if updates.never_expires && updates.expiration.is_some() {
+ return Err(Error::bad_request(
+ "cannot specify `expiration` and `never_expires`",
+ ));
+ }
+
+ let params = token.params_mut().unwrap();
+
+ if let Some(name) = updates.name {
+ params.name.update(name);
+ }
+ if let Some(expiration) = updates.expiration {
+ params
+ .expiration
+ .update(Some(expiration.timestamp_millis() as u64));
+ }
+ if updates.never_expires {
+ params.expiration.update(None);
+ }
+ if let Some(scope) = updates.scope {
+ params.scope.update(AdminApiTokenScope(scope));
+ }
+
+ Ok(())
+}
diff --git a/src/api/admin/api.rs b/src/api/admin/api.rs
new file mode 100644
index 00000000..da25b6a2
--- /dev/null
+++ b/src/api/admin/api.rs
@@ -0,0 +1,1352 @@
+use std::collections::HashMap;
+use std::convert::TryFrom;
+use std::net::SocketAddr;
+use std::sync::Arc;
+
+use chrono::{DateTime, Utc};
+use paste::paste;
+use serde::{Deserialize, Serialize};
+use utoipa::{IntoParams, ToSchema};
+
+use garage_rpc::*;
+
+use garage_model::garage::Garage;
+
+use garage_api_common::{common_error::CommonError, helpers::is_default};
+
+use crate::api_server::{find_matching_nodes, AdminRpc, AdminRpcResponse};
+use crate::error::Error;
+use crate::macros::*;
+use crate::{Admin, RequestHandler};
+
+// This generates the following:
+//
+// - An enum AdminApiRequest that contains a variant for all endpoints
+//
+// - An enum AdminApiResponse that contains a variant for all non-special endpoints.
+// This enum is serialized in api_server.rs, without the enum tag,
+// which gives directly the JSON response corresponding to the API call.
+// This enum does not implement Deserialize as its meaning can be ambiguous.
+//
+// - An enum TaggedAdminApiResponse that contains the same variants, but
+// serializes as a tagged enum. This allows it to be transmitted through
+// Garage RPC and deserialized correctly upon receival.
+// Conversion from untagged to tagged can be done using the `.tagged()` method.
+//
+// - AdminApiRequest::name() that returns the name of the endpoint
+//
+// - impl EndpointHandler for AdminApiHandler, that uses the impl EndpointHandler
+// of each request type below for non-special endpoints
+admin_endpoints![
+ // Special endpoints of the Admin API
+ @special Options,
+ @special CheckDomain,
+ @special Health,
+ @special Metrics,
+
+ // Cluster operations
+ GetClusterStatus,
+ GetClusterHealth,
+ GetClusterStatistics,
+ ConnectClusterNodes,
+
+ // Admin tokens operations
+ ListAdminTokens,
+ GetAdminTokenInfo,
+ CreateAdminToken,
+ UpdateAdminToken,
+ DeleteAdminToken,
+ GetCurrentAdminTokenInfo,
+
+ // Layout operations
+ GetClusterLayout,
+ GetClusterLayoutHistory,
+ UpdateClusterLayout,
+ PreviewClusterLayoutChanges,
+ ApplyClusterLayout,
+ RevertClusterLayout,
+ ClusterLayoutSkipDeadNodes,
+
+ // Access key operations
+ ListKeys,
+ GetKeyInfo,
+ CreateKey,
+ ImportKey,
+ UpdateKey,
+ DeleteKey,
+
+ // Bucket operations
+ ListBuckets,
+ GetBucketInfo,
+ CreateBucket,
+ UpdateBucket,
+ DeleteBucket,
+ CleanupIncompleteUploads,
+ InspectObject,
+
+ // Operations on permissions for keys on buckets
+ AllowBucketKey,
+ DenyBucketKey,
+
+ // Operations on bucket aliases
+ AddBucketAlias,
+ RemoveBucketAlias,
+
+ // Node operations
+ GetNodeInfo,
+ GetNodeStatistics,
+ CreateMetadataSnapshot,
+ LaunchRepairOperation,
+
+ // Worker operations
+ ListWorkers,
+ GetWorkerInfo,
+ GetWorkerVariable,
+ SetWorkerVariable,
+
+ // Block operations
+ ListBlockErrors,
+ GetBlockInfo,
+ RetryBlockResync,
+ PurgeBlocks,
+];
+
+local_admin_endpoints![
+ // Node operations
+ GetNodeInfo,
+ GetNodeStatistics,
+ CreateMetadataSnapshot,
+ LaunchRepairOperation,
+ // Background workers
+ ListWorkers,
+ GetWorkerInfo,
+ GetWorkerVariable,
+ SetWorkerVariable,
+ // Block operations
+ ListBlockErrors,
+ GetBlockInfo,
+ RetryBlockResync,
+ PurgeBlocks,
+];
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct MultiRequest {
+ pub node: String,
+ pub body: RB,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct MultiResponse {
+ /// Map of node id to response returned by this node, for nodes that were able to
+ /// successfully complete the API call
+ pub success: HashMap,
+ /// Map of node id to error message, for nodes that were unable to complete the API
+ /// call
+ pub error: HashMap,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
+#[into_params(parameter_in = Query)]
+pub struct MultiRequestQueryParams {
+ /// Node ID to query, or `*` for all nodes, or `self` for the node responding to the request
+ pub node: String,
+}
+
+// **********************************************
+// Special endpoints
+//
+// These endpoints don't have associated *Response structs
+// because they directly produce an http::Response
+// **********************************************
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct OptionsRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
+#[into_params(parameter_in = Query)]
+pub struct CheckDomainRequest {
+ /// The domain name to check for
+ pub domain: String,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct HealthRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct MetricsRequest;
+
+// **********************************************
+// Cluster operations
+// **********************************************
+
+// ---- GetClusterStatus ----
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct GetClusterStatusRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct GetClusterStatusResponse {
+ /// Current version number of the cluster layout
+ pub layout_version: u64,
+ /// List of nodes that are either currently connected, part of the
+ /// current cluster layout, or part of an older cluster layout that
+ /// is still active in the cluster (being drained).
+ pub nodes: Vec,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, Default, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct NodeResp {
+ /// Full-length node identifier
+ pub id: String,
+ /// Garage version
+ pub garage_version: Option,
+ /// Socket address used by other nodes to connect to this node for RPC
+ #[schema(value_type = Option)]
+ pub addr: Option,
+ /// Hostname of the node
+ pub hostname: Option,
+ /// Whether this node is connected in the cluster
+ pub is_up: bool,
+ /// For disconnected nodes, the number of seconds since last contact,
+ /// or `null` if no contact was established since Garage restarted.
+ pub last_seen_secs_ago: Option,
+ /// Role assigned to this node in the current cluster layout
+ pub role: Option,
+ /// Whether this node is part of an older layout version and is draining data.
+ pub draining: bool,
+ /// Total and available space on the disk partition(s) containing the data
+ /// directory(ies)
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ pub data_partition: Option,
+ /// Total and available space on the disk partition containing the
+ /// metadata directory
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ pub metadata_partition: Option,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct NodeAssignedRole {
+ /// Zone name assigned by the cluster administrator
+ pub zone: String,
+ /// List of tags assigned by the cluster administrator
+ pub tags: Vec,
+ /// Capacity (in bytes) assigned by the cluster administrator,
+ /// absent for gateway nodes
+ pub capacity: Option,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct FreeSpaceResp {
+ /// Number of bytes available
+ pub available: u64,
+ /// Total number of bytes
+ pub total: u64,
+}
+
+// ---- GetClusterHealth ----
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct GetClusterHealthRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct GetClusterHealthResponse {
+ /// One of `healthy`, `degraded` or `unavailable`:
+ /// - `healthy`: Garage node is connected to all storage nodes
+ /// - `degraded`: Garage node is not connected to all storage nodes, but a quorum of write nodes is available for all partitions
+ /// - `unavailable`: a quorum of write nodes is not available for some partitions
+ pub status: String,
+ /// the number of nodes this Garage node has had a TCP connection to since the daemon started
+ pub known_nodes: usize,
+ /// the nubmer of nodes this Garage node currently has an open connection to
+ pub connected_nodes: usize,
+ /// the number of storage nodes currently registered in the cluster layout
+ pub storage_nodes: usize,
+ /// the number of storage nodes to which a connection is currently open
+ pub storage_nodes_up: usize,
+ /// the total number of partitions of the data (currently always 256)
+ pub partitions: usize,
+ /// the number of partitions for which a quorum of write nodes is available
+ pub partitions_quorum: usize,
+ /// the number of partitions for which we are connected to all storage nodes responsible of storing it
+ pub partitions_all_ok: usize,
+}
+
+// ---- GetClusterStatistics ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, Default)]
+pub struct GetClusterStatisticsRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct GetClusterStatisticsResponse {
+ pub freeform: String,
+}
+
+// ---- ConnectClusterNodes ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct ConnectClusterNodesRequest(pub Vec);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct ConnectClusterNodesResponse(pub Vec);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct ConnectNodeResponse {
+ /// `true` if Garage managed to connect to this node
+ pub success: bool,
+ /// An error message if Garage did not manage to connect to this node
+ pub error: Option,
+}
+
+// **********************************************
+// Admin token operations
+// **********************************************
+
+// ---- ListAdminTokens ----
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ListAdminTokensRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct ListAdminTokensResponse(pub Vec);
+
+// ---- GetAdminTokenInfo ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
+#[into_params(parameter_in = Query)]
+#[serde(rename_all = "camelCase")]
+pub struct GetAdminTokenInfoRequest {
+ /// Admin API token ID
+ pub id: Option,
+ /// Partial token ID or name to search for
+ pub search: Option,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct GetAdminTokenInfoResponse {
+ /// Identifier of the admin token (which is also a prefix of the full bearer token)
+ pub id: Option,
+ /// Creation date
+ pub created: Option>,
+ /// Name of the admin API token
+ pub name: String,
+ /// Expiration time and date, formatted according to RFC 3339
+ pub expiration: Option>,
+ /// Whether this admin token is expired already
+ pub expired: bool,
+ /// Scope of the admin API token, a list of admin endpoint names (such as
+ /// `GetClusterStatus`, etc), or the special value `*` to allow all
+ /// admin endpoints
+ pub scope: Vec,
+}
+
+// ---- CreateAdminToken ----
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct CreateAdminTokenRequest(pub UpdateAdminTokenRequestBody);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct CreateAdminTokenResponse {
+ /// The secret bearer token. **CAUTION:** This token will be shown only
+ /// ONCE, so this value MUST be remembered somewhere, or the token
+ /// will be unusable.
+ pub secret_token: String,
+ #[serde(flatten)]
+ pub info: GetAdminTokenInfoResponse,
+}
+
+// ---- UpdateAdminToken ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
+#[into_params(parameter_in = Query)]
+pub struct UpdateAdminTokenRequest {
+ /// Admin API token ID
+ pub id: String,
+ #[param(ignore = true)]
+ pub body: UpdateAdminTokenRequestBody,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct UpdateAdminTokenRequestBody {
+ /// Name of the admin API token
+ pub name: Option,
+ /// Expiration time and date, formatted according to RFC 3339
+ pub expiration: Option>,
+ /// Set the admin token to never expire
+ #[serde(default)]
+ pub never_expires: bool,
+ /// Scope of the admin API token, a list of admin endpoint names (such as
+ /// `GetClusterStatus`, etc), or the special value `*` to allow all
+ /// admin endpoints. **WARNING:** Granting a scope of `CreateAdminToken` or
+ /// `UpdateAdminToken` trivially allows for privilege escalation, and is thus
+ /// functionnally equivalent to granting a scope of `*`.
+ pub scope: Option>,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct UpdateAdminTokenResponse(pub GetAdminTokenInfoResponse);
+
+// ---- DeleteAdminToken ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
+#[into_params(parameter_in = Query)]
+pub struct DeleteAdminTokenRequest {
+ /// Admin API token ID
+ pub id: String,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct DeleteAdminTokenResponse;
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct GetCurrentAdminTokenInfoRequest {
+ pub admin_token: String,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct GetCurrentAdminTokenInfoResponse(pub GetAdminTokenInfoResponse);
+
+// **********************************************
+// Layout operations
+// **********************************************
+
+// ---- GetClusterLayout ----
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct GetClusterLayoutRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct GetClusterLayoutResponse {
+ /// The current version number of the cluster layout
+ pub version: u64,
+ /// List of nodes that currently have a role in the cluster layout
+ pub roles: Vec,
+ /// Layout parameters used when the current layout was computed
+ pub parameters: LayoutParameters,
+ /// The size, in bytes, of one Garage partition (= a shard)
+ pub partition_size: u64,
+ /// List of nodes that will have a new role or whose role will be
+ /// removed in the next version of the cluster layout
+ pub staged_role_changes: Vec,
+ /// Layout parameters to use when computing the next version of
+ /// the cluster layout
+ pub staged_parameters: Option,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct LayoutNodeRole {
+ /// Identifier of the node
+ pub id: String,
+ /// Zone name assigned by the cluster administrator
+ pub zone: String,
+ /// List of tags assigned by the cluster administrator
+ pub tags: Vec,
+ /// Capacity (in bytes) assigned by the cluster administrator,
+ /// absent for gateway nodes
+ pub capacity: Option,
+ /// Number of partitions stored on this node
+ /// (a result of the layout computation)
+ pub stored_partitions: Option,
+ /// Capacity (in bytes) that is actually usable on this node in the current
+ /// layout, which is equal to `stored_partitions` × `partition_size`
+ pub usable_capacity: Option,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct NodeRoleChange {
+ /// ID of the node for which this change applies
+ pub id: String,
+ #[serde(flatten)]
+ pub action: NodeRoleChangeEnum,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(untagged)]
+pub enum NodeRoleChangeEnum {
+ #[serde(rename_all = "camelCase")]
+ Remove {
+ /// Set `remove` to `true` to remove the node from the layout
+ remove: bool,
+ },
+ #[serde(rename_all = "camelCase")]
+ Update(NodeAssignedRole),
+}
+
+#[derive(Copy, Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct LayoutParameters {
+ /// Minimum number of zones in which a data partition must be replicated
+ pub zone_redundancy: ZoneRedundancy,
+}
+
+#[derive(Copy, Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub enum ZoneRedundancy {
+ /// Partitions must be replicated in at least this number of
+ /// distinct zones.
+ AtLeast(usize),
+ /// Partitions must be replicated in as many zones as possible:
+ /// as many zones as there are replicas, if there are enough distinct
+ /// zones, or at least one in each zone otherwise.
+ Maximum,
+}
+
+// ---- GetClusterLayoutHistory ----
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct GetClusterLayoutHistoryRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct GetClusterLayoutHistoryResponse {
+ /// The current version number of the cluster layout
+ pub current_version: u64,
+ /// All nodes in the cluster are aware of layout versions up to
+ /// this version number (at least)
+ pub min_ack: u64,
+ /// Layout version history
+ pub versions: Vec,
+ /// Detailed update trackers for nodes (see
+ /// `https://garagehq.deuxfleurs.fr/blog/2023-12-preserving-read-after-write-consistency/`)
+ pub update_trackers: Option>,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct ClusterLayoutVersion {
+ /// Version number of this layout version
+ pub version: u64,
+ /// Status of this layout version
+ pub status: ClusterLayoutVersionStatus,
+ /// Number of nodes with an assigned storage capacity in this layout version
+ pub storage_nodes: u64,
+ /// Number of nodes with a gateway role in this layout version
+ pub gateway_nodes: u64,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub enum ClusterLayoutVersionStatus {
+ /// This is the most up-to-date layout version
+ Current,
+ /// This version is still active in the cluster because metadata
+ /// is being rebalanced or migrated from old nodes
+ Draining,
+ /// This version is no longer active in the cluster for metadata
+ /// reads and writes. Note that there is still the possibility
+ /// that data blocks are being migrated away from nodes in this
+ /// layout version.
+ Historical,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct NodeUpdateTrackers {
+ pub ack: u64,
+ pub sync: u64,
+ pub sync_ack: u64,
+}
+
+// ---- UpdateClusterLayout ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct UpdateClusterLayoutRequest {
+ /// New node roles to assign or remove in the cluster layout
+ #[serde(default)]
+ pub roles: Vec,
+ /// New layout computation parameters to use
+ #[serde(default)]
+ pub parameters: Option,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct UpdateClusterLayoutResponse(pub GetClusterLayoutResponse);
+
+// ---- PreviewClusterLayoutChanges ----
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct PreviewClusterLayoutChangesRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(untagged)]
+pub enum PreviewClusterLayoutChangesResponse {
+ #[serde(rename_all = "camelCase")]
+ Error {
+ /// Error message indicating that the layout could not be computed
+ /// with the provided configuration
+ error: String,
+ },
+ #[serde(rename_all = "camelCase")]
+ Success {
+ /// Plain-text information about the layout computation
+ /// (do not try to parse this)
+ message: Vec,
+ /// Details about the new cluster layout
+ new_layout: GetClusterLayoutResponse,
+ },
+}
+
+// ---- ApplyClusterLayout ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct ApplyClusterLayoutRequest {
+ /// As a safety measure, the new version number of the layout must
+ /// be specified here
+ pub version: u64,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct ApplyClusterLayoutResponse {
+ /// Plain-text information about the layout computation
+ /// (do not try to parse this)
+ pub message: Vec,
+ /// Details about the new cluster layout
+ pub layout: GetClusterLayoutResponse,
+}
+
+// ---- RevertClusterLayout ----
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct RevertClusterLayoutRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct RevertClusterLayoutResponse(pub GetClusterLayoutResponse);
+
+// ---- ClusterLayoutSkipDeadNodes ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct ClusterLayoutSkipDeadNodesRequest {
+ /// Version number of the layout to assume is currently up-to-date.
+ /// This will generally be the current layout version.
+ pub version: u64,
+ /// Allow the skip even if a quorum of nodes could not be found for
+ /// the data among the remaining nodes
+ pub allow_missing_data: bool,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct ClusterLayoutSkipDeadNodesResponse {
+ /// Nodes for which the ACK update tracker has been updated to `version`
+ pub ack_updated: Vec,
+ /// If `allow_missing_data` is set,
+ /// nodes for which the SYNC update tracker has been updated to `version`
+ pub sync_updated: Vec,
+}
+
+// **********************************************
+// Access key operations
+// **********************************************
+
+// ---- ListKeys ----
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ListKeysRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct ListKeysResponse(pub Vec);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct ListKeysResponseItem {
+ pub id: String,
+ pub name: String,
+ pub created: Option>,
+ pub expiration: Option>,
+ pub expired: bool,
+}
+
+// ---- GetKeyInfo ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
+#[into_params(parameter_in = Query)]
+#[serde(rename_all = "camelCase")]
+pub struct GetKeyInfoRequest {
+ /// Access key ID
+ pub id: Option,
+ /// Partial key ID or name to search for
+ pub search: Option,
+ /// Whether to return the secret access key
+ #[serde(default)]
+ pub show_secret_key: bool,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct GetKeyInfoResponse {
+ pub access_key_id: String,
+ pub created: Option>,
+ pub name: String,
+ pub expiration: Option>,
+ pub expired: bool,
+ #[serde(default, skip_serializing_if = "is_default")]
+ pub secret_access_key: Option,
+ pub permissions: KeyPerm,
+ pub buckets: Vec,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct KeyPerm {
+ #[serde(default)]
+ pub create_bucket: bool,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct KeyInfoBucketResponse {
+ pub id: String,
+ pub global_aliases: Vec,
+ pub local_aliases: Vec,
+ pub permissions: ApiBucketKeyPerm,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, Default, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct ApiBucketKeyPerm {
+ #[serde(default)]
+ pub read: bool,
+ #[serde(default)]
+ pub write: bool,
+ #[serde(default)]
+ pub owner: bool,
+}
+
+// ---- CreateKey ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct CreateKeyRequest(pub UpdateKeyRequestBody);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct CreateKeyResponse(pub GetKeyInfoResponse);
+
+// ---- ImportKey ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct ImportKeyRequest {
+ pub access_key_id: String,
+ pub secret_access_key: String,
+ pub name: Option,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct ImportKeyResponse(pub GetKeyInfoResponse);
+
+// ---- UpdateKey ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
+#[into_params(parameter_in = Query)]
+pub struct UpdateKeyRequest {
+ /// Access key ID
+ pub id: String,
+ #[param(ignore = true)]
+ pub body: UpdateKeyRequestBody,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct UpdateKeyResponse(pub GetKeyInfoResponse);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct UpdateKeyRequestBody {
+ /// Name of the API key
+ pub name: Option,
+ /// Expiration time and date, formatted according to RFC 3339
+ pub expiration: Option>,
+ /// Set the access key to never expire
+ #[serde(default)]
+ pub never_expires: bool,
+ /// Permissions to allow for the key
+ pub allow: Option,
+ /// Permissions to deny for the key
+ pub deny: Option,
+}
+
+// ---- DeleteKey ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
+#[into_params(parameter_in = Query)]
+pub struct DeleteKeyRequest {
+ /// Access key ID
+ pub id: String,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct DeleteKeyResponse;
+
+// **********************************************
+// Bucket operations
+// **********************************************
+
+// ---- ListBuckets ----
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct ListBucketsRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct ListBucketsResponse(pub Vec);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct ListBucketsResponseItem {
+ pub id: String,
+ pub created: DateTime,
+ pub global_aliases: Vec,
+ pub local_aliases: Vec,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct BucketLocalAlias {
+ pub access_key_id: String,
+ pub alias: String,
+}
+
+// ---- GetBucketInfo ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
+#[into_params(parameter_in = Query)]
+#[serde(rename_all = "camelCase")]
+pub struct GetBucketInfoRequest {
+ /// Exact bucket ID to look up
+ pub id: Option,
+ /// Global alias of bucket to look up
+ pub global_alias: Option,
+ /// Partial ID or alias to search for
+ pub search: Option,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct GetBucketInfoResponse {
+ /// Identifier of the bucket
+ pub id: String,
+ /// Bucket creation date
+ pub created: DateTime,
+ /// List of global aliases for this bucket
+ pub global_aliases: Vec,
+ /// Whether website acces is enabled for this bucket
+ pub website_access: bool,
+ #[serde(default)]
+ /// Website configuration for this bucket
+ pub website_config: Option,
+ /// List of access keys that have permissions granted on this bucket
+ pub keys: Vec,
+ /// Number of objects in this bucket
+ pub objects: i64,
+ /// Total number of bytes used by objects in this bucket
+ pub bytes: i64,
+ /// Number of unfinished uploads in this bucket
+ pub unfinished_uploads: i64,
+ /// Number of unfinished multipart uploads in this bucket
+ pub unfinished_multipart_uploads: i64,
+ /// Number of parts in unfinished multipart uploads in this bucket
+ pub unfinished_multipart_upload_parts: i64,
+ /// Total number of bytes used by unfinished multipart uploads in this bucket
+ pub unfinished_multipart_upload_bytes: i64,
+ /// Quotas that apply to this bucket
+ pub quotas: ApiBucketQuotas,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct GetBucketInfoWebsiteResponse {
+ pub index_document: String,
+ pub error_document: Option,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct GetBucketInfoKey {
+ pub access_key_id: String,
+ pub name: String,
+ pub permissions: ApiBucketKeyPerm,
+ pub bucket_local_aliases: Vec,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct ApiBucketQuotas {
+ pub max_size: Option,
+ pub max_objects: Option,
+}
+
+// ---- CreateBucket ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct CreateBucketRequest {
+ pub global_alias: Option,
+ pub local_alias: Option,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct CreateBucketResponse(pub GetBucketInfoResponse);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct CreateBucketLocalAlias {
+ pub access_key_id: String,
+ pub alias: String,
+ #[serde(default)]
+ pub allow: ApiBucketKeyPerm,
+}
+
+// ---- UpdateBucket ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
+#[into_params(parameter_in = Query)]
+pub struct UpdateBucketRequest {
+ /// ID of the bucket to update
+ pub id: String,
+ #[param(ignore = true)]
+ pub body: UpdateBucketRequestBody,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct UpdateBucketResponse(pub GetBucketInfoResponse);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct UpdateBucketRequestBody {
+ pub website_access: Option,
+ pub quotas: Option,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct UpdateBucketWebsiteAccess {
+ pub enabled: bool,
+ pub index_document: Option,
+ pub error_document: Option,
+}
+
+// ---- DeleteBucket ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
+#[into_params(parameter_in = Query)]
+pub struct DeleteBucketRequest {
+ /// ID of the bucket to delete
+ pub id: String,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize)]
+pub struct DeleteBucketResponse;
+
+// ---- CleanupIncompleteUploads ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct CleanupIncompleteUploadsRequest {
+ pub bucket_id: String,
+ pub older_than_secs: u64,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct CleanupIncompleteUploadsResponse {
+ pub uploads_deleted: u64,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, IntoParams)]
+#[into_params(parameter_in = Query)]
+#[serde(rename_all = "camelCase")]
+pub struct InspectObjectRequest {
+ pub bucket_id: String,
+ pub key: String,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct InspectObjectResponse {
+ /// ID of the bucket containing the inspected object
+ pub bucket_id: String,
+ /// Key of the inspected object
+ pub key: String,
+ /// List of versions currently stored for this object
+ pub versions: Vec,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema, Default)]
+#[serde(rename_all = "camelCase")]
+pub struct InspectObjectVersion {
+ /// Version ID
+ pub uuid: String,
+ /// Creation timestamp of this object version
+ pub timestamp: DateTime,
+ /// Whether this object version was created with SSE-C encryption
+ pub encrypted: bool,
+ /// Whether this object version is still uploading
+ pub uploading: bool,
+ /// Whether this is an aborted upload
+ pub aborted: bool,
+ /// Whether this version is a delete marker (a tombstone indicating that a previous version of
+ /// the object has been deleted)
+ pub delete_marker: bool,
+ /// Whether the object's data is stored inline (for small objects)
+ pub inline: bool,
+ /// Size of the object, in bytes
+ pub size: Option,
+ /// Etag of this object version
+ pub etag: Option,
+ /// Metadata (HTTP headers) associated with this object version
+ #[serde(default, skip_serializing_if = "Vec::is_empty")]
+ pub headers: Vec<(String, String)>,
+ /// List of data blocks for this object version
+ #[serde(default, skip_serializing_if = "Vec::is_empty")]
+ pub blocks: Vec,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct InspectObjectBlock {
+ /// Part number of the part containing this block, for multipart uploads
+ pub part_number: u64,
+ /// Offset of this block within the part
+ pub offset: u64,
+ /// Hash (blake2 sum) of the block's data
+ pub hash: String,
+ /// Length of the blocks's data
+ pub size: u64,
+}
+
+// **********************************************
+// Operations on permissions for keys on buckets
+// **********************************************
+
+// ---- AllowBucketKey ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct AllowBucketKeyRequest(pub BucketKeyPermChangeRequest);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct AllowBucketKeyResponse(pub GetBucketInfoResponse);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct BucketKeyPermChangeRequest {
+ pub bucket_id: String,
+ pub access_key_id: String,
+ pub permissions: ApiBucketKeyPerm,
+}
+
+// ---- DenyBucketKey ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct DenyBucketKeyRequest(pub BucketKeyPermChangeRequest);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct DenyBucketKeyResponse(pub GetBucketInfoResponse);
+
+// **********************************************
+// Operations on bucket aliases
+// **********************************************
+
+// ---- AddBucketAlias ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct AddBucketAliasRequest {
+ pub bucket_id: String,
+ #[serde(flatten)]
+ pub alias: BucketAliasEnum,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct AddBucketAliasResponse(pub GetBucketInfoResponse);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(untagged)]
+pub enum BucketAliasEnum {
+ #[serde(rename_all = "camelCase")]
+ Global { global_alias: String },
+ #[serde(rename_all = "camelCase")]
+ Local {
+ local_alias: String,
+ access_key_id: String,
+ },
+}
+
+// ---- RemoveBucketAlias ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct RemoveBucketAliasRequest {
+ pub bucket_id: String,
+ #[serde(flatten)]
+ pub alias: BucketAliasEnum,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct RemoveBucketAliasResponse(pub GetBucketInfoResponse);
+
+// **********************************************
+// Node operations
+// **********************************************
+
+// ---- GetNodeInfo ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, Default)]
+pub struct LocalGetNodeInfoRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, Default, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct LocalGetNodeInfoResponse {
+ pub node_id: String,
+ pub garage_version: String,
+ pub garage_features: Option>,
+ pub rust_version: String,
+ pub db_engine: String,
+}
+
+// ---- GetNodeStatistics ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, Default)]
+pub struct LocalGetNodeStatisticsRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct LocalGetNodeStatisticsResponse {
+ pub freeform: String,
+}
+
+// ---- CreateMetadataSnapshot ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, Default)]
+pub struct LocalCreateMetadataSnapshotRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct LocalCreateMetadataSnapshotResponse;
+
+// ---- LaunchRepairOperation ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct LocalLaunchRepairOperationRequest {
+ pub repair_type: RepairType,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub enum RepairType {
+ Tables,
+ Blocks,
+ Versions,
+ MultipartUploads,
+ BlockRefs,
+ BlockRc,
+ Rebalance,
+ Scrub(ScrubCommand),
+ Aliases,
+ ClearResyncQueue,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub enum ScrubCommand {
+ Start,
+ Pause,
+ Resume,
+ Cancel,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct LocalLaunchRepairOperationResponse;
+
+// **********************************************
+// Worker operations
+// **********************************************
+
+// ---- ListWorkers ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, Default, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct LocalListWorkersRequest {
+ #[serde(default)]
+ pub busy_only: bool,
+ #[serde(default)]
+ pub error_only: bool,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct LocalListWorkersResponse(pub Vec);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct WorkerInfoResp {
+ pub id: u64,
+ pub name: String,
+ pub state: WorkerStateResp,
+ pub errors: u64,
+ pub consecutive_errors: u64,
+ pub last_error: Option,
+ pub tranquility: Option,
+ pub progress: Option,
+ pub queue_length: Option,
+ pub persistent_errors: Option,
+ pub freeform: Vec,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub enum WorkerStateResp {
+ Busy,
+ #[serde(rename_all = "camelCase")]
+ Throttled {
+ duration_secs: f32,
+ },
+ Idle,
+ Done,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct WorkerLastError {
+ pub message: String,
+ pub secs_ago: u64,
+}
+
+// ---- GetWorkerInfo ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct LocalGetWorkerInfoRequest {
+ pub id: u64,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct LocalGetWorkerInfoResponse(pub WorkerInfoResp);
+
+// ---- GetWorkerVariable ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct LocalGetWorkerVariableRequest {
+ pub variable: Option,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct LocalGetWorkerVariableResponse(pub HashMap);
+
+// ---- SetWorkerVariable ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct LocalSetWorkerVariableRequest {
+ pub variable: String,
+ pub value: String,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct LocalSetWorkerVariableResponse {
+ pub variable: String,
+ pub value: String,
+}
+
+// **********************************************
+// Block operations
+// **********************************************
+
+// ---- ListBlockErrors ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, Default)]
+pub struct LocalListBlockErrorsRequest;
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+pub struct LocalListBlockErrorsResponse(pub Vec);
+
+#[derive(Serialize, Deserialize, Clone, Debug, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct BlockError {
+ pub block_hash: String,
+ pub refcount: u64,
+ pub error_count: u64,
+ pub last_try_secs_ago: u64,
+ pub next_try_in_secs: u64,
+}
+
+// ---- GetBlockInfo ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct LocalGetBlockInfoRequest {
+ pub block_hash: String,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct LocalGetBlockInfoResponse {
+ pub block_hash: String,
+ pub refcount: u64,
+ pub versions: Vec,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct BlockVersion {
+ pub version_id: String,
+ pub ref_deleted: bool,
+ pub version_deleted: bool,
+ pub garbage_collected: bool,
+ pub backlink: Option,
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub enum BlockVersionBacklink {
+ #[serde(rename_all = "camelCase")]
+ Object { bucket_id: String, key: String },
+ #[serde(rename_all = "camelCase")]
+ Upload {
+ upload_id: String,
+ upload_deleted: bool,
+ upload_garbage_collected: bool,
+ bucket_id: Option,
+ key: Option,
+ },
+}
+
+// ---- RetryBlockResync ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(untagged)]
+pub enum LocalRetryBlockResyncRequest {
+ #[serde(rename_all = "camelCase")]
+ All { all: bool },
+ #[serde(rename_all = "camelCase")]
+ Blocks { block_hashes: Vec },
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct LocalRetryBlockResyncResponse {
+ pub count: u64,
+}
+
+// ---- PurgeBlocks ----
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct LocalPurgeBlocksRequest(pub Vec);
+
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
+#[serde(rename_all = "camelCase")]
+pub struct LocalPurgeBlocksResponse {
+ pub blocks_purged: u64,
+ pub objects_deleted: u64,
+ pub uploads_deleted: u64,
+ pub versions_deleted: u64,
+ pub block_refs_purged: u64,
+}
diff --git a/src/api/admin/api_server.rs b/src/api/admin/api_server.rs
index 6f0c474f..19a88024 100644
--- a/src/api/admin/api_server.rs
+++ b/src/api/admin/api_server.rs
@@ -1,333 +1,237 @@
-use std::collections::HashMap;
+use std::borrow::Cow;
use std::sync::Arc;
-use argon2::password_hash::PasswordHash;
-
-use http::header::{ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_ALLOW_ORIGIN, ALLOW};
-use hyper::{body::Incoming as IncomingBody, Request, Response, StatusCode};
+use http::header::{HeaderValue, ACCESS_CONTROL_ALLOW_ORIGIN, AUTHORIZATION};
+use hyper::{body::Incoming as IncomingBody, Request, Response};
+use serde::{Deserialize, Serialize};
use tokio::sync::watch;
use opentelemetry::trace::SpanRef;
#[cfg(feature = "metrics")]
use opentelemetry_prometheus::PrometheusExporter;
-#[cfg(feature = "metrics")]
-use prometheus::{Encoder, TextEncoder};
use garage_model::garage::Garage;
-use garage_rpc::system::ClusterHealthStatus;
+use garage_rpc::{Endpoint as RpcEndpoint, *};
+use garage_table::EmptyKey;
+use garage_util::background::BackgroundRunner;
+use garage_util::data::Uuid;
use garage_util::error::Error as GarageError;
use garage_util::socket_address::UnixOrTCPSocketAddress;
+use garage_util::time::now_msec;
use garage_api_common::generic_server::*;
use garage_api_common::helpers::*;
-use crate::bucket::*;
-use crate::cluster::*;
+use crate::api::*;
use crate::error::*;
-use crate::key::*;
use crate::router_v0;
-use crate::router_v1::{Authorization, Endpoint};
+use crate::router_v1;
+use crate::Authorization;
+use crate::RequestHandler;
+
+// ---- FOR RPC ----
+
+pub const ADMIN_RPC_PATH: &str = "garage_api/admin/rpc.rs/Rpc";
+
+#[derive(Debug, Serialize, Deserialize)]
+pub enum AdminRpc {
+ Proxy(AdminApiRequest),
+ Internal(LocalAdminApiRequest),
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+pub enum AdminRpcResponse {
+ ProxyApiOkResponse(TaggedAdminApiResponse),
+ InternalApiOkResponse(LocalAdminApiResponse),
+ ApiErrorResponse {
+ http_code: u16,
+ error_code: String,
+ message: String,
+ },
+}
+
+impl Rpc for AdminRpc {
+ type Response = Result;
+}
+
+impl EndpointHandler for AdminApiServer {
+ async fn handle(
+ self: &Arc,
+ message: &AdminRpc,
+ _from: NodeID,
+ ) -> Result {
+ match message {
+ AdminRpc::Proxy(req) => {
+ info!("Proxied admin API request: {}", req.name());
+ let res = req.clone().handle(&self.garage, &self).await;
+ match res {
+ Ok(res) => Ok(AdminRpcResponse::ProxyApiOkResponse(res.tagged())),
+ Err(e) => Ok(AdminRpcResponse::ApiErrorResponse {
+ http_code: e.http_status_code().as_u16(),
+ error_code: e.code().to_string(),
+ message: e.to_string(),
+ }),
+ }
+ }
+ AdminRpc::Internal(req) => {
+ info!("Internal admin API request: {}", req.name());
+ let res = req.clone().handle(&self.garage, &self).await;
+ match res {
+ Ok(res) => Ok(AdminRpcResponse::InternalApiOkResponse(res)),
+ Err(e) => Ok(AdminRpcResponse::ApiErrorResponse {
+ http_code: e.http_status_code().as_u16(),
+ error_code: e.code().to_string(),
+ message: e.to_string(),
+ }),
+ }
+ }
+ }
+ }
+}
+
+// ---- FOR HTTP ----
pub type ResBody = BoxBody;
pub struct AdminApiServer {
garage: Arc,
#[cfg(feature = "metrics")]
- exporter: PrometheusExporter,
+ pub(crate) exporter: PrometheusExporter,
metrics_token: Option,
+ metrics_require_token: bool,
admin_token: Option,
+ pub(crate) background: Arc,
+ pub(crate) endpoint: Arc>,
+}
+
+pub enum HttpEndpoint {
+ Old(router_v1::Endpoint),
+ New(String),
}
impl AdminApiServer {
pub fn new(
garage: Arc,
+ background: Arc,
#[cfg(feature = "metrics")] exporter: PrometheusExporter,
- ) -> Self {
+ ) -> Arc {
let cfg = &garage.config.admin;
let metrics_token = cfg.metrics_token.as_deref().map(hash_bearer_token);
let admin_token = cfg.admin_token.as_deref().map(hash_bearer_token);
- Self {
+ let metrics_require_token = cfg.metrics_require_token;
+
+ let endpoint = garage.system.netapp.endpoint(ADMIN_RPC_PATH.into());
+ let admin = Arc::new(Self {
garage,
#[cfg(feature = "metrics")]
exporter,
metrics_token,
+ metrics_require_token,
admin_token,
- }
+ background,
+ endpoint,
+ });
+ admin.endpoint.set_handler(admin.clone());
+ admin
}
pub async fn run(
- self,
+ self: Arc,
bind_addr: UnixOrTCPSocketAddress,
must_exit: watch::Receiver,
) -> Result<(), GarageError> {
let region = self.garage.config.s3_api.s3_region.clone();
- ApiServer::new(region, self)
+ ApiServer::new(region, ArcAdminApiServer(self))
.run_server(bind_addr, Some(0o220), must_exit)
.await
}
- fn handle_options(&self, _req: &Request) -> Result, Error> {
- Ok(Response::builder()
- .status(StatusCode::NO_CONTENT)
- .header(ALLOW, "OPTIONS, GET, POST")
- .header(ACCESS_CONTROL_ALLOW_METHODS, "OPTIONS, GET, POST")
- .header(ACCESS_CONTROL_ALLOW_ORIGIN, "*")
- .body(empty_body())?)
- }
-
- async fn handle_check_domain(
+ async fn handle_http_api(
&self,
req: Request,
+ endpoint: HttpEndpoint,
) -> Result, Error> {
- let query_params: HashMap = req
- .uri()
- .query()
- .map(|v| {
- url::form_urlencoded::parse(v.as_bytes())
- .into_owned()
- .collect()
- })
- .unwrap_or_else(HashMap::new);
+ let auth_header = req.headers().get(AUTHORIZATION).cloned();
- let has_domain_key = query_params.contains_key("domain");
-
- if !has_domain_key {
- return Err(Error::bad_request("No domain query string found"));
- }
-
- let domain = query_params
- .get("domain")
- .ok_or_internal_error("Could not parse domain query string")?;
-
- if self.check_domain(domain).await? {
- Ok(Response::builder()
- .status(StatusCode::OK)
- .body(string_body(format!(
- "Domain '{domain}' is managed by Garage"
- )))?)
- } else {
- Err(Error::bad_request(format!(
- "Domain '{domain}' is not managed by Garage"
- )))
- }
- }
-
- async fn check_domain(&self, domain: &str) -> Result {
- // Resolve bucket from domain name, inferring if the website must be activated for the
- // domain to be valid.
- let (bucket_name, must_check_website) = if let Some(bname) = self
- .garage
- .config
- .s3_api
- .root_domain
- .as_ref()
- .and_then(|rd| host_to_bucket(domain, rd))
- {
- (bname.to_string(), false)
- } else if let Some(bname) = self
- .garage
- .config
- .s3_web
- .as_ref()
- .and_then(|sw| host_to_bucket(domain, sw.root_domain.as_str()))
- {
- (bname.to_string(), true)
- } else {
- (domain.to_string(), true)
+ let request = match endpoint {
+ HttpEndpoint::Old(endpoint_v1) => AdminApiRequest::from_v1(endpoint_v1, req).await?,
+ HttpEndpoint::New(_) => AdminApiRequest::from_request(req).await?,
};
- let bucket_id = match self
- .garage
- .bucket_helper()
- .resolve_global_bucket_name(&bucket_name)
- .await?
- {
- Some(bucket_id) => bucket_id,
- None => return Ok(false),
- };
-
- if !must_check_website {
- return Ok(true);
- }
-
- let bucket = self
- .garage
- .bucket_helper()
- .get_existing_bucket(bucket_id)
- .await?;
-
- let bucket_state = bucket.state.as_option().unwrap();
- let bucket_website_config = bucket_state.website_config.get();
-
- match bucket_website_config {
- Some(_v) => Ok(true),
- None => Ok(false),
- }
- }
-
- fn handle_health(&self) -> Result, Error> {
- let health = self.garage.system.health();
-
- let (status, status_str) = match health.status {
- ClusterHealthStatus::Healthy => (StatusCode::OK, "Garage is fully operational"),
- ClusterHealthStatus::Degraded => (
- StatusCode::OK,
- "Garage is operational but some storage nodes are unavailable",
- ),
- ClusterHealthStatus::Unavailable => (
- StatusCode::SERVICE_UNAVAILABLE,
- "Quorum is not available for some/all partitions, reads and writes will fail",
+ let (global_token_hash, token_required) = match request.authorization_type() {
+ Authorization::None => (None, false),
+ Authorization::MetricsToken => (
+ self.metrics_token.as_deref(),
+ self.metrics_token.is_some() || self.metrics_require_token,
),
+ Authorization::AdminToken => (self.admin_token.as_deref(), true),
};
- let status_str = format!(
- "{}\nConsult the full health check API endpoint at /v1/health for more details\n",
- status_str
- );
- Ok(Response::builder()
- .status(status)
- .header(http::header::CONTENT_TYPE, "text/plain")
- .body(string_body(status_str))?)
- }
-
- fn handle_metrics(&self) -> Result, Error> {
- #[cfg(feature = "metrics")]
- {
- use opentelemetry::trace::Tracer;
-
- let mut buffer = vec![];
- let encoder = TextEncoder::new();
-
- let tracer = opentelemetry::global::tracer("garage");
- let metric_families = tracer.in_span("admin/gather_metrics", |_| {
- self.exporter.registry().gather()
- });
-
- encoder
- .encode(&metric_families, &mut buffer)
- .ok_or_internal_error("Could not serialize metrics")?;
-
- Ok(Response::builder()
- .status(StatusCode::OK)
- .header(http::header::CONTENT_TYPE, encoder.format_type())
- .body(bytes_body(buffer.into()))?)
+ if token_required {
+ verify_authorization(&self.garage, global_token_hash, auth_header, request.name())?;
+ }
+
+ match request {
+ AdminApiRequest::Options(req) => req.handle(&self.garage, &self).await,
+ AdminApiRequest::CheckDomain(req) => req.handle(&self.garage, &self).await,
+ AdminApiRequest::Health(req) => req.handle(&self.garage, &self).await,
+ AdminApiRequest::Metrics(req) => req.handle(&self.garage, &self).await,
+ req => {
+ let res = req.handle(&self.garage, &self).await?;
+ let mut res = json_ok_response(&res)?;
+ res.headers_mut()
+ .insert(ACCESS_CONTROL_ALLOW_ORIGIN, HeaderValue::from_static("*"));
+ Ok(res)
+ }
}
- #[cfg(not(feature = "metrics"))]
- Err(Error::bad_request(
- "Garage was built without the metrics feature".to_string(),
- ))
}
}
-impl ApiHandler for AdminApiServer {
+struct ArcAdminApiServer(Arc);
+
+impl ApiHandler for ArcAdminApiServer {
const API_NAME: &'static str = "admin";
const API_NAME_DISPLAY: &'static str = "Admin";
- type Endpoint = Endpoint;
+ type Endpoint = HttpEndpoint;
type Error = Error;
- fn parse_endpoint(&self, req: &Request) -> Result {
+ fn parse_endpoint(&self, req: &Request) -> Result {
if req.uri().path().starts_with("/v0/") {
let endpoint_v0 = router_v0::Endpoint::from_request(req)?;
- Endpoint::from_v0(endpoint_v0)
+ let endpoint_v1 = router_v1::Endpoint::from_v0(endpoint_v0)?;
+ Ok(HttpEndpoint::Old(endpoint_v1))
+ } else if req.uri().path().starts_with("/v1/") {
+ let endpoint_v1 = router_v1::Endpoint::from_request(req)?;
+ Ok(HttpEndpoint::Old(endpoint_v1))
} else {
- Endpoint::from_request(req)
+ Ok(HttpEndpoint::New(req.uri().path().to_string()))
}
}
async fn handle(
&self,
req: Request,
- endpoint: Endpoint,
+ endpoint: HttpEndpoint,
) -> Result, Error> {
- let required_auth_hash =
- match endpoint.authorization_type() {
- Authorization::None => None,
- Authorization::MetricsToken => self.metrics_token.as_deref(),
- Authorization::AdminToken => match self.admin_token.as_deref() {
- None => return Err(Error::forbidden(
- "Admin token isn't configured, admin API access is disabled for security.",
- )),
- Some(t) => Some(t),
- },
- };
+ self.0.handle_http_api(req, endpoint).await
+ }
- if let Some(password_hash) = required_auth_hash {
- match req.headers().get("Authorization") {
- None => return Err(Error::forbidden("Authorization token must be provided")),
- Some(authorization) => {
- verify_bearer_token(&authorization, password_hash)?;
- }
- }
- }
-
- match endpoint {
- Endpoint::Options => self.handle_options(&req),
- Endpoint::CheckDomain => self.handle_check_domain(req).await,
- Endpoint::Health => self.handle_health(),
- Endpoint::Metrics => self.handle_metrics(),
- Endpoint::GetClusterStatus => handle_get_cluster_status(&self.garage).await,
- Endpoint::GetClusterHealth => handle_get_cluster_health(&self.garage).await,
- Endpoint::ConnectClusterNodes => handle_connect_cluster_nodes(&self.garage, req).await,
- // Layout
- Endpoint::GetClusterLayout => handle_get_cluster_layout(&self.garage).await,
- Endpoint::UpdateClusterLayout => handle_update_cluster_layout(&self.garage, req).await,
- Endpoint::ApplyClusterLayout => handle_apply_cluster_layout(&self.garage, req).await,
- Endpoint::RevertClusterLayout => handle_revert_cluster_layout(&self.garage).await,
- // Keys
- Endpoint::ListKeys => handle_list_keys(&self.garage).await,
- Endpoint::GetKeyInfo {
- id,
- search,
- show_secret_key,
- } => {
- let show_secret_key = show_secret_key.map(|x| x == "true").unwrap_or(false);
- handle_get_key_info(&self.garage, id, search, show_secret_key).await
- }
- Endpoint::CreateKey => handle_create_key(&self.garage, req).await,
- Endpoint::ImportKey => handle_import_key(&self.garage, req).await,
- Endpoint::UpdateKey { id } => handle_update_key(&self.garage, id, req).await,
- Endpoint::DeleteKey { id } => handle_delete_key(&self.garage, id).await,
- // Buckets
- Endpoint::ListBuckets => handle_list_buckets(&self.garage).await,
- Endpoint::GetBucketInfo { id, global_alias } => {
- handle_get_bucket_info(&self.garage, id, global_alias).await
- }
- Endpoint::CreateBucket => handle_create_bucket(&self.garage, req).await,
- Endpoint::DeleteBucket { id } => handle_delete_bucket(&self.garage, id).await,
- Endpoint::UpdateBucket { id } => handle_update_bucket(&self.garage, id, req).await,
- // Bucket-key permissions
- Endpoint::BucketAllowKey => {
- handle_bucket_change_key_perm(&self.garage, req, true).await
- }
- Endpoint::BucketDenyKey => {
- handle_bucket_change_key_perm(&self.garage, req, false).await
- }
- // Bucket aliasing
- Endpoint::GlobalAliasBucket { id, alias } => {
- handle_global_alias_bucket(&self.garage, id, alias).await
- }
- Endpoint::GlobalUnaliasBucket { id, alias } => {
- handle_global_unalias_bucket(&self.garage, id, alias).await
- }
- Endpoint::LocalAliasBucket {
- id,
- access_key_id,
- alias,
- } => handle_local_alias_bucket(&self.garage, id, access_key_id, alias).await,
- Endpoint::LocalUnaliasBucket {
- id,
- access_key_id,
- alias,
- } => handle_local_unalias_bucket(&self.garage, id, access_key_id, alias).await,
- }
+ fn key_id_from_request(&self, req: &Request) -> Option {
+ let auth_header = req.headers().get(AUTHORIZATION)?;
+ let token = parse_authorization(auth_header).ok()?;
+ let key_id = token.split_once('.')?.0;
+ Some(key_id.to_string())
}
}
-impl ApiEndpoint for Endpoint {
- fn name(&self) -> &'static str {
- Endpoint::name(self)
+impl ApiEndpoint for HttpEndpoint {
+ fn name(&self) -> Cow<'static, str> {
+ match self {
+ Self::Old(endpoint_v1) => Cow::Borrowed(endpoint_v1.name()),
+ Self::New(path) => Cow::Owned(path.clone()),
+ }
}
fn add_span_attributes(&self, _span: SpanRef<'_>) {}
@@ -347,20 +251,91 @@ fn hash_bearer_token(token: &str) -> String {
.to_string()
}
-fn verify_bearer_token(token: &hyper::http::HeaderValue, password_hash: &str) -> Result<(), Error> {
- use argon2::{password_hash::PasswordVerifier, Argon2};
-
- let parsed_hash = PasswordHash::new(&password_hash).unwrap();
-
- token
+fn parse_authorization(auth_header: &hyper::http::HeaderValue) -> Result<&str, Error> {
+ let token = auth_header
.to_str()?
.strip_prefix("Bearer ")
- .and_then(|token| {
- Argon2::default()
- .verify_password(token.trim().as_bytes(), &parsed_hash)
- .ok()
- })
- .ok_or_else(|| Error::forbidden("Invalid authorization token"))?;
+ .ok_or_else(|| Error::forbidden("Invalid Authorization header"))?
+ .trim();
+ Ok(token)
+}
+
+fn verify_authorization(
+ garage: &Garage,
+ global_token_hash: Option<&str>,
+ auth_header: Option,
+ endpoint_name: &str,
+) -> Result<(), Error> {
+ use argon2::{password_hash::PasswordHash, password_hash::PasswordVerifier, Argon2};
+
+ let invalid_msg = "Invalid bearer token";
+
+ let token = match &auth_header {
+ None => {
+ return Err(Error::forbidden(
+ "Bearer token must be provided in Authorization header",
+ ))
+ }
+ Some(authorization) => parse_authorization(authorization)?,
+ };
+
+ let token_hash_string = if let Some((prefix, _)) = token.split_once('.') {
+ garage
+ .admin_token_table
+ .get_local(&EmptyKey, &prefix.to_string())?
+ .and_then(|k| k.state.into_option())
+ .filter(|p| !p.is_expired(now_msec()))
+ // GetCurrentAdminTokenInfo endpoint must be accessible even if it is not in the token scopes
+ .filter(|p| p.has_scope(endpoint_name) || endpoint_name == "GetCurrentAdminTokenInfo")
+ .ok_or_else(|| Error::forbidden(invalid_msg))?
+ .token_hash
+ } else {
+ global_token_hash
+ .ok_or_else(|| Error::forbidden(invalid_msg))?
+ .to_string()
+ };
+
+ let token_hash =
+ PasswordHash::new(&token_hash_string).ok_or_internal_error("Could not parse token hash")?;
+
+ Argon2::default()
+ .verify_password(token.as_bytes(), &token_hash)
+ .map_err(|_| Error::forbidden(invalid_msg))?;
Ok(())
}
+
+pub(crate) fn find_matching_nodes(garage: &Garage, spec: &str) -> Result, Error> {
+ if spec == "self" {
+ Ok(vec![garage.system.id])
+ } else {
+ // Collect all nodes currently up and/or in cluster layout
+ let mut res = vec![];
+ if let Ok(all_nodes) = garage.system.cluster_layout().all_nodes() {
+ res = all_nodes.to_vec();
+ }
+ for node in garage.system.get_known_nodes() {
+ if node.is_up && !res.contains(&node.id) {
+ res.push(node.id);
+ }
+ }
+
+ if spec == "*" {
+ // match all nodes
+ Ok(res)
+ } else {
+ // filter nodes that match spec
+ res.retain(|node| hex::encode(node).starts_with(spec));
+ if res.is_empty() {
+ Err(Error::bad_request(format!("No nodes matching {}", spec)))
+ } else if res.len() > 1 {
+ Err(Error::bad_request(format!(
+ "Multiple nodes matching {}: {:?}",
+ spec, res
+ )))
+ } else {
+ Ok(res)
+ }
+ }
+ }
+}
diff --git a/src/api/admin/block.rs b/src/api/admin/block.rs
new file mode 100644
index 00000000..586f8554
--- /dev/null
+++ b/src/api/admin/block.rs
@@ -0,0 +1,284 @@
+use std::sync::Arc;
+
+use garage_util::data::*;
+use garage_util::error::Error as GarageError;
+use garage_util::time::now_msec;
+
+use garage_table::EmptyKey;
+
+use garage_model::garage::Garage;
+use garage_model::s3::object_table::*;
+use garage_model::s3::version_table::*;
+
+use garage_api_common::common_error::CommonErrorDerivative;
+
+use crate::api::*;
+use crate::error::*;
+use crate::{Admin, RequestHandler};
+
+impl RequestHandler for LocalListBlockErrorsRequest {
+ type Response = LocalListBlockErrorsResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let errors = garage.block_manager.list_resync_errors()?;
+ let now = now_msec();
+ let errors = errors
+ .into_iter()
+ .map(|e| BlockError {
+ block_hash: hex::encode(&e.hash),
+ refcount: e.refcount,
+ error_count: e.error_count,
+ last_try_secs_ago: now.saturating_sub(e.last_try) / 1000,
+ next_try_in_secs: e.next_try.saturating_sub(now) / 1000,
+ })
+ .collect();
+ Ok(LocalListBlockErrorsResponse(errors))
+ }
+}
+
+impl RequestHandler for LocalGetBlockInfoRequest {
+ type Response = LocalGetBlockInfoResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let hash = find_block_hash_by_prefix(garage, &self.block_hash)?;
+ let refcount = garage.block_manager.get_block_rc(&hash)?;
+ let block_refs = garage
+ .block_ref_table
+ .get_range(&hash, None, None, 10000, Default::default())
+ .await?;
+ let mut versions = vec![];
+ for br in block_refs {
+ if let Some(v) = garage.version_table.get(&br.version, &EmptyKey).await? {
+ let bl = match &v.backlink {
+ VersionBacklink::MultipartUpload { upload_id } => {
+ if let Some(u) = garage.mpu_table.get(upload_id, &EmptyKey).await? {
+ BlockVersionBacklink::Upload {
+ upload_id: hex::encode(&upload_id),
+ upload_deleted: u.deleted.get(),
+ upload_garbage_collected: false,
+ bucket_id: Some(hex::encode(&u.bucket_id)),
+ key: Some(u.key.to_string()),
+ }
+ } else {
+ BlockVersionBacklink::Upload {
+ upload_id: hex::encode(&upload_id),
+ upload_deleted: true,
+ upload_garbage_collected: true,
+ bucket_id: None,
+ key: None,
+ }
+ }
+ }
+ VersionBacklink::Object { bucket_id, key } => BlockVersionBacklink::Object {
+ bucket_id: hex::encode(&bucket_id),
+ key: key.to_string(),
+ },
+ };
+ versions.push(BlockVersion {
+ version_id: hex::encode(&br.version),
+ ref_deleted: br.deleted.get(),
+ version_deleted: v.deleted.get(),
+ garbage_collected: false,
+ backlink: Some(bl),
+ });
+ } else {
+ versions.push(BlockVersion {
+ version_id: hex::encode(&br.version),
+ ref_deleted: br.deleted.get(),
+ version_deleted: true,
+ garbage_collected: true,
+ backlink: None,
+ });
+ }
+ }
+ Ok(LocalGetBlockInfoResponse {
+ block_hash: hex::encode(&hash),
+ refcount,
+ versions,
+ })
+ }
+}
+
+impl RequestHandler for LocalRetryBlockResyncRequest {
+ type Response = LocalRetryBlockResyncResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ match self {
+ Self::All { all: true } => {
+ let blocks = garage.block_manager.list_resync_errors()?;
+ for b in blocks.iter() {
+ garage.block_manager.resync.clear_backoff(&b.hash)?;
+ }
+ Ok(LocalRetryBlockResyncResponse {
+ count: blocks.len() as u64,
+ })
+ }
+ Self::All { all: false } => Err(Error::bad_request("nonsense")),
+ Self::Blocks { block_hashes } => {
+ for hash in block_hashes.iter() {
+ let hash = hex::decode(hash).ok_or_bad_request("invalid hash")?;
+ let hash = Hash::try_from(&hash).ok_or_bad_request("invalid hash")?;
+ garage.block_manager.resync.clear_backoff(&hash)?;
+ }
+ Ok(LocalRetryBlockResyncResponse {
+ count: block_hashes.len() as u64,
+ })
+ }
+ }
+ }
+}
+
+impl RequestHandler for LocalPurgeBlocksRequest {
+ type Response = LocalPurgeBlocksResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let mut obj_dels = 0;
+ let mut mpu_dels = 0;
+ let mut ver_dels = 0;
+ let mut br_dels = 0;
+
+ for hash in self.0.iter() {
+ let hash = hex::decode(hash).ok_or_bad_request("invalid hash")?;
+ let hash = Hash::try_from(&hash).ok_or_bad_request("invalid hash")?;
+ let block_refs = garage
+ .block_ref_table
+ .get_range(&hash, None, None, 10000, Default::default())
+ .await?;
+
+ for br in block_refs {
+ if let Some(version) = garage.version_table.get(&br.version, &EmptyKey).await? {
+ handle_block_purge_version_backlink(
+ garage,
+ &version,
+ &mut obj_dels,
+ &mut mpu_dels,
+ )
+ .await?;
+
+ if !version.deleted.get() {
+ let deleted_version = Version::new(version.uuid, version.backlink, true);
+ garage.version_table.insert(&deleted_version).await?;
+ ver_dels += 1;
+ }
+ }
+ if !br.deleted.get() {
+ let mut br = br;
+ br.deleted.set();
+ garage.block_ref_table.insert(&br).await?;
+ br_dels += 1;
+ }
+ }
+ }
+
+ Ok(LocalPurgeBlocksResponse {
+ blocks_purged: self.0.len() as u64,
+ block_refs_purged: br_dels,
+ versions_deleted: ver_dels,
+ objects_deleted: obj_dels,
+ uploads_deleted: mpu_dels,
+ })
+ }
+}
+
+fn find_block_hash_by_prefix(garage: &Arc, prefix: &str) -> Result {
+ if prefix.len() < 4 {
+ return Err(Error::bad_request(
+ "Please specify at least 4 characters of the block hash",
+ ));
+ }
+
+ let prefix_bin = hex::decode(&prefix[..prefix.len() & !1]).ok_or_bad_request("invalid hash")?;
+
+ let iter = garage
+ .block_ref_table
+ .data
+ .store
+ .range(&prefix_bin[..]..)
+ .map_err(GarageError::from)?;
+ let mut found = None;
+ for item in iter {
+ let (k, _v) = item.map_err(GarageError::from)?;
+ let hash = Hash::try_from(&k[..32]).unwrap();
+ if &hash.as_slice()[..prefix_bin.len()] != prefix_bin {
+ break;
+ }
+ if hex::encode(hash.as_slice()).starts_with(prefix) {
+ match &found {
+ Some(x) if *x == hash => (),
+ Some(_) => {
+ return Err(Error::bad_request(format!(
+ "Several blocks match prefix `{}`",
+ prefix
+ )));
+ }
+ None => {
+ found = Some(hash);
+ }
+ }
+ }
+ }
+
+ found.ok_or_else(|| Error::NoSuchBlock(prefix.to_string()))
+}
+
+async fn handle_block_purge_version_backlink(
+ garage: &Arc,
+ version: &Version,
+ obj_dels: &mut u64,
+ mpu_dels: &mut u64,
+) -> Result<(), Error> {
+ let (bucket_id, key, ov_id) = match &version.backlink {
+ VersionBacklink::Object { bucket_id, key } => (*bucket_id, key.clone(), version.uuid),
+ VersionBacklink::MultipartUpload { upload_id } => {
+ if let Some(mut mpu) = garage.mpu_table.get(upload_id, &EmptyKey).await? {
+ if !mpu.deleted.get() {
+ mpu.parts.clear();
+ mpu.deleted.set();
+ garage.mpu_table.insert(&mpu).await?;
+ *mpu_dels += 1;
+ }
+ (mpu.bucket_id, mpu.key.clone(), *upload_id)
+ } else {
+ return Ok(());
+ }
+ }
+ };
+
+ if let Some(object) = garage.object_table.get(&bucket_id, &key).await? {
+ let ov = object.versions().iter().rev().find(|v| v.is_complete());
+ if let Some(ov) = ov {
+ if ov.uuid == ov_id {
+ let del_uuid = gen_uuid();
+ let deleted_object = Object::new(
+ bucket_id,
+ key,
+ vec![ObjectVersion {
+ uuid: del_uuid,
+ timestamp: ov.timestamp + 1,
+ state: ObjectVersionState::Complete(ObjectVersionData::DeleteMarker),
+ }],
+ );
+ garage.object_table.insert(&deleted_object).await?;
+ *obj_dels += 1;
+ }
+ }
+ }
+
+ Ok(())
+}
diff --git a/src/api/admin/bucket.rs b/src/api/admin/bucket.rs
index 207693b6..77541e4f 100644
--- a/src/api/admin/bucket.rs
+++ b/src/api/admin/bucket.rs
@@ -1,8 +1,8 @@
use std::collections::HashMap;
use std::sync::Arc;
+use std::time::Duration;
-use hyper::{body::Incoming as IncomingBody, Request, Response, StatusCode};
-use serde::{Deserialize, Serialize};
+use chrono::DateTime;
use garage_util::crdt::*;
use garage_util::data::*;
@@ -18,102 +18,603 @@ use garage_model::s3::mpu_table;
use garage_model::s3::object_table::*;
use garage_api_common::common_error::CommonError;
-use garage_api_common::helpers::*;
-use crate::api_server::ResBody;
+use crate::api::*;
use crate::error::*;
-use crate::key::ApiBucketKeyPerm;
+use crate::{Admin, RequestHandler};
-pub async fn handle_list_buckets(garage: &Arc) -> Result, Error> {
- let buckets = garage
- .bucket_table
- .get_range(
- &EmptyKey,
- None,
- Some(DeletedFilter::NotDeleted),
- 10000,
- EnumerationOrder::Forward,
- )
+impl RequestHandler for ListBucketsRequest {
+ type Response = ListBucketsResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let buckets = garage
+ .bucket_table
+ .get_range(
+ &EmptyKey,
+ None,
+ Some(DeletedFilter::NotDeleted),
+ 10000,
+ EnumerationOrder::Forward,
+ )
+ .await?;
+
+ let res = buckets
+ .into_iter()
+ .map(|b| {
+ let state = b.state.as_option().unwrap();
+ ListBucketsResponseItem {
+ id: hex::encode(b.id),
+ created: DateTime::from_timestamp_millis(state.creation_date as i64)
+ .expect("invalid timestamp stored in db"),
+ global_aliases: state
+ .aliases
+ .items()
+ .iter()
+ .filter(|(_, _, a)| *a)
+ .map(|(n, _, _)| n.to_string())
+ .collect::>(),
+ local_aliases: state
+ .local_aliases
+ .items()
+ .iter()
+ .filter(|(_, _, a)| *a)
+ .map(|((k, n), _, _)| BucketLocalAlias {
+ access_key_id: k.to_string(),
+ alias: n.to_string(),
+ })
+ .collect::>(),
+ }
+ })
+ .collect::>();
+
+ Ok(ListBucketsResponse(res))
+ }
+}
+
+impl RequestHandler for GetBucketInfoRequest {
+ type Response = GetBucketInfoResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let bucket_id = match (self.id, self.global_alias, self.search) {
+ (Some(id), None, None) => parse_bucket_id(&id)?,
+ (None, Some(ga), None) => garage
+ .bucket_alias_table
+ .get(&EmptyKey, &ga)
+ .await?
+ .and_then(|x| *x.state.get())
+ .ok_or_else(|| HelperError::NoSuchBucket(ga.to_string()))?,
+ (None, None, Some(search)) => {
+ let helper = garage.bucket_helper();
+ if let Some(bucket) = helper.resolve_global_bucket(&search).await? {
+ bucket.id
+ } else {
+ let hexdec = if search.len() >= 2 {
+ search
+ .get(..search.len() & !1)
+ .and_then(|x| hex::decode(x).ok())
+ } else {
+ None
+ };
+ let hex = hexdec
+ .ok_or_else(|| Error::Common(CommonError::NoSuchBucket(search.clone())))?;
+
+ let mut start = [0u8; 32];
+ start
+ .as_mut_slice()
+ .get_mut(..hex.len())
+ .ok_or_bad_request("invalid length")?
+ .copy_from_slice(&hex);
+ let mut candidates = garage
+ .bucket_table
+ .get_range(
+ &EmptyKey,
+ Some(start.into()),
+ Some(DeletedFilter::NotDeleted),
+ 10,
+ EnumerationOrder::Forward,
+ )
+ .await?
+ .into_iter()
+ .collect::>();
+ candidates.retain(|x| hex::encode(x.id).starts_with(&search));
+ if candidates.is_empty() {
+ return Err(Error::Common(CommonError::NoSuchBucket(search.clone())));
+ } else if candidates.len() == 1 {
+ candidates.into_iter().next().unwrap().id
+ } else {
+ return Err(Error::bad_request(format!(
+ "Several matching buckets: {}",
+ search
+ )));
+ }
+ }
+ }
+ _ => {
+ return Err(Error::bad_request(
+ "Either id, globalAlias or search must be provided (but not several of them)",
+ ));
+ }
+ };
+
+ bucket_info_results(garage, bucket_id).await
+ }
+}
+
+impl RequestHandler for CreateBucketRequest {
+ type Response = CreateBucketResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let helper = garage.locked_helper().await;
+
+ if let Some(ga) = &self.global_alias {
+ if !is_valid_bucket_name(ga, garage.config.allow_punycode) {
+ return Err(Error::bad_request(format!(
+ "{}: {}",
+ ga, INVALID_BUCKET_NAME_MESSAGE
+ )));
+ }
+
+ if let Some(alias) = garage.bucket_alias_table.get(&EmptyKey, ga).await? {
+ if alias.state.get().is_some() {
+ return Err(CommonError::BucketAlreadyExists.into());
+ }
+ }
+ }
+
+ if let Some(la) = &self.local_alias {
+ if !is_valid_bucket_name(&la.alias, garage.config.allow_punycode) {
+ return Err(Error::bad_request(format!(
+ "{}: {}",
+ la.alias, INVALID_BUCKET_NAME_MESSAGE
+ )));
+ }
+
+ let key = helper.key().get_existing_key(&la.access_key_id).await?;
+ let state = key.state.as_option().unwrap();
+ if matches!(state.local_aliases.get(&la.alias), Some(_)) {
+ return Err(Error::bad_request("Local alias already exists"));
+ }
+ }
+
+ let bucket = Bucket::new();
+ garage.bucket_table.insert(&bucket).await?;
+
+ if let Some(ga) = &self.global_alias {
+ helper.set_global_bucket_alias(bucket.id, ga).await?;
+ }
+
+ if let Some(la) = &self.local_alias {
+ helper
+ .set_local_bucket_alias(bucket.id, &la.access_key_id, &la.alias)
+ .await?;
+
+ if la.allow.read || la.allow.write || la.allow.owner {
+ helper
+ .set_bucket_key_permissions(
+ bucket.id,
+ &la.access_key_id,
+ BucketKeyPerm {
+ timestamp: now_msec(),
+ allow_read: la.allow.read,
+ allow_write: la.allow.write,
+ allow_owner: la.allow.owner,
+ },
+ )
+ .await?;
+ }
+ }
+
+ Ok(CreateBucketResponse(
+ bucket_info_results(garage, bucket.id).await?,
+ ))
+ }
+}
+
+impl RequestHandler for DeleteBucketRequest {
+ type Response = DeleteBucketResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let helper = garage.locked_helper().await;
+
+ let bucket_id = parse_bucket_id(&self.id)?;
+
+ let mut bucket = helper.bucket().get_existing_bucket(bucket_id).await?;
+ let state = bucket.state.as_option().unwrap();
+
+ // Check bucket is empty
+ if !helper.bucket().is_bucket_empty(bucket_id).await? {
+ return Err(CommonError::BucketNotEmpty.into());
+ }
+
+ // --- done checking, now commit ---
+ // 1. delete authorization from keys that had access
+ for (key_id, perm) in bucket.authorized_keys() {
+ if perm.is_any() {
+ helper
+ .set_bucket_key_permissions(bucket.id, key_id, BucketKeyPerm::NO_PERMISSIONS)
+ .await?;
+ }
+ }
+ // 2. delete all local aliases
+ for ((key_id, alias), _, active) in state.local_aliases.items().iter() {
+ if *active {
+ helper
+ .purge_local_bucket_alias(bucket.id, key_id, alias)
+ .await?;
+ }
+ }
+ // 3. delete all global aliases
+ for (alias, _, active) in state.aliases.items().iter() {
+ if *active {
+ helper.purge_global_bucket_alias(bucket.id, alias).await?;
+ }
+ }
+
+ // 4. delete bucket
+ bucket.state = Deletable::delete();
+ garage.bucket_table.insert(&bucket).await?;
+
+ Ok(DeleteBucketResponse)
+ }
+}
+
+impl RequestHandler for UpdateBucketRequest {
+ type Response = UpdateBucketResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let bucket_id = parse_bucket_id(&self.id)?;
+
+ let mut bucket = garage
+ .bucket_helper()
+ .get_existing_bucket(bucket_id)
+ .await?;
+
+ let state = bucket.state.as_option_mut().unwrap();
+
+ if let Some(wa) = self.body.website_access {
+ if wa.enabled {
+ let (redirect_all, routing_rules) = match state.website_config.get() {
+ Some(wc) => (wc.redirect_all.clone(), wc.routing_rules.clone()),
+ None => (None, Vec::new()),
+ };
+ state.website_config.update(Some(WebsiteConfig {
+ index_document: wa.index_document.ok_or_bad_request(
+ "Please specify indexDocument when enabling website access.",
+ )?,
+ error_document: wa.error_document,
+ redirect_all,
+ routing_rules,
+ }));
+ } else {
+ if wa.index_document.is_some() || wa.error_document.is_some() {
+ return Err(Error::bad_request(
+ "Cannot specify indexDocument or errorDocument when disabling website access.",
+ ));
+ }
+ state.website_config.update(None);
+ }
+ }
+
+ if let Some(q) = self.body.quotas {
+ state.quotas.update(BucketQuotas {
+ max_size: q.max_size,
+ max_objects: q.max_objects,
+ });
+ }
+
+ garage.bucket_table.insert(&bucket).await?;
+
+ Ok(UpdateBucketResponse(
+ bucket_info_results(garage, bucket.id).await?,
+ ))
+ }
+}
+
+impl RequestHandler for CleanupIncompleteUploadsRequest {
+ type Response = CleanupIncompleteUploadsResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let duration = Duration::from_secs(self.older_than_secs);
+
+ let bucket_id = parse_bucket_id(&self.bucket_id)?;
+
+ let count = garage
+ .bucket_helper()
+ .cleanup_incomplete_uploads(&bucket_id, duration)
+ .await?;
+
+ Ok(CleanupIncompleteUploadsResponse {
+ uploads_deleted: count as u64,
+ })
+ }
+}
+
+impl RequestHandler for InspectObjectRequest {
+ type Response = InspectObjectResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let bucket_id = parse_bucket_id(&self.bucket_id)?;
+
+ let object = garage
+ .object_table
+ .get(&bucket_id, &self.key)
+ .await?
+ .ok_or_else(|| Error::NoSuchKey)?;
+
+ let mut versions = vec![];
+ for obj_ver in object.versions().iter() {
+ let ver = garage.version_table.get(&obj_ver.uuid, &EmptyKey).await?;
+ let blocks = ver
+ .map(|v| {
+ v.blocks
+ .items()
+ .iter()
+ .map(|(vk, vb)| InspectObjectBlock {
+ part_number: vk.part_number,
+ offset: vk.offset,
+ hash: hex::encode(&vb.hash),
+ size: vb.size,
+ })
+ .collect::>()
+ })
+ .unwrap_or_default();
+ let uuid = hex::encode(&obj_ver.uuid);
+ let timestamp = DateTime::from_timestamp_millis(obj_ver.timestamp as i64)
+ .expect("invalid timestamp in db");
+ match &obj_ver.state {
+ ObjectVersionState::Uploading { encryption, .. } => {
+ versions.push(InspectObjectVersion {
+ uuid,
+ timestamp,
+ encrypted: !matches!(encryption, ObjectVersionEncryption::Plaintext { .. }),
+ uploading: true,
+ headers: match encryption {
+ ObjectVersionEncryption::Plaintext { inner } => inner.headers.clone(),
+ _ => vec![],
+ },
+ blocks,
+ ..Default::default()
+ });
+ }
+ ObjectVersionState::Complete(data) => match data {
+ ObjectVersionData::DeleteMarker => {
+ versions.push(InspectObjectVersion {
+ uuid,
+ timestamp,
+ delete_marker: true,
+ ..Default::default()
+ });
+ }
+ ObjectVersionData::Inline(meta, _) => {
+ versions.push(InspectObjectVersion {
+ uuid,
+ timestamp,
+ inline: true,
+ size: Some(meta.size),
+ etag: Some(meta.etag.clone()),
+ encrypted: !matches!(
+ meta.encryption,
+ ObjectVersionEncryption::Plaintext { .. }
+ ),
+ headers: match &meta.encryption {
+ ObjectVersionEncryption::Plaintext { inner } => {
+ inner.headers.clone()
+ }
+ _ => vec![],
+ },
+ ..Default::default()
+ });
+ }
+ ObjectVersionData::FirstBlock(meta, _) => {
+ versions.push(InspectObjectVersion {
+ uuid,
+ timestamp,
+ size: Some(meta.size),
+ etag: Some(meta.etag.clone()),
+ encrypted: !matches!(
+ meta.encryption,
+ ObjectVersionEncryption::Plaintext { .. }
+ ),
+ headers: match &meta.encryption {
+ ObjectVersionEncryption::Plaintext { inner } => {
+ inner.headers.clone()
+ }
+ _ => vec![],
+ },
+ blocks,
+ ..Default::default()
+ });
+ }
+ },
+ ObjectVersionState::Aborted => {
+ versions.push(InspectObjectVersion {
+ uuid,
+ timestamp,
+ aborted: true,
+ blocks,
+ ..Default::default()
+ });
+ }
+ }
+ }
+
+ Ok(InspectObjectResponse {
+ bucket_id: hex::encode(&object.bucket_id),
+ key: object.key,
+ versions,
+ })
+ }
+}
+
+// ---- BUCKET/KEY PERMISSIONS ----
+
+impl RequestHandler for AllowBucketKeyRequest {
+ type Response = AllowBucketKeyResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let res = handle_bucket_change_key_perm(garage, self.0, true).await?;
+ Ok(AllowBucketKeyResponse(res))
+ }
+}
+
+impl RequestHandler for DenyBucketKeyRequest {
+ type Response = DenyBucketKeyResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let res = handle_bucket_change_key_perm(garage, self.0, false).await?;
+ Ok(DenyBucketKeyResponse(res))
+ }
+}
+
+pub async fn handle_bucket_change_key_perm(
+ garage: &Arc,
+ req: BucketKeyPermChangeRequest,
+ new_perm_flag: bool,
+) -> Result {
+ let helper = garage.locked_helper().await;
+
+ let bucket_id = parse_bucket_id(&req.bucket_id)?;
+
+ let bucket = helper.bucket().get_existing_bucket(bucket_id).await?;
+ let state = bucket.state.as_option().unwrap();
+
+ let key = helper.key().get_existing_key(&req.access_key_id).await?;
+
+ let mut perm = state
+ .authorized_keys
+ .get(&key.key_id)
+ .cloned()
+ .unwrap_or(BucketKeyPerm::NO_PERMISSIONS);
+
+ if req.permissions.read {
+ perm.allow_read = new_perm_flag;
+ }
+ if req.permissions.write {
+ perm.allow_write = new_perm_flag;
+ }
+ if req.permissions.owner {
+ perm.allow_owner = new_perm_flag;
+ }
+
+ helper
+ .set_bucket_key_permissions(bucket.id, &key.key_id, perm)
.await?;
- let res = buckets
- .into_iter()
- .map(|b| {
- let state = b.state.as_option().unwrap();
- ListBucketResultItem {
- id: hex::encode(b.id),
- global_aliases: state
- .aliases
- .items()
- .iter()
- .filter(|(_, _, a)| *a)
- .map(|(n, _, _)| n.to_string())
- .collect::>(),
- local_aliases: state
- .local_aliases
- .items()
- .iter()
- .filter(|(_, _, a)| *a)
- .map(|((k, n), _, _)| BucketLocalAlias {
- access_key_id: k.to_string(),
- alias: n.to_string(),
- })
- .collect::>(),
+ bucket_info_results(garage, bucket.id).await
+}
+
+// ---- BUCKET ALIASES ----
+
+impl RequestHandler for AddBucketAliasRequest {
+ type Response = AddBucketAliasResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let bucket_id = parse_bucket_id(&self.bucket_id)?;
+
+ let helper = garage.locked_helper().await;
+
+ match self.alias {
+ BucketAliasEnum::Global { global_alias } => {
+ helper
+ .set_global_bucket_alias(bucket_id, &global_alias)
+ .await?
+ }
+ BucketAliasEnum::Local {
+ local_alias,
+ access_key_id,
+ } => {
+ helper
+ .set_local_bucket_alias(bucket_id, &access_key_id, &local_alias)
+ .await?
}
- })
- .collect::>();
-
- Ok(json_ok_response(&res)?)
-}
-
-#[derive(Serialize)]
-#[serde(rename_all = "camelCase")]
-struct ListBucketResultItem {
- id: String,
- global_aliases: Vec,
- local_aliases: Vec,
-}
-
-#[derive(Serialize)]
-#[serde(rename_all = "camelCase")]
-struct BucketLocalAlias {
- access_key_id: String,
- alias: String,
-}
-
-#[derive(Serialize, Deserialize)]
-#[serde(rename_all = "camelCase")]
-struct ApiBucketQuotas {
- max_size: Option,
- max_objects: Option,
-}
-
-pub async fn handle_get_bucket_info(
- garage: &Arc,
- id: Option,
- global_alias: Option,
-) -> Result, Error> {
- let bucket_id = match (id, global_alias) {
- (Some(id), None) => parse_bucket_id(&id)?,
- (None, Some(ga)) => garage
- .bucket_helper()
- .resolve_global_bucket_name(&ga)
- .await?
- .ok_or_else(|| HelperError::NoSuchBucket(ga.to_string()))?,
- _ => {
- return Err(Error::bad_request(
- "Either id or globalAlias must be provided (but not both)",
- ));
}
- };
- bucket_info_results(garage, bucket_id).await
+ Ok(AddBucketAliasResponse(
+ bucket_info_results(garage, bucket_id).await?,
+ ))
+ }
}
+impl RequestHandler for RemoveBucketAliasRequest {
+ type Response = RemoveBucketAliasResponse;
+
+ async fn handle(
+ self,
+ garage: &Arc,
+ _admin: &Admin,
+ ) -> Result {
+ let bucket_id = parse_bucket_id(&self.bucket_id)?;
+
+ let helper = garage.locked_helper().await;
+
+ match self.alias {
+ BucketAliasEnum::Global { global_alias } => {
+ helper
+ .unset_global_bucket_alias(bucket_id, &global_alias)
+ .await?
+ }
+ BucketAliasEnum::Local {
+ local_alias,
+ access_key_id,
+ } => {
+ helper
+ .unset_local_bucket_alias(bucket_id, &access_key_id, &local_alias)
+ .await?
+ }
+ }
+
+ Ok(RemoveBucketAliasResponse(
+ bucket_info_results(garage, bucket_id).await?,
+ ))
+ }
+}
+
+// ---- HELPER ----
+
async fn bucket_info_results(
garage: &Arc,
bucket_id: Uuid,
-) -> Result, Error> {
+) -> Result {
let bucket = garage
.bucket_helper()
.get_existing_bucket(bucket_id)
@@ -122,7 +623,7 @@ async fn bucket_info_results(
let counters = garage
.object_counter_table
.table
- .get(&bucket_id, &EmptyKey)
+ .get(&bucket.id, &EmptyKey)
.await?
.map(|x| x.filtered_values(&garage.system.cluster_layout()))
.unwrap_or_default();
@@ -130,7 +631,7 @@ async fn bucket_info_results(
let mpu_counters = garage
.mpu_counter_table
.table
- .get(&bucket_id, &EmptyKey)
+ .get(&bucket.id, &EmptyKey)
.await?
.map(|x| x.filtered_values(&garage.system.cluster_layout()))
.unwrap_or_default();
@@ -176,407 +677,66 @@ async fn bucket_info_results(
let state = bucket.state.as_option().unwrap();
let quotas = state.quotas.get();
- let res =
- GetBucketInfoResult {
- id: hex::encode(bucket.id),
- global_aliases: state
- .aliases
- .items()
- .iter()
- .filter(|(_, _, a)| *a)
- .map(|(n, _, _)| n.to_string())
- .collect::>(),
- website_access: state.website_config.get().is_some(),
- website_config: state.website_config.get().clone().map(|wsc| {
- GetBucketInfoWebsiteResult {
- index_document: wsc.index_document,
- error_document: wsc.error_document,
- }
- }),
- keys: relevant_keys
- .into_values()
- .map(|key| {
- let p = key.state.as_option().unwrap();
- GetBucketInfoKey {
- access_key_id: key.key_id,
- name: p.name.get().to_string(),
- permissions: p
- .authorized_buckets
- .get(&bucket.id)
- .map(|p| ApiBucketKeyPerm {
- read: p.allow_read,
- write: p.allow_write,
- owner: p.allow_owner,
- })
- .unwrap_or_default(),
- bucket_local_aliases: p
- .local_aliases
- .items()
- .iter()
- .filter(|(_, _, b)| *b == Some(bucket.id))
- .map(|(n, _, _)| n.to_string())
- .collect::>(),
- }
+ let res = GetBucketInfoResponse {
+ id: hex::encode(bucket.id),
+ created: DateTime::from_timestamp_millis(state.creation_date as i64)
+ .expect("invalid timestamp stored in db"),
+ global_aliases: state
+ .aliases
+ .items()
+ .iter()
+ .filter(|(_, _, a)| *a)
+ .map(|(n, _, _)| n.to_string())
+ .collect::>(),
+ website_access: state.website_config.get().is_some(),
+ website_config: state.website_config.get().clone().map(|wsc| {
+ GetBucketInfoWebsiteResponse {
+ index_document: wsc.index_document,
+ error_document: wsc.error_document,
+ }
+ }),
+ keys: relevant_keys
+ .into_values()
+ .filter_map(|key| {
+ let p = key.state.as_option().unwrap();
+ let permissions = p
+ .authorized_buckets
+ .get(&bucket.id)
+ .filter(|p| p.is_any())
+ .map(|p| ApiBucketKeyPerm {
+ read: p.allow_read,
+ write: p.allow_write,
+ owner: p.allow_owner,
+ })?;
+ Some(GetBucketInfoKey {
+ access_key_id: key.key_id,
+ name: p.name.get().to_string(),
+ permissions,
+ bucket_local_aliases: p
+ .local_aliases
+ .items()
+ .iter()
+ .filter(|(_, _, b)| *b == Some(bucket.id))
+ .map(|(n, _, _)| n.to_string())
+ .collect::