diff --git a/.woodpecker/debug.yaml b/.woodpecker/debug.yaml
index 65dab9ab..4dc7d3c9 100644
--- a/.woodpecker/debug.yaml
+++ b/.woodpecker/debug.yaml
@@ -1,3 +1,6 @@
+labels:
+ nix: "enabled"
+
when:
event:
- push
@@ -9,27 +12,32 @@ when:
steps:
- name: check formatting
- image: nixpkgs/nix:nixos-22.05
+ image: nixpkgs/nix:nixos-24.05
commands:
- - nix-shell --attr devShell --run "cargo fmt -- --check"
+ - nix-build -j4 --attr flakePackages.fmt
- name: build
- image: nixpkgs/nix:nixos-22.05
+ image: nixpkgs/nix:nixos-24.05
commands:
- nix-build -j4 --attr flakePackages.dev
- name: unit + func tests (lmdb)
- image: nixpkgs/nix:nixos-22.05
+ image: nixpkgs/nix:nixos-24.05
commands:
- nix-build -j4 --attr flakePackages.tests-lmdb
- name: unit + func tests (sqlite)
- image: nixpkgs/nix:nixos-22.05
+ image: nixpkgs/nix:nixos-24.05
commands:
- nix-build -j4 --attr flakePackages.tests-sqlite
+ - name: unit + func tests (fjall)
+ image: nixpkgs/nix:nixos-24.05
+ commands:
+ - nix-build -j4 --attr flakePackages.tests-fjall
+
- name: integration tests
- image: nixpkgs/nix:nixos-22.05
+ image: nixpkgs/nix:nixos-24.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 7522d58d..8f3b482f 100644
--- a/.woodpecker/publish.yaml
+++ b/.woodpecker/publish.yaml
@@ -1,3 +1,6 @@
+labels:
+ nix: "enabled"
+
when:
event:
- deployment
@@ -8,7 +11,7 @@ depends_on:
steps:
- name: refresh-index
- image: nixpkgs/nix:nixos-22.05
+ image: nixpkgs/nix:nixos-24.05
environment:
AWS_ACCESS_KEY_ID:
from_secret: garagehq_aws_access_key_id
@@ -19,7 +22,7 @@ steps:
- nix-shell --attr ci --run "refresh_index"
- name: multiarch-docker
- image: nixpkgs/nix:nixos-22.05
+ image: nixpkgs/nix:nixos-24.05
environment:
DOCKER_AUTH:
from_secret: docker_auth
diff --git a/.woodpecker/release.yaml b/.woodpecker/release.yaml
index 396fbc20..a94a9ccf 100644
--- a/.woodpecker/release.yaml
+++ b/.woodpecker/release.yaml
@@ -1,3 +1,6 @@
+labels:
+ nix: "enabled"
+
when:
event:
- deployment
@@ -16,17 +19,17 @@ matrix:
steps:
- name: build
- image: nixpkgs/nix:nixos-22.05
+ image: nixpkgs/nix:nixos-24.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-22.05
+ image: nixpkgs/nix:nixos-24.05
commands:
- nix-shell --attr ci --run "./script/not-dynamic.sh result/bin/garage"
- name: integration tests
- image: nixpkgs/nix:nixos-22.05
+ image: nixpkgs/nix:nixos-24.05
commands:
- nix-shell --attr ci --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
when:
@@ -35,16 +38,8 @@ steps:
- matrix:
ARCH: i386
- - 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
+ - name: upgrade tests
+ image: nixpkgs/nix:nixos-24.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:
@@ -52,7 +47,7 @@ steps:
ARCH: amd64
- name: push static binary
- image: nixpkgs/nix:nixos-22.05
+ image: nixpkgs/nix:nixos-24.05
environment:
TARGET: "${TARGET}"
AWS_ACCESS_KEY_ID:
@@ -63,7 +58,7 @@ steps:
- nix-shell --attr ci --run "to_s3"
- name: docker build and publish
- image: nixpkgs/nix:nixos-22.05
+ image: nixpkgs/nix:nixos-24.05
environment:
DOCKER_PLATFORM: "linux/${ARCH}"
CONTAINER_NAME: "dxflrs/${ARCH}_garage"
diff --git a/Cargo.lock b/Cargo.lock
index 2b9adcc0..7473d9af 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,18 +4,18 @@ version = 4
[[package]]
name = "addr2line"
-version = "0.24.2"
+version = "0.25.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
+checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b"
dependencies = [
"gimli",
]
[[package]]
name = "adler2"
-version = "2.0.0"
+version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
+checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
[[package]]
name = "aead"
@@ -54,22 +54,22 @@ dependencies = [
[[package]]
name = "ahash"
-version = "0.8.11"
+version = "0.8.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
+checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
dependencies = [
"cfg-if",
- "getrandom 0.2.15",
+ "getrandom 0.3.4",
"once_cell",
"version_check",
- "zerocopy 0.7.35",
+ "zerocopy",
]
[[package]]
name = "aho-corasick"
-version = "1.1.3"
+version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
+checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
dependencies = [
"memchr",
]
@@ -80,12 +80,6 @@ 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"
@@ -97,9 +91,9 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.6.18"
+version = "0.6.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
+checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
dependencies = [
"anstyle",
"anstyle-parse",
@@ -112,50 +106,53 @@ dependencies = [
[[package]]
name = "anstyle"
-version = "1.0.10"
+version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
+checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
[[package]]
name = "anstyle-parse"
-version = "0.2.6"
+version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
+checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
-version = "1.1.2"
+version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
+checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [
- "windows-sys 0.59.0",
+ "windows-sys 0.61.2",
]
[[package]]
name = "anstyle-wincon"
-version = "3.0.7"
+version = "3.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
+checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
- "once_cell",
- "windows-sys 0.59.0",
+ "once_cell_polyfill",
+ "windows-sys 0.61.2",
]
[[package]]
name = "anyhow"
-version = "1.0.97"
+version = "1.0.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f"
+checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
[[package]]
name = "arc-swap"
-version = "1.7.1"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"
+checksum = "51d03449bb8ca2cc2ef70869af31463d1ae5ccc8fa3e334b307203fbf815207e"
+dependencies = [
+ "rustversion",
+]
[[package]]
name = "argon2"
@@ -187,16 +184,14 @@ dependencies = [
[[package]]
name = "async-compression"
-version = "0.4.21"
+version = "0.4.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0cf008e5e1a9e9e22a7d3c9a4992e21a350290069e36d8fb72304ed17e8f2d2"
+checksum = "d10e4f991a553474232bc0a31799f6d24b034a84c0971d80d2e2f78b2e576e40"
dependencies = [
- "futures-core",
- "memchr",
+ "compression-codecs",
+ "compression-core",
"pin-project-lite",
"tokio",
- "zstd",
- "zstd-safe",
]
[[package]]
@@ -218,18 +213,18 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
name = "async-trait"
-version = "0.1.88"
+version = "0.1.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5"
+checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
@@ -240,15 +235,15 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "autocfg"
-version = "1.4.0"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]
name = "aws-credential-types"
-version = "1.2.2"
+version = "1.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4471bef4c22a06d2c7a1b6492493d3fdf24a805323109d6874f9c94d5906ac14"
+checksum = "3cd362783681b15d136480ad555a099e82ecd8e2d10a841e14dfd0078d67fee3"
dependencies = [
"aws-smithy-async",
"aws-smithy-runtime-api",
@@ -258,9 +253,9 @@ dependencies = [
[[package]]
name = "aws-runtime"
-version = "1.5.6"
+version = "1.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0aff45ffe35196e593ea3b9dd65b320e51e2dda95aff4390bc459e461d09c6ad"
+checksum = "959dab27ce613e6c9658eb3621064d0e2027e5f2acb65bc526a43577facea557"
dependencies = [
"aws-credential-types",
"aws-sigv4",
@@ -275,7 +270,6 @@ dependencies = [
"fastrand",
"http 0.2.12",
"http-body 0.4.6",
- "once_cell",
"percent-encoding",
"pin-project-lite",
"tracing",
@@ -284,31 +278,32 @@ dependencies = [
[[package]]
name = "aws-sdk-config"
-version = "1.65.0"
+version = "1.99.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2645fb2c8b9876a46a3d79f06aad47063baf054085ea887a1e6d6f159e8a7501"
+checksum = "67e62e5ffb669e13f084c4e1d89d687604e001187f61503606a7f8cc7a411995"
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.79.0"
+version = "1.120.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8f63ba8f5fca32061c7d62d866ef65470edde38d4c5f8a0ebb8ff40a0521e1c"
+checksum = "06673901e961f20fa8d7da907da48f7ad6c1b383e3726c22bd418900f015abe1"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -318,6 +313,7 @@ dependencies = [
"aws-smithy-eventstream",
"aws-smithy-http",
"aws-smithy-json",
+ "aws-smithy-observability",
"aws-smithy-runtime",
"aws-smithy-runtime-api",
"aws-smithy-types",
@@ -328,10 +324,9 @@ dependencies = [
"hex",
"hmac",
"http 0.2.12",
- "http 1.3.1",
+ "http 1.4.0",
"http-body 0.4.6",
"lru",
- "once_cell",
"percent-encoding",
"regex-lite",
"sha2",
@@ -341,9 +336,9 @@ dependencies = [
[[package]]
name = "aws-sigv4"
-version = "1.3.0"
+version = "1.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69d03c3c05ff80d54ff860fe38c726f6f494c639ae975203a101335f223386db"
+checksum = "69e523e1c4e8e7e8ff219d732988e22bfeae8a1cafdbe6d9eca1546fa080be7c"
dependencies = [
"aws-credential-types",
"aws-smithy-eventstream",
@@ -355,8 +350,7 @@ dependencies = [
"hex",
"hmac",
"http 0.2.12",
- "http 1.3.1",
- "once_cell",
+ "http 1.4.0",
"percent-encoding",
"sha2",
"time",
@@ -365,9 +359,9 @@ dependencies = [
[[package]]
name = "aws-smithy-async"
-version = "1.2.5"
+version = "1.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e190749ea56f8c42bf15dd76c65e14f8f765233e6df9b0506d9d934ebef867c"
+checksum = "9ee19095c7c4dda59f1697d028ce704c24b2d33c6718790c7f1d5a3015b4107c"
dependencies = [
"futures-util",
"pin-project-lite",
@@ -376,16 +370,14 @@ dependencies = [
[[package]]
name = "aws-smithy-checksums"
-version = "0.63.1"
+version = "0.63.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b65d21e1ba6f2cdec92044f904356a19f5ad86961acf015741106cdfafd747c0"
+checksum = "23374b9170cbbcc6f5df8dc5ebb9b6c5c28a3c8f599f0e8b8b10eb6f4a5c6e74"
dependencies = [
"aws-smithy-http",
"aws-smithy-types",
"bytes",
- "crc32c",
- "crc32fast",
- "crc64fast-nvme",
+ "crc-fast",
"hex",
"http 0.2.12",
"http-body 0.4.6",
@@ -398,9 +390,9 @@ dependencies = [
[[package]]
name = "aws-smithy-eventstream"
-version = "0.60.8"
+version = "0.60.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c45d3dddac16c5c59d553ece225a88870cf81b7b813c9cc17b78cf4685eac7a"
+checksum = "dc12f8b310e38cad85cf3bef45ad236f470717393c613266ce0a89512286b650"
dependencies = [
"aws-smithy-types",
"bytes",
@@ -409,9 +401,9 @@ dependencies = [
[[package]]
name = "aws-smithy-http"
-version = "0.62.0"
+version = "0.62.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5949124d11e538ca21142d1fba61ab0a2a2c1bc3ed323cdb3e4b878bfb83166"
+checksum = "826141069295752372f8203c17f28e30c464d22899a43a0c9fd9c458d469c88b"
dependencies = [
"aws-smithy-eventstream",
"aws-smithy-runtime-api",
@@ -419,10 +411,10 @@ dependencies = [
"bytes",
"bytes-utils",
"futures-core",
+ "futures-util",
"http 0.2.12",
- "http 1.3.1",
+ "http 1.4.0",
"http-body 0.4.6",
- "once_cell",
"percent-encoding",
"pin-project-lite",
"pin-utils",
@@ -431,51 +423,62 @@ dependencies = [
[[package]]
name = "aws-smithy-http-client"
-version = "1.0.0"
+version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0497ef5d53065b7cd6a35e9c1654bd1fefeae5c52900d91d1b188b0af0f29324"
+checksum = "59e62db736db19c488966c8d787f52e6270be565727236fd5579eaa301e7bc4a"
dependencies = [
"aws-smithy-async",
"aws-smithy-runtime-api",
"aws-smithy-types",
- "h2 0.4.8",
+ "h2 0.3.27",
+ "h2 0.4.13",
"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.3"
+version = "0.61.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92144e45819cae7dc62af23eac5a038a58aa544432d2102609654376a900bd07"
+checksum = "49fa1213db31ac95288d981476f78d05d9cbb0353d22cdf3472cc05bb02f6551"
dependencies = [
"aws-smithy-types",
]
[[package]]
-name = "aws-smithy-runtime"
-version = "1.8.0"
+name = "aws-smithy-observability"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6328865e36c6fd970094ead6b05efd047d3a80ec5fc3be5e743910da9f2ebf8"
+checksum = "ef1fcbefc7ece1d70dcce29e490f269695dfca2d2bacdeaf9e5c3f799e4e6a42"
+dependencies = [
+ "aws-smithy-runtime-api",
+]
+
+[[package]]
+name = "aws-smithy-runtime"
+version = "1.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb5b6167fcdf47399024e81ac08e795180c576a20e4d4ce67949f9a88ae37dc1"
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.3.1",
+ "http 1.4.0",
"http-body 0.4.6",
"http-body 1.0.1",
- "once_cell",
"pin-project-lite",
"pin-utils",
"tokio",
@@ -484,15 +487,15 @@ dependencies = [
[[package]]
name = "aws-smithy-runtime-api"
-version = "1.7.4"
+version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3da37cf5d57011cb1753456518ec76e31691f1f474b73934a284eb2a1c76510f"
+checksum = "efce7aaaf59ad53c5412f14fc19b2d5c6ab2c3ec688d272fd31f76ec12f44fb0"
dependencies = [
"aws-smithy-async",
"aws-smithy-types",
"bytes",
"http 0.2.12",
- "http 1.3.1",
+ "http 1.4.0",
"pin-project-lite",
"tokio",
"tracing",
@@ -501,16 +504,16 @@ dependencies = [
[[package]]
name = "aws-smithy-types"
-version = "1.3.0"
+version = "1.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "836155caafba616c0ff9b07944324785de2ab016141c3550bd1c07882f8cee8f"
+checksum = "65f172bcb02424eb94425db8aed1b6d583b5104d4d5ddddf22402c661a320048"
dependencies = [
"base64-simd",
"bytes",
"bytes-utils",
"futures-core",
"http 0.2.12",
- "http 1.3.1",
+ "http 1.4.0",
"http-body 0.4.6",
"http-body 1.0.1",
"http-body-util",
@@ -522,23 +525,23 @@ dependencies = [
"serde",
"time",
"tokio",
- "tokio-util 0.7.14",
+ "tokio-util 0.7.18",
]
[[package]]
name = "aws-smithy-xml"
-version = "0.60.9"
+version = "0.60.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab0b0166827aa700d3dc519f72f8b3a91c35d0b8d042dc5d643a91e6f80648fc"
+checksum = "11b2f670422ff42bf7065031e72b45bc52a3508bd089f743ea90731ca2b6ea57"
dependencies = [
"xmlparser",
]
[[package]]
name = "aws-types"
-version = "1.3.6"
+version = "1.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3873f8deed8927ce8d04487630dc9ff73193bab64742a61d050e57a68dec4125"
+checksum = "1d980627d2dd7bfc32a3c025685a033eeab8d365cc840c631ef59d1b8f428164"
dependencies = [
"aws-credential-types",
"aws-smithy-async",
@@ -554,16 +557,16 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1"
dependencies = [
- "getrandom 0.2.15",
+ "getrandom 0.2.17",
"instant",
"rand",
]
[[package]]
name = "backtrace"
-version = "0.3.74"
+version = "0.3.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"
+checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6"
dependencies = [
"addr2line",
"cfg-if",
@@ -571,7 +574,7 @@ dependencies = [
"miniz_oxide",
"object",
"rustc-demangle",
- "windows-targets 0.52.6",
+ "windows-link",
]
[[package]]
@@ -604,9 +607,9 @@ dependencies = [
[[package]]
name = "base64ct"
-version = "1.7.3"
+version = "1.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3"
+checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06"
[[package]]
name = "bincode"
@@ -625,9 +628,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.9.0"
+version = "2.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
+checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
[[package]]
name = "blake2"
@@ -649,15 +652,15 @@ dependencies = [
[[package]]
name = "bumpalo"
-version = "3.17.0"
+version = "3.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
+checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510"
[[package]]
name = "bytemuck"
-version = "1.22.0"
+version = "1.24.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540"
+checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4"
[[package]]
name = "byteorder"
@@ -667,9 +670,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
-version = "1.10.1"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
+checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3"
[[package]]
name = "bytes-utils"
@@ -683,16 +686,23 @@ dependencies = [
[[package]]
name = "bytesize"
-version = "1.3.2"
+version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d2c12f985c78475a6b8d629afd0c360260ef34cfef52efccdcfd31972f81c2e"
+checksum = "2e93abca9e28e0a1b9877922aacb20576e05d4679ffa78c3d6dc22a26a216659"
+
+[[package]]
+name = "byteview"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6236364b88b9b6d0bc181ba374cf1ab55ba3ef97a1cb6f8cddad48a273767fb5"
[[package]]
name = "cc"
-version = "1.2.16"
+version = "1.2.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c"
+checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583"
dependencies = [
+ "find-msvc-tools",
"jobserver",
"libc",
"shlex",
@@ -700,9 +710,9 @@ dependencies = [
[[package]]
name = "cfg-if"
-version = "1.0.0"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "cfg_aliases"
@@ -718,11 +728,10 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]]
name = "chrono"
-version = "0.4.40"
+version = "0.4.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c"
+checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118"
dependencies = [
- "android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
@@ -754,9 +763,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.5.32"
+version = "4.5.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83"
+checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394"
dependencies = [
"clap_builder",
"clap_derive",
@@ -764,9 +773,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.5.32"
+version = "4.5.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8"
+checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00"
dependencies = [
"anstream",
"anstyle",
@@ -776,27 +785,50 @@ dependencies = [
[[package]]
name = "clap_derive"
-version = "4.5.32"
+version = "4.5.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7"
+checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671"
dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
name = "clap_lex"
-version = "0.7.4"
+version = "0.7.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
+checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32"
[[package]]
name = "colorchoice"
-version = "1.0.3"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
+checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
+
+[[package]]
+name = "compare"
+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"
@@ -808,6 +840,16 @@ 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"
@@ -825,9 +867,9 @@ dependencies = [
[[package]]
name = "crc"
-version = "3.2.1"
+version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
+checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675"
dependencies = [
"crc-catalog",
]
@@ -838,6 +880,18 @@ version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
+[[package]]
+name = "crc-fast"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2fd92aca2c6001b1bf5ba0ff84ee74ec8501b52bbef0cac80bf25a6c1d87a83d"
+dependencies = [
+ "crc",
+ "digest",
+ "rustversion",
+ "spin 0.10.0",
+]
+
[[package]]
name = "crc32c"
version = "0.6.8"
@@ -849,27 +903,27 @@ dependencies = [
[[package]]
name = "crc32fast"
-version = "1.4.2"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
+checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
dependencies = [
"cfg-if",
]
[[package]]
-name = "crc64fast-nvme"
-version = "1.2.0"
+name = "crossbeam-channel"
+version = "0.5.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4955638f00a809894c947f85a024020a20815b65a5eea633798ea7924edab2b3"
+checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2"
dependencies = [
- "crc",
+ "crossbeam-utils",
]
[[package]]
-name = "crossbeam-channel"
-version = "0.5.14"
+name = "crossbeam-epoch"
+version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471"
+checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
dependencies = [
"crossbeam-utils",
]
@@ -883,6 +937,16 @@ dependencies = [
"crossbeam-utils",
]
+[[package]]
+name = "crossbeam-skiplist"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df29de440c58ca2cc6e587ec3d22347551a32435fbde9d2bff64e78a9ffa151b"
+dependencies = [
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
[[package]]
name = "crossbeam-utils"
version = "0.8.21"
@@ -891,9 +955,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "crypto-common"
-version = "0.1.6"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
dependencies = [
"generic-array",
"rand_core",
@@ -911,9 +975,9 @@ dependencies = [
[[package]]
name = "darling"
-version = "0.20.10"
+version = "0.20.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
+checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee"
dependencies = [
"darling_core",
"darling_macro",
@@ -921,27 +985,27 @@ dependencies = [
[[package]]
name = "darling_core"
-version = "0.20.10"
+version = "0.20.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
+checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
name = "darling_macro"
-version = "0.20.10"
+version = "0.20.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
+checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
dependencies = [
"darling_core",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
@@ -955,10 +1019,24 @@ dependencies = [
]
[[package]]
-name = "deranged"
-version = "0.4.0"
+name = "dashmap"
+version = "6.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e"
+checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf"
+dependencies = [
+ "cfg-if",
+ "crossbeam-utils",
+ "hashbrown 0.14.5",
+ "lock_api",
+ "once_cell",
+ "parking_lot_core",
+]
+
+[[package]]
+name = "deranged"
+version = "0.5.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587"
dependencies = [
"powerfmt",
]
@@ -993,14 +1071,20 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
-name = "dyn-clone"
-version = "1.0.19"
+name = "double-ended-peekable"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005"
+checksum = "c0d05e1c0dbad51b52c38bda7adceef61b9efc2baf04acfe8726a8c4630a6f57"
+
+[[package]]
+name = "dyn-clone"
+version = "1.0.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
[[package]]
name = "either"
@@ -1017,6 +1101,18 @@ dependencies = [
"cfg-if",
]
+[[package]]
+name = "enum_dispatch"
+version = "0.3.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd"
+dependencies = [
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.114",
+]
+
[[package]]
name = "env_logger"
version = "0.10.2"
@@ -1036,28 +1132,14 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
-[[package]]
-name = "err-derive"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c34a887c8df3ed90498c1c437ce21f211c8e27672921a8ffa293cb8d6d4caa9e"
-dependencies = [
- "proc-macro-error",
- "proc-macro2",
- "quote",
- "rustversion",
- "syn 1.0.109",
- "synstructure 0.12.6",
-]
-
[[package]]
name = "errno"
-version = "0.3.10"
+version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
+checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
- "windows-sys 0.59.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -1078,12 +1160,35 @@ 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"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
+[[package]]
+name = "fjall"
+version = "2.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b25ad44cd4360a0448a9b5a0a6f1c7a621101cca4578706d43c9a821418aebc"
+dependencies = [
+ "byteorder",
+ "byteview",
+ "dashmap 6.1.0",
+ "log",
+ "lsm-tree",
+ "path-absolutize",
+ "std-semaphore",
+ "tempfile",
+ "xxhash-rust",
+]
+
[[package]]
name = "fnv"
version = "1.0.7"
@@ -1097,10 +1202,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
[[package]]
-name = "form_urlencoded"
-version = "1.2.1"
+name = "foldhash"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
+checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
+
+[[package]]
+name = "form_urlencoded"
+version = "1.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
dependencies = [
"percent-encoding",
]
@@ -1165,7 +1276,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
@@ -1200,7 +1311,7 @@ dependencies = [
[[package]]
name = "garage"
-version = "2.0.0"
+version = "1.3.1"
dependencies = [
"assert-json-diff",
"async-trait",
@@ -1229,9 +1340,9 @@ dependencies = [
"git-version",
"hex",
"hmac",
- "http 1.3.1",
+ "http 1.4.0",
"http-body-util",
- "hyper 1.6.0",
+ "hyper 1.8.1",
"hyper-util",
"k2v-client",
"kuska-sodiumoxide",
@@ -1240,6 +1351,7 @@ dependencies = [
"opentelemetry-otlp",
"opentelemetry-prometheus",
"parse_duration",
+ "serde",
"serde_json",
"sha1",
"sha2",
@@ -1249,65 +1361,56 @@ dependencies = [
"timeago",
"tokio",
"tracing",
+ "tracing-journald",
"tracing-subscriber",
- "utoipa",
]
[[package]]
name = "garage_api_admin"
-version = "2.0.0"
+version = "1.3.1"
dependencies = [
"argon2",
"async-trait",
- "bytesize",
- "chrono",
- "err-derive",
- "format_table",
"futures",
"garage_api_common",
- "garage_block",
"garage_model",
"garage_rpc",
"garage_table",
"garage_util",
"hex",
- "http 1.3.1",
- "hyper 1.6.0",
+ "http 1.4.0",
+ "hyper 1.8.1",
"opentelemetry",
"opentelemetry-prometheus",
- "paste",
"prometheus",
"serde",
"serde_json",
+ "thiserror 2.0.18",
"tokio",
"tracing",
"url",
- "utoipa",
]
[[package]]
name = "garage_api_common"
-version = "2.0.0"
+version = "1.3.1"
dependencies = [
"base64 0.21.7",
"bytes",
"chrono",
"crc32c",
"crc32fast",
- "crc64fast-nvme",
"crypto-common",
- "err-derive",
"futures",
"garage_model",
"garage_table",
"garage_util",
"hex",
"hmac",
- "http 1.3.1",
+ "http 1.4.0",
"http-body-util",
- "hyper 1.6.0",
+ "hyper 1.8.1",
"hyper-util",
- "idna 0.5.0",
"md-5",
"nom",
"opentelemetry",
@@ -1316,6 +1419,7 @@ dependencies = [
"serde_json",
"sha1",
"sha2",
+ "thiserror 2.0.18",
"tokio",
"tracing",
"url",
@@ -1323,22 +1427,22 @@ dependencies = [
[[package]]
name = "garage_api_k2v"
-version = "2.0.0"
+version = "1.3.1"
dependencies = [
"base64 0.21.7",
- "err-derive",
"futures",
"garage_api_common",
"garage_model",
"garage_table",
"garage_util",
- "http 1.3.1",
+ "http 1.4.0",
"http-body-util",
- "hyper 1.6.0",
+ "hyper 1.8.1",
"opentelemetry",
"percent-encoding",
"serde",
"serde_json",
+ "thiserror 2.0.18",
"tokio",
"tracing",
"url",
@@ -1346,7 +1450,7 @@ dependencies = [
[[package]]
name = "garage_api_s3"
-version = "2.0.0"
+version = "1.3.1"
dependencies = [
"aes-gcm",
"async-compression",
@@ -1355,8 +1459,6 @@ dependencies = [
"chrono",
"crc32c",
"crc32fast",
- "crc64fast-nvme",
- "err-derive",
"form_urlencoded",
"futures",
"garage_api_common",
@@ -1367,12 +1469,11 @@ dependencies = [
"garage_table",
"garage_util",
"hex",
- "hmac",
- "http 1.3.1",
+ "http 1.4.0",
"http-body-util",
"http-range",
"httpdate",
- "hyper 1.6.0",
+ "hyper 1.8.1",
"md-5",
"multer",
"opentelemetry",
@@ -1384,16 +1485,17 @@ dependencies = [
"serde_json",
"sha1",
"sha2",
+ "thiserror 2.0.18",
"tokio",
"tokio-stream",
- "tokio-util 0.7.14",
+ "tokio-util 0.7.18",
"tracing",
"url",
]
[[package]]
name = "garage_block"
-version = "2.0.0"
+version = "1.3.1"
dependencies = [
"arc-swap",
"async-compression",
@@ -1404,40 +1506,41 @@ dependencies = [
"garage_db",
"garage_net",
"garage_rpc",
+ "garage_table",
"garage_util",
"hex",
"opentelemetry",
"rand",
"serde",
"tokio",
- "tokio-util 0.7.14",
+ "tokio-util 0.7.18",
"tracing",
"zstd",
]
[[package]]
name = "garage_db"
-version = "2.0.0"
+version = "1.3.1"
dependencies = [
- "err-derive",
+ "fjall",
"heed",
"mktemp",
+ "parking_lot",
"r2d2",
"r2d2_sqlite",
"rusqlite",
+ "thiserror 2.0.18",
"tracing",
]
[[package]]
name = "garage_model"
-version = "2.0.0"
+version = "1.3.1"
dependencies = [
- "argon2",
"async-trait",
"base64 0.21.7",
"blake2",
"chrono",
- "err-derive",
"futures",
"garage_block",
"garage_db",
@@ -1446,11 +1549,12 @@ dependencies = [
"garage_table",
"garage_util",
"hex",
- "http 1.3.1",
+ "http 1.4.0",
"parse_duration",
"rand",
"serde",
"serde_bytes",
+ "thiserror 2.0.18",
"tokio",
"tracing",
"zstd",
@@ -1458,12 +1562,11 @@ dependencies = [
[[package]]
name = "garage_net"
-version = "2.0.0"
+version = "1.3.1"
dependencies = [
"arc-swap",
"bytes",
"cfg-if",
- "err-derive",
"futures",
"hex",
"kuska-handshake",
@@ -1476,19 +1579,19 @@ dependencies = [
"rand",
"rmp-serde",
"serde",
+ "thiserror 2.0.18",
"tokio",
"tokio-stream",
- "tokio-util 0.7.14",
+ "tokio-util 0.7.18",
]
[[package]]
name = "garage_rpc"
-version = "2.0.0"
+version = "1.3.1"
dependencies = [
"arc-swap",
"async-trait",
"bytesize",
- "err-derive",
"format_table",
"futures",
"garage_net",
@@ -1509,13 +1612,14 @@ dependencies = [
"serde",
"serde_bytes",
"serde_json",
+ "thiserror 2.0.18",
"tokio",
"tracing",
]
[[package]]
name = "garage_table"
-version = "2.0.0"
+version = "1.3.1"
dependencies = [
"arc-swap",
"async-trait",
@@ -1536,21 +1640,20 @@ dependencies = [
[[package]]
name = "garage_util"
-version = "2.0.0"
+version = "1.3.1"
dependencies = [
"arc-swap",
"async-trait",
"blake2",
"bytesize",
"chrono",
- "err-derive",
"futures",
"garage_db",
"garage_net",
"hex",
"hexdump",
- "http 1.3.1",
- "hyper 1.6.0",
+ "http 1.4.0",
+ "hyper 1.8.1",
"lazy_static",
"mktemp",
"opentelemetry",
@@ -1560,6 +1663,7 @@ dependencies = [
"serde",
"serde_json",
"sha2",
+ "thiserror 2.0.18",
"tokio",
"toml",
"tracing",
@@ -1568,19 +1672,19 @@ dependencies = [
[[package]]
name = "garage_web"
-version = "2.0.0"
+version = "1.3.1"
dependencies = [
- "err-derive",
"garage_api_common",
"garage_api_s3",
"garage_model",
"garage_table",
"garage_util",
- "http 1.3.1",
+ "http 1.4.0",
"http-body-util",
- "hyper 1.6.0",
+ "hyper 1.8.1",
"opentelemetry",
"percent-encoding",
+ "thiserror 2.0.18",
"tokio",
"tracing",
]
@@ -1607,25 +1711,25 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.15"
+version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
+checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
dependencies = [
"cfg-if",
"libc",
- "wasi 0.11.0+wasi-snapshot-preview1",
+ "wasi",
]
[[package]]
name = "getrandom"
-version = "0.3.2"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0"
+checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
dependencies = [
"cfg-if",
"libc",
"r-efi",
- "wasi 0.14.2+wasi-0.2.4",
+ "wasip2",
]
[[package]]
@@ -1640,9 +1744,9 @@ dependencies = [
[[package]]
name = "gimli"
-version = "0.31.1"
+version = "0.32.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
+checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"
[[package]]
name = "git-version"
@@ -1661,14 +1765,20 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
-name = "h2"
-version = "0.3.26"
+name = "guardian"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8"
+checksum = "17e2ac29387b1aa07a1e448f7bb4f35b500787971e965b02842b900afa5c8f6f"
+
+[[package]]
+name = "h2"
+version = "0.3.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d"
dependencies = [
"bytes",
"fnv",
@@ -1676,29 +1786,29 @@ dependencies = [
"futures-sink",
"futures-util",
"http 0.2.12",
- "indexmap 2.8.0",
+ "indexmap 2.13.0",
"slab",
"tokio",
- "tokio-util 0.7.14",
+ "tokio-util 0.7.18",
"tracing",
]
[[package]]
name = "h2"
-version = "0.4.8"
+version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2"
+checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54"
dependencies = [
"atomic-waker",
"bytes",
"fnv",
"futures-core",
"futures-sink",
- "http 1.3.1",
- "indexmap 2.8.0",
+ "http 1.4.0",
+ "indexmap 2.13.0",
"slab",
"tokio",
- "tokio-util 0.7.14",
+ "tokio-util 0.7.18",
"tracing",
]
@@ -1720,22 +1830,31 @@ dependencies = [
[[package]]
name = "hashbrown"
-version = "0.15.2"
+version = "0.15.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
+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"
dependencies = [
"allocator-api2",
"equivalent",
- "foldhash",
+ "foldhash 0.2.0",
]
[[package]]
name = "hashlink"
-version = "0.9.1"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af"
+checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1"
dependencies = [
- "hashbrown 0.14.5",
+ "hashbrown 0.15.5",
]
[[package]]
@@ -1793,15 +1912,9 @@ dependencies = [
[[package]]
name = "hermit-abi"
-version = "0.3.9"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
-
-[[package]]
-name = "hermit-abi"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e"
+checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
[[package]]
name = "hex"
@@ -1829,11 +1942,11 @@ dependencies = [
[[package]]
name = "home"
-version = "0.5.11"
+version = "0.5.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf"
+checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d"
dependencies = [
- "windows-sys 0.59.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -1849,12 +1962,11 @@ dependencies = [
[[package]]
name = "http"
-version = "1.3.1"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565"
+checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a"
dependencies = [
"bytes",
- "fnv",
"itoa",
]
@@ -1876,7 +1988,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
dependencies = [
"bytes",
- "http 1.3.1",
+ "http 1.4.0",
]
[[package]]
@@ -1887,7 +1999,7 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a"
dependencies = [
"bytes",
"futures-core",
- "http 1.3.1",
+ "http 1.4.0",
"http-body 1.0.1",
"pin-project-lite",
]
@@ -1918,9 +2030,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
[[package]]
name = "humantime"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f"
+checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424"
[[package]]
name = "hyper"
@@ -1932,14 +2044,14 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-util",
- "h2 0.3.26",
+ "h2 0.3.27",
"http 0.2.12",
"http-body 0.4.6",
"httparse",
"httpdate",
"itoa",
"pin-project-lite",
- "socket2",
+ "socket2 0.5.10",
"tokio",
"tower-service",
"tracing",
@@ -1948,20 +2060,22 @@ dependencies = [
[[package]]
name = "hyper"
-version = "1.6.0"
+version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80"
+checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11"
dependencies = [
+ "atomic-waker",
"bytes",
"futures-channel",
- "futures-util",
- "h2 0.4.8",
- "http 1.3.1",
+ "futures-core",
+ "h2 0.4.13",
+ "http 1.4.0",
"http-body 1.0.1",
"httparse",
"httpdate",
"itoa",
"pin-project-lite",
+ "pin-utils",
"smallvec",
"tokio",
"want",
@@ -1990,8 +2104,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c"
dependencies = [
"futures-util",
- "http 1.3.1",
- "hyper 1.6.0",
+ "http 1.4.0",
+ "hyper 1.8.1",
"hyper-util",
"rustls 0.22.4",
"rustls-native-certs 0.7.3",
@@ -2015,33 +2129,42 @@ dependencies = [
[[package]]
name = "hyper-util"
-version = "0.1.10"
+version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"
+checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f"
dependencies = [
+ "base64 0.22.1",
"bytes",
"futures-channel",
+ "futures-core",
"futures-util",
- "http 1.3.1",
+ "http 1.4.0",
"http-body 1.0.1",
- "hyper 1.6.0",
+ "hyper 1.8.1",
+ "ipnet",
+ "libc",
+ "percent-encoding",
"pin-project-lite",
- "socket2",
+ "socket2 0.6.2",
+ "system-configuration 0.6.1",
"tokio",
+ "tower-layer",
"tower-service",
"tracing",
+ "windows-registry",
]
[[package]]
name = "iana-time-zone"
-version = "0.1.61"
+version = "0.1.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
+checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
+ "log",
"wasm-bindgen",
"windows-core",
]
@@ -2057,21 +2180,22 @@ dependencies = [
[[package]]
name = "icu_collections"
-version = "1.5.0"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526"
+checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43"
dependencies = [
"displaydoc",
+ "potential_utf",
"yoke",
"zerofrom",
"zerovec",
]
[[package]]
-name = "icu_locid"
-version = "1.5.0"
+name = "icu_locale_core"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637"
+checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6"
dependencies = [
"displaydoc",
"litemap",
@@ -2080,99 +2204,61 @@ dependencies = [
"zerovec",
]
-[[package]]
-name = "icu_locid_transform"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-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"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f"
+checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599"
dependencies = [
- "displaydoc",
"icu_collections",
"icu_normalizer_data",
"icu_properties",
"icu_provider",
"smallvec",
- "utf16_iter",
- "utf8_iter",
- "write16",
"zerovec",
]
[[package]]
name = "icu_normalizer_data"
-version = "1.5.0"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516"
+checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a"
[[package]]
name = "icu_properties"
-version = "1.5.1"
+version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5"
+checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec"
dependencies = [
- "displaydoc",
"icu_collections",
- "icu_locid_transform",
+ "icu_locale_core",
"icu_properties_data",
"icu_provider",
- "tinystr",
+ "zerotrie",
"zerovec",
]
[[package]]
name = "icu_properties_data"
-version = "1.5.0"
+version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569"
+checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af"
[[package]]
name = "icu_provider"
-version = "1.5.0"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9"
+checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614"
dependencies = [
"displaydoc",
- "icu_locid",
- "icu_provider_macros",
- "stable_deref_trait",
- "tinystr",
+ "icu_locale_core",
"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"
@@ -2181,19 +2267,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]]
name = "idna"
-version = "0.5.0"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
-dependencies = [
- "unicode-bidi",
- "unicode-normalization",
-]
-
-[[package]]
-name = "idna"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e"
+checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"
dependencies = [
"idna_adapter",
"smallvec",
@@ -2202,9 +2278,9 @@ dependencies = [
[[package]]
name = "idna_adapter"
-version = "1.2.0"
+version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71"
+checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344"
dependencies = [
"icu_normalizer",
"icu_properties",
@@ -2222,13 +2298,12 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "2.8.0"
+version = "2.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058"
+checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
dependencies = [
"equivalent",
- "hashbrown 0.15.2",
- "serde",
+ "hashbrown 0.16.1",
]
[[package]]
@@ -2249,6 +2324,15 @@ dependencies = [
"cfg-if",
]
+[[package]]
+name = "interval-heap"
+version = "0.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "11274e5e8e89b8607cfedc2910b6626e998779b48a019151c7604d0adcb86ac6"
+dependencies = [
+ "compare",
+]
+
[[package]]
name = "ipnet"
version = "2.11.0"
@@ -2266,20 +2350,20 @@ dependencies = [
[[package]]
name = "is-terminal"
-version = "0.4.16"
+version = "0.4.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9"
+checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46"
dependencies = [
- "hermit-abi 0.5.0",
+ "hermit-abi",
"libc",
- "windows-sys 0.59.0",
+ "windows-sys 0.61.2",
]
[[package]]
name = "is_terminal_polyfill"
-version = "1.70.1"
+version = "1.70.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
+checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
[[package]]
name = "itertools"
@@ -2301,24 +2385,25 @@ dependencies = [
[[package]]
name = "itoa"
-version = "1.0.15"
+version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
+checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
[[package]]
name = "jobserver"
-version = "0.1.32"
+version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
+checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33"
dependencies = [
+ "getrandom 0.3.4",
"libc",
]
[[package]]
name = "js-sys"
-version = "0.3.77"
+version = "0.3.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
+checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3"
dependencies = [
"once_cell",
"wasm-bindgen",
@@ -2355,12 +2440,12 @@ dependencies = [
"aws-sdk-config",
"aws-sigv4",
"base64 0.21.7",
- "clap 4.5.32",
+ "clap 4.5.54",
"format_table",
"hex",
- "http 1.3.1",
+ "http 1.4.0",
"http-body-util",
- "hyper 1.6.0",
+ "hyper 1.8.1",
"hyper-rustls 0.26.0",
"hyper-util",
"log",
@@ -2368,7 +2453,7 @@ dependencies = [
"serde",
"serde_json",
"sha2",
- "thiserror 1.0.69",
+ "thiserror 2.0.18",
"tokio",
"tracing-subscriber",
]
@@ -2429,7 +2514,7 @@ dependencies = [
"serde_yaml",
"thiserror 1.0.69",
"tokio",
- "tokio-util 0.7.14",
+ "tokio-util 0.7.18",
"tower",
"tower-http",
"tracing",
@@ -2463,7 +2548,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde_json",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
@@ -2481,14 +2566,14 @@ dependencies = [
"json-patch",
"k8s-openapi",
"kube-client",
- "parking_lot 0.12.3",
+ "parking_lot",
"pin-project",
"serde",
"serde_json",
"smallvec",
"thiserror 1.0.69",
"tokio",
- "tokio-util 0.7.14",
+ "tokio-util 0.7.18",
"tracing",
]
@@ -2524,9 +2609,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
-version = "0.2.171"
+version = "0.2.180"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
+checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
[[package]]
name = "libsodium-sys"
@@ -2542,9 +2627,9 @@ dependencies = [
[[package]]
name = "libsqlite3-sys"
-version = "0.28.0"
+version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f"
+checksum = "133c182a6a2c87864fe97778797e46c7e999672690dc9fa3ee8e241aa4a9c13f"
dependencies = [
"cc",
"pkg-config",
@@ -2559,15 +2644,15 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
[[package]]
name = "linux-raw-sys"
-version = "0.9.3"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413"
+checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039"
[[package]]
name = "litemap"
-version = "0.7.5"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856"
+checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
[[package]]
name = "lmdb-rkv-sys"
@@ -2582,36 +2667,65 @@ dependencies = [
[[package]]
name = "lock_api"
-version = "0.4.12"
+version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
+checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
dependencies = [
- "autocfg",
"scopeguard",
]
[[package]]
name = "log"
-version = "0.4.26"
+version = "0.4.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e"
+checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
[[package]]
name = "lru"
-version = "0.12.5"
+version = "0.16.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38"
+checksum = "a1dc47f592c06f33f8e3aea9591776ec7c9f9e4124778ff8a3c3b87159f7e593"
dependencies = [
- "hashbrown 0.15.2",
+ "hashbrown 0.16.1",
]
[[package]]
-name = "matchers"
-version = "0.1.0"
+name = "lsm-tree"
+version = "2.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
+checksum = "799399117a2bfb37660e08be33f470958babb98386b04185288d829df362ea15"
dependencies = [
- "regex-automata 0.1.10",
+ "byteorder",
+ "crossbeam-skiplist",
+ "double-ended-peekable",
+ "enum_dispatch",
+ "guardian",
+ "interval-heap",
+ "log",
+ "lz4_flex",
+ "path-absolutize",
+ "quick_cache",
+ "rustc-hash",
+ "self_cell",
+ "tempfile",
+ "value-log",
+ "varint-rs",
+ "xxhash-rust",
+]
+
+[[package]]
+name = "lz4_flex"
+version = "0.11.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08ab2867e3eeeca90e844d1940eab391c9dc5228783db2ed999acbc0a9ed375a"
+
+[[package]]
+name = "matchers"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9"
+dependencies = [
+ "regex-automata",
]
[[package]]
@@ -2626,9 +2740,9 @@ dependencies = [
[[package]]
name = "memchr"
-version = "2.7.4"
+version = "2.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
+checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
[[package]]
name = "mime"
@@ -2644,22 +2758,22 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "miniz_oxide"
-version = "0.8.5"
+version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5"
+checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
dependencies = [
"adler2",
]
[[package]]
name = "mio"
-version = "1.0.3"
+version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd"
+checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc"
dependencies = [
"libc",
- "wasi 0.11.0+wasi-snapshot-preview1",
- "windows-sys 0.52.0",
+ "wasi",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -2680,11 +2794,11 @@ dependencies = [
"bytes",
"encoding_rs",
"futures-util",
- "http 1.3.1",
+ "http 1.4.0",
"httparse",
"memchr",
"mime",
- "spin",
+ "spin 0.9.8",
"version_check",
]
@@ -2700,7 +2814,7 @@ version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
dependencies = [
- "bitflags 2.9.0",
+ "bitflags 2.10.0",
"cfg-if",
"cfg_aliases 0.2.1",
"libc",
@@ -2724,12 +2838,11 @@ dependencies = [
[[package]]
name = "nu-ansi-term"
-version = "0.46.0"
+version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
+checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
- "overload",
- "winapi",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -2769,9 +2882,9 @@ dependencies = [
[[package]]
name = "num-conv"
-version = "0.1.0"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050"
[[package]]
name = "num-integer"
@@ -2816,28 +2929,34 @@ dependencies = [
[[package]]
name = "num_cpus"
-version = "1.16.0"
+version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
+checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b"
dependencies = [
- "hermit-abi 0.3.9",
+ "hermit-abi",
"libc",
]
[[package]]
name = "object"
-version = "0.36.7"
+version = "0.37.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
+checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"
dependencies = [
"memchr",
]
[[package]]
name = "once_cell"
-version = "1.21.1"
+version = "1.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc"
+checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
+
+[[package]]
+name = "once_cell_polyfill"
+version = "1.70.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
[[package]]
name = "opaque-debug"
@@ -2851,6 +2970,12 @@ 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"
@@ -2859,7 +2984,7 @@ checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8"
dependencies = [
"async-trait",
"crossbeam-channel",
- "dashmap",
+ "dashmap 4.0.2",
"fnv",
"futures-channel",
"futures-executor",
@@ -2928,12 +3053,6 @@ 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"
@@ -2946,50 +3065,25 @@ dependencies = [
[[package]]
name = "parking_lot"
-version = "0.11.2"
+version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-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"
+checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
dependencies = [
"lock_api",
- "parking_lot_core 0.9.10",
+ "parking_lot_core",
]
[[package]]
name = "parking_lot_core"
-version = "0.8.6"
+version = "0.9.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-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"
+checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
dependencies = [
"cfg-if",
"libc",
- "redox_syscall 0.5.10",
+ "redox_syscall",
"smallvec",
- "windows-targets 0.52.6",
+ "windows-link",
]
[[package]]
@@ -3015,43 +3109,54 @@ dependencies = [
]
[[package]]
-name = "paste"
-version = "1.0.15"
+name = "path-absolutize"
+version = "3.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
+checksum = "e4af381fe79fa195b4909485d99f73a80792331df0625188e707854f0b3383f5"
+dependencies = [
+ "path-dedot",
+]
+
+[[package]]
+name = "path-dedot"
+version = "3.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07ba0ad7e047712414213ff67533e6dd477af0a4e1d14fb52343e53d30ea9397"
+dependencies = [
+ "once_cell",
+]
[[package]]
name = "pem"
-version = "3.0.5"
+version = "3.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38af38e8470ac9dee3ce1bae1af9c1671fffc44ddfd8bd1d0a3445bf349a8ef3"
+checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be"
dependencies = [
"base64 0.22.1",
- "serde",
+ "serde_core",
]
[[package]]
name = "percent-encoding"
-version = "2.3.1"
+version = "2.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
+checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
[[package]]
name = "pest"
-version = "2.7.15"
+version = "2.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc"
+checksum = "2c9eb05c21a464ea704b53158d358a31e6425db2f63a1a7312268b05fe2b75f7"
dependencies = [
"memchr",
- "thiserror 2.0.12",
"ucd-trie",
]
[[package]]
name = "pest_derive"
-version = "2.7.15"
+version = "2.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "816518421cfc6887a0d62bf441b6ffb4536fcc926395a69e1a85852d4363f57e"
+checksum = "68f9dbced329c441fa79d80472764b1a2c7e57123553b8519b36663a2fb234ed"
dependencies = [
"pest",
"pest_generator",
@@ -3059,24 +3164,23 @@ dependencies = [
[[package]]
name = "pest_generator"
-version = "2.7.15"
+version = "2.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d1396fd3a870fc7838768d171b4616d5c91f6cc25e377b673d714567d99377b"
+checksum = "3bb96d5051a78f44f43c8f712d8e810adb0ebf923fc9ed2655a7f66f63ba8ee5"
dependencies = [
"pest",
"pest_meta",
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
name = "pest_meta"
-version = "2.7.15"
+version = "2.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea"
+checksum = "602113b5b5e8621770cfd490cfd90b9f84ab29bd2b0e49ad83eb6d186cef2365"
dependencies = [
- "once_cell",
"pest",
"sha2",
]
@@ -3088,7 +3192,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db"
dependencies = [
"fixedbitset",
- "indexmap 2.8.0",
+ "indexmap 2.13.0",
]
[[package]]
@@ -3108,7 +3212,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
@@ -3173,6 +3277,15 @@ 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"
@@ -3185,7 +3298,7 @@ version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
dependencies = [
- "zerocopy 0.8.23",
+ "zerocopy",
]
[[package]]
@@ -3224,9 +3337,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.94"
+version = "1.0.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
+checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
dependencies = [
"unicode-ident",
]
@@ -3241,7 +3354,7 @@ dependencies = [
"fnv",
"lazy_static",
"memchr",
- "parking_lot 0.12.3",
+ "parking_lot",
"protobuf",
"thiserror 1.0.69",
]
@@ -3316,19 +3429,29 @@ dependencies = [
]
[[package]]
-name = "quote"
-version = "1.0.40"
+name = "quick_cache"
+version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
+checksum = "7ada44a88ef953a3294f6eb55d2007ba44646015e18613d2f213016379203ef3"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.16.1",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
dependencies = [
"proc-macro2",
]
[[package]]
name = "r-efi"
-version = "5.2.0"
+version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5"
+checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]]
name = "r2d2"
@@ -3337,15 +3460,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93"
dependencies = [
"log",
- "parking_lot 0.12.3",
+ "parking_lot",
"scheduled-thread-pool",
]
[[package]]
name = "r2d2_sqlite"
-version = "0.24.0"
+version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a982edf65c129796dba72f8775b292ef482b40d035e827a9825b3bc07ccc5f2"
+checksum = "63417e83dc891797eea3ad379f52a5986da4bca0d6ef28baf4d14034dd111b0c"
dependencies = [
"r2d2",
"rusqlite",
@@ -3379,76 +3502,52 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
- "getrandom 0.2.15",
+ "getrandom 0.2.17",
]
[[package]]
name = "redox_syscall"
-version = "0.2.16"
+version = "0.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
dependencies = [
- "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",
+ "bitflags 2.10.0",
]
[[package]]
name = "regex"
-version = "1.11.1"
+version = "1.12.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
+checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
dependencies = [
"aho-corasick",
"memchr",
- "regex-automata 0.4.9",
- "regex-syntax 0.8.5",
+ "regex-automata",
+ "regex-syntax",
]
[[package]]
name = "regex-automata"
-version = "0.1.10"
+version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
-dependencies = [
- "regex-syntax 0.6.29",
-]
-
-[[package]]
-name = "regex-automata"
-version = "0.4.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
+checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
dependencies = [
"aho-corasick",
"memchr",
- "regex-syntax 0.8.5",
+ "regex-syntax",
]
[[package]]
name = "regex-lite"
-version = "0.1.6"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a"
+checksum = "8d942b98df5e658f56f20d592c7f868833fe38115e65c33003d8cd224b0155da"
[[package]]
name = "regex-syntax"
-version = "0.6.29"
+version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
-
-[[package]]
-name = "regex-syntax"
-version = "0.8.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
+checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
[[package]]
name = "reqwest"
@@ -3461,7 +3560,7 @@ dependencies = [
"encoding_rs",
"futures-core",
"futures-util",
- "h2 0.3.26",
+ "h2 0.3.27",
"http 0.2.12",
"http-body 0.4.6",
"hyper 0.14.32",
@@ -3479,7 +3578,7 @@ dependencies = [
"serde_json",
"serde_urlencoded",
"sync_wrapper",
- "system-configuration",
+ "system-configuration 0.5.1",
"tokio",
"tokio-rustls 0.24.1",
"tower-service",
@@ -3498,7 +3597,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"
dependencies = [
"cc",
"cfg-if",
- "getrandom 0.2.15",
+ "getrandom 0.2.17",
"libc",
"untrusted",
"windows-sys 0.52.0",
@@ -3506,22 +3605,19 @@ dependencies = [
[[package]]
name = "rmp"
-version = "0.8.14"
+version = "0.8.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4"
+checksum = "4ba8be72d372b2c9b35542551678538b562e7cf86c3315773cae48dfbfe7790c"
dependencies = [
- "byteorder",
"num-traits",
- "paste",
]
[[package]]
name = "rmp-serde"
-version = "1.3.0"
+version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db"
+checksum = "72f81bee8c8ef9b577d1681a70ebbc962c232461e397b22c208c43c04b67a155"
dependencies = [
- "byteorder",
"rmp",
"serde",
]
@@ -3534,11 +3630,11 @@ checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f"
[[package]]
name = "rusqlite"
-version = "0.31.0"
+version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae"
+checksum = "165ca6e57b20e1351573e3729b958bc62f0e48025386970b6e4d29e7a7e71f3f"
dependencies = [
- "bitflags 2.9.0",
+ "bitflags 2.10.0",
"fallible-iterator",
"fallible-streaming-iterator",
"hashlink",
@@ -3548,9 +3644,15 @@ dependencies = [
[[package]]
name = "rustc-demangle"
-version = "0.1.24"
+version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
+checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d"
+
+[[package]]
+name = "rustc-hash"
+version = "2.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
[[package]]
name = "rustc_version"
@@ -3567,7 +3669,7 @@ version = "0.38.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
dependencies = [
- "bitflags 2.9.0",
+ "bitflags 2.10.0",
"errno",
"libc",
"linux-raw-sys 0.4.15",
@@ -3576,15 +3678,15 @@ dependencies = [
[[package]]
name = "rustix"
-version = "1.0.3"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96"
+checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34"
dependencies = [
- "bitflags 2.9.0",
+ "bitflags 2.10.0",
"errno",
"libc",
- "linux-raw-sys 0.9.3",
- "windows-sys 0.59.0",
+ "linux-raw-sys 0.11.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -3618,10 +3720,10 @@ version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"
dependencies = [
- "openssl-probe",
+ "openssl-probe 0.1.6",
"rustls-pemfile 1.0.4",
"schannel",
- "security-framework",
+ "security-framework 2.11.1",
]
[[package]]
@@ -3630,11 +3732,23 @@ version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5"
dependencies = [
- "openssl-probe",
+ "openssl-probe 0.1.6",
"rustls-pemfile 2.2.0",
"rustls-pki-types",
"schannel",
- "security-framework",
+ "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",
]
[[package]]
@@ -3657,9 +3771,12 @@ dependencies = [
[[package]]
name = "rustls-pki-types"
-version = "1.11.0"
+version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c"
+checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd"
+dependencies = [
+ "zeroize",
+]
[[package]]
name = "rustls-webpki"
@@ -3684,15 +3801,15 @@ dependencies = [
[[package]]
name = "rustversion"
-version = "1.0.20"
+version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2"
+checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
[[package]]
name = "ryu"
-version = "1.0.20"
+version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
+checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984"
[[package]]
name = "same-file"
@@ -3705,11 +3822,11 @@ dependencies = [
[[package]]
name = "schannel"
-version = "0.1.27"
+version = "0.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
+checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1"
dependencies = [
- "windows-sys 0.59.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -3718,7 +3835,7 @@ version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19"
dependencies = [
- "parking_lot 0.12.3",
+ "parking_lot",
]
[[package]]
@@ -3742,7 +3859,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde_derive_internals",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
@@ -3777,8 +3894,21 @@ version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
dependencies = [
- "bitflags 2.9.0",
- "core-foundation",
+ "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",
"core-foundation-sys",
"libc",
"security-framework-sys",
@@ -3786,26 +3916,33 @@ dependencies = [
[[package]]
name = "security-framework-sys"
-version = "2.14.0"
+version = "2.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32"
+checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0"
dependencies = [
"core-foundation-sys",
"libc",
]
[[package]]
-name = "semver"
-version = "1.0.26"
+name = "self_cell"
+version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"
+checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89"
+
+[[package]]
+name = "semver"
+version = "1.0.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
[[package]]
name = "serde"
-version = "1.0.219"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
+checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
+ "serde_core",
"serde_derive",
]
@@ -3821,22 +3958,32 @@ dependencies = [
[[package]]
name = "serde_bytes"
-version = "0.11.17"
+version = "0.11.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96"
+checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8"
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.219"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
+checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
@@ -3847,26 +3994,27 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
name = "serde_json"
-version = "1.0.140"
+version = "1.0.149"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
+checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
dependencies = [
"itoa",
"memchr",
- "ryu",
"serde",
+ "serde_core",
+ "zmij",
]
[[package]]
name = "serde_spanned"
-version = "0.6.8"
+version = "0.6.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
+checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
dependencies = [
"serde",
]
@@ -3889,7 +4037,7 @@ version = "0.9.34+deprecated"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
dependencies = [
- "indexmap 2.8.0",
+ "indexmap 2.13.0",
"itoa",
"ryu",
"serde",
@@ -3909,9 +4057,9 @@ dependencies = [
[[package]]
name = "sha2"
-version = "0.10.8"
+version = "0.10.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
+checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -3935,38 +4083,46 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "signal-hook-registry"
-version = "1.4.2"
+version = "1.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
+checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b"
dependencies = [
+ "errno",
"libc",
]
[[package]]
name = "slab"
-version = "0.4.9"
+version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
-dependencies = [
- "autocfg",
-]
+checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589"
[[package]]
name = "smallvec"
-version = "1.14.0"
+version = "1.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd"
+checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
[[package]]
name = "socket2"
-version = "0.5.8"
+version = "0.5.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8"
+checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678"
dependencies = [
"libc",
"windows-sys 0.52.0",
]
+[[package]]
+name = "socket2"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0"
+dependencies = [
+ "libc",
+ "windows-sys 0.60.2",
+]
+
[[package]]
name = "spin"
version = "0.9.8"
@@ -3974,22 +4130,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
[[package]]
-name = "stable_deref_trait"
-version = "1.2.0"
+name = "spin"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
+checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591"
+
+[[package]]
+name = "stable_deref_trait"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
[[package]]
name = "static_init"
-version = "1.0.3"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6"
+checksum = "8bae1df58c5fea7502e8e352ec26b5579f6178e1fdb311e088580c980dee25ed"
dependencies = [
"bitflags 1.3.2",
- "cfg_aliases 0.1.1",
+ "cfg_aliases 0.2.1",
"libc",
- "parking_lot 0.11.2",
- "parking_lot_core 0.8.6",
+ "parking_lot",
+ "parking_lot_core",
"static_init_macro",
"winapi",
]
@@ -4007,6 +4169,12 @@ dependencies = [
"syn 1.0.109",
]
+[[package]]
+name = "std-semaphore"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ae9eec00137a8eed469fb4148acd9fc6ac8c3f9b110f52cd34698c8b5bfa0e"
+
[[package]]
name = "strsim"
version = "0.11.1"
@@ -4056,9 +4224,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.100"
+version = "2.0.114"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
+checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
dependencies = [
"proc-macro2",
"quote",
@@ -4082,25 +4250,13 @@ dependencies = [
[[package]]
name = "synstructure"
-version = "0.12.6"
+version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
+checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
dependencies = [
"proc-macro2",
"quote",
- "syn 1.0.109",
- "unicode-xid",
-]
-
-[[package]]
-name = "synstructure"
-version = "0.13.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
@@ -4121,8 +4277,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
dependencies = [
"bitflags 1.3.2",
- "core-foundation",
- "system-configuration-sys",
+ "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",
]
[[package]]
@@ -4136,16 +4303,26 @@ dependencies = [
]
[[package]]
-name = "tempfile"
-version = "3.19.1"
+name = "system-configuration-sys"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf"
+checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "tempfile"
+version = "3.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c"
dependencies = [
"fastrand",
- "getrandom 0.3.2",
+ "getrandom 0.3.4",
"once_cell",
- "rustix 1.0.3",
- "windows-sys 0.59.0",
+ "rustix 1.1.3",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -4177,11 +4354,11 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "2.0.12"
+version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"
+checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
dependencies = [
- "thiserror-impl 2.0.12",
+ "thiserror-impl 2.0.18",
]
[[package]]
@@ -4192,55 +4369,54 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
name = "thiserror-impl"
-version = "2.0.12"
+version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
+checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
name = "thread_local"
-version = "1.1.8"
+version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
+checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
dependencies = [
"cfg-if",
- "once_cell",
]
[[package]]
name = "time"
-version = "0.3.40"
+version = "0.3.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d9c75b47bdff86fa3334a3db91356b8d7d86a9b839dab7d0bdc5c3d3a077618"
+checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5"
dependencies = [
"deranged",
"num-conv",
"powerfmt",
- "serde",
+ "serde_core",
"time-core",
"time-macros",
]
[[package]]
name = "time-core"
-version = "0.1.4"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c"
+checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca"
[[package]]
name = "time-macros"
-version = "0.2.21"
+version = "0.2.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "29aa485584182073ed57fd5004aa09c371f021325014694e432313345865fd04"
+checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4"
dependencies = [
"num-conv",
"time-core",
@@ -4254,52 +4430,36 @@ checksum = "a1710e589de0a76aaf295cd47a6699f6405737dbfd3cf2b75c92d000b548d0e6"
[[package]]
name = "tinystr"
-version = "0.7.6"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
+checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869"
dependencies = [
"displaydoc",
"zerovec",
]
-[[package]]
-name = "tinyvec"
-version = "1.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71"
-dependencies = [
- "tinyvec_macros",
-]
-
-[[package]]
-name = "tinyvec_macros"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
-
[[package]]
name = "tokio"
-version = "1.44.1"
+version = "1.49.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a"
+checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86"
dependencies = [
- "backtrace",
"bytes",
"libc",
"mio",
- "parking_lot 0.12.3",
+ "parking_lot",
"pin-project-lite",
"signal-hook-registry",
- "socket2",
+ "socket2 0.6.2",
"tokio-macros",
- "windows-sys 0.52.0",
+ "windows-sys 0.61.2",
]
[[package]]
name = "tokio-io-timeout"
-version = "1.2.0"
+version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf"
+checksum = "0bd86198d9ee903fedd2f9a2e72014287c0d9167e4ae43b5853007205dda1b76"
dependencies = [
"pin-project-lite",
"tokio",
@@ -4307,13 +4467,13 @@ dependencies = [
[[package]]
name = "tokio-macros"
-version = "2.5.0"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
+checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
@@ -4339,9 +4499,9 @@ dependencies = [
[[package]]
name = "tokio-stream"
-version = "0.1.17"
+version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"
+checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70"
dependencies = [
"futures-core",
"pin-project-lite",
@@ -4364,9 +4524,9 @@ dependencies = [
[[package]]
name = "tokio-util"
-version = "0.7.14"
+version = "0.7.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034"
+checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098"
dependencies = [
"bytes",
"futures-core",
@@ -4379,9 +4539,9 @@ dependencies = [
[[package]]
name = "toml"
-version = "0.8.20"
+version = "0.8.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148"
+checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"
dependencies = [
"serde",
"serde_spanned",
@@ -4391,20 +4551,20 @@ dependencies = [
[[package]]
name = "toml_datetime"
-version = "0.6.8"
+version = "0.6.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
+checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
dependencies = [
"serde",
]
[[package]]
name = "toml_edit"
-version = "0.22.24"
+version = "0.22.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474"
+checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
dependencies = [
- "indexmap 2.8.0",
+ "indexmap 2.13.0",
"serde",
"serde_spanned",
"toml_datetime",
@@ -4423,7 +4583,7 @@ dependencies = [
"bytes",
"futures-core",
"futures-util",
- "h2 0.3.26",
+ "h2 0.3.27",
"http 0.2.12",
"http-body 0.4.6",
"hyper 0.14.32",
@@ -4468,7 +4628,7 @@ dependencies = [
"rand",
"slab",
"tokio",
- "tokio-util 0.7.14",
+ "tokio-util 0.7.18",
"tower-layer",
"tower-service",
"tracing",
@@ -4481,7 +4641,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140"
dependencies = [
"base64 0.21.7",
- "bitflags 2.9.0",
+ "bitflags 2.10.0",
"bytes",
"futures-core",
"futures-util",
@@ -4509,9 +4669,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]]
name = "tracing"
-version = "0.1.41"
+version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
+checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
dependencies = [
"log",
"pin-project-lite",
@@ -4521,20 +4681,20 @@ dependencies = [
[[package]]
name = "tracing-attributes"
-version = "0.1.28"
+version = "0.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
+checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
[[package]]
name = "tracing-core"
-version = "0.1.33"
+version = "0.1.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c"
+checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
dependencies = [
"once_cell",
"valuable",
@@ -4550,6 +4710,17 @@ dependencies = [
"tracing",
]
+[[package]]
+name = "tracing-journald"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d3a81ed245bfb62592b1e2bc153e77656d94ee6a0497683a65a12ccaf2438d0"
+dependencies = [
+ "libc",
+ "tracing-core",
+ "tracing-subscriber",
+]
+
[[package]]
name = "tracing-log"
version = "0.2.0"
@@ -4563,14 +4734,14 @@ dependencies = [
[[package]]
name = "tracing-subscriber"
-version = "0.3.19"
+version = "0.3.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008"
+checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
dependencies = [
"matchers",
"nu-ansi-term",
"once_cell",
- "regex",
+ "regex-automata",
"sharded-slab",
"smallvec",
"thread_local",
@@ -4587,9 +4758,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
[[package]]
name = "typenum"
-version = "1.18.0"
+version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"
+checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
[[package]]
name = "ucd-trie"
@@ -4597,26 +4768,11 @@ version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971"
-[[package]]
-name = "unicode-bidi"
-version = "0.3.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5"
-
[[package]]
name = "unicode-ident"
-version = "1.0.18"
+version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
-
-[[package]]
-name = "unicode-normalization"
-version = "0.1.24"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956"
-dependencies = [
- "tinyvec",
-]
+checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
[[package]]
name = "unicode-segmentation"
@@ -4630,12 +4786,6 @@ version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
-[[package]]
-name = "unicode-xid"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
-
[[package]]
name = "universal-hash"
version = "0.5.1"
@@ -4660,21 +4810,16 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "url"
-version = "2.5.4"
+version = "2.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60"
+checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"
dependencies = [
"form_urlencoded",
- "idna 1.0.3",
+ "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"
@@ -4687,36 +4832,13 @@ 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.15",
+ "getrandom 0.2.17",
"rand",
]
@@ -4726,6 +4848,29 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
+[[package]]
+name = "value-log"
+version = "1.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62fc7c4ce161f049607ecea654dca3f2d727da5371ae85e2e4f14ce2b98ed67c"
+dependencies = [
+ "byteorder",
+ "byteview",
+ "interval-heap",
+ "log",
+ "path-absolutize",
+ "rustc-hash",
+ "tempfile",
+ "varint-rs",
+ "xxhash-rust",
+]
+
+[[package]]
+name = "varint-rs"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f54a172d0620933a27a4360d3db3e2ae0dd6cceae9730751a036bbf182c4b23"
+
[[package]]
name = "vcpkg"
version = "0.2.15"
@@ -4765,52 +4910,40 @@ dependencies = [
[[package]]
name = "wasi"
-version = "0.11.0+wasi-snapshot-preview1"
+version = "0.11.1+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
[[package]]
-name = "wasi"
-version = "0.14.2+wasi-0.2.4"
+name = "wasip2"
+version = "1.0.2+wasi-0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"
+checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5"
dependencies = [
- "wit-bindgen-rt",
+ "wit-bindgen",
]
[[package]]
name = "wasm-bindgen"
-version = "0.2.100"
+version = "0.2.108"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
+checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566"
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.50"
+version = "0.4.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61"
+checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f"
dependencies = [
"cfg-if",
+ "futures-util",
"js-sys",
"once_cell",
"wasm-bindgen",
@@ -4819,9 +4952,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.100"
+version = "0.2.108"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
+checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -4829,31 +4962,31 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.100"
+version = "0.2.108"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
+checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55"
dependencies = [
+ "bumpalo",
"proc-macro2",
"quote",
- "syn 2.0.100",
- "wasm-bindgen-backend",
+ "syn 2.0.114",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.100"
+version = "0.2.108"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
+checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12"
dependencies = [
"unicode-ident",
]
[[package]]
name = "web-sys"
-version = "0.3.77"
+version = "0.3.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"
+checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -4889,11 +5022,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
-version = "0.1.9"
+version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
+checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
- "windows-sys 0.59.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -4904,18 +5037,73 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-core"
-version = "0.52.0"
+version = "0.62.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
+checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
dependencies = [
- "windows-targets 0.52.6",
+ "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",
]
[[package]]
name = "windows-link"
-version = "0.1.1"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
+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",
+]
[[package]]
name = "windows-sys"
@@ -4944,6 +5132,24 @@ 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"
@@ -4968,13 +5174,30 @@ dependencies = [
"windows_aarch64_gnullvm 0.52.6",
"windows_aarch64_msvc 0.52.6",
"windows_i686_gnu 0.52.6",
- "windows_i686_gnullvm",
+ "windows_i686_gnullvm 0.52.6",
"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"
@@ -4987,6 +5210,12 @@ 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"
@@ -4999,6 +5228,12 @@ 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"
@@ -5011,12 +5246,24 @@ 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"
@@ -5029,6 +5276,12 @@ 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"
@@ -5041,6 +5294,12 @@ 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"
@@ -5053,6 +5312,12 @@ 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"
@@ -5066,10 +5331,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
-name = "winnow"
-version = "0.7.4"
+name = "windows_x86_64_msvc"
+version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36"
+checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
+
+[[package]]
+name = "winnow"
+version = "0.7.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829"
dependencies = [
"memchr",
]
@@ -5085,25 +5356,16 @@ dependencies = [
]
[[package]]
-name = "wit-bindgen-rt"
-version = "0.39.0"
+name = "wit-bindgen"
+version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-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"
+checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
[[package]]
name = "writeable"
-version = "0.5.5"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
+checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9"
[[package]]
name = "xmlparser"
@@ -5119,11 +5381,10 @@ checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3"
[[package]]
name = "yoke"
-version = "0.7.5"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40"
+checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954"
dependencies = [
- "serde",
"stable_deref_trait",
"yoke-derive",
"zerofrom",
@@ -5131,54 +5392,34 @@ dependencies = [
[[package]]
name = "yoke-derive"
-version = "0.7.5"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
+checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
- "synstructure 0.13.1",
+ "syn 2.0.114",
+ "synstructure",
]
[[package]]
name = "zerocopy"
-version = "0.7.35"
+version = "0.8.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
+checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd"
dependencies = [
- "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",
+ "zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
-version = "0.7.35"
+version = "0.8.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
+checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1"
dependencies = [
"proc-macro2",
"quote",
- "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",
+ "syn 2.0.114",
]
[[package]]
@@ -5198,21 +5439,32 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
- "synstructure 0.13.1",
+ "syn 2.0.114",
+ "synstructure",
]
[[package]]
name = "zeroize"
-version = "1.8.1"
+version = "1.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
+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",
+]
[[package]]
name = "zerovec"
-version = "0.10.4"
+version = "0.11.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079"
+checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002"
dependencies = [
"yoke",
"zerofrom",
@@ -5221,15 +5473,21 @@ dependencies = [
[[package]]
name = "zerovec-derive"
-version = "0.10.3"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
+checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.100",
+ "syn 2.0.114",
]
+[[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"
@@ -5241,18 +5499,18 @@ dependencies = [
[[package]]
name = "zstd-safe"
-version = "7.2.3"
+version = "7.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f3051792fbdc2e1e143244dc28c60f73d8470e93f3f9cbd0ead44da5ed802722"
+checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d"
dependencies = [
"zstd-sys",
]
[[package]]
name = "zstd-sys"
-version = "2.0.14+zstd.1.5.7"
+version = "2.0.16+zstd.1.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fb060d4926e4ac3a3ad15d864e99ceb5f343c6b34f5bd6d81ae6ed417311be5"
+checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748"
dependencies = [
"cc",
"pkg-config",
diff --git a/Cargo.toml b/Cargo.toml
index a7e3e225..df4005a3 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 = "2.0.0", path = "src/api/common" }
-garage_api_admin = { version = "2.0.0", path = "src/api/admin" }
-garage_api_s3 = { version = "2.0.0", path = "src/api/s3" }
-garage_api_k2v = { version = "2.0.0", path = "src/api/k2v" }
-garage_block = { version = "2.0.0", path = "src/block" }
-garage_db = { version = "2.0.0", path = "src/db", default-features = false }
-garage_model = { version = "2.0.0", path = "src/model", default-features = false }
-garage_net = { version = "2.0.0", path = "src/net" }
-garage_rpc = { version = "2.0.0", path = "src/rpc" }
-garage_table = { version = "2.0.0", path = "src/table" }
-garage_util = { version = "2.0.0", path = "src/util" }
-garage_web = { version = "2.0.0", path = "src/web" }
+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" }
k2v-client = { version = "0.0.4", path = "src/k2v-client" }
# External crates from crates.io
@@ -48,18 +48,15 @@ blake2 = "0.10"
bytes = "1.0"
bytesize = "1.1"
cfg-if = "1.0"
-chrono = { version = "0.4", features = ["serde"] }
+chrono = "0.4"
crc32fast = "1.4"
crc32c = "0.6"
-crc64fast-nvme = "1.2"
crypto-common = "0.1"
-err-derive = "0.3"
gethostname = "0.4"
git-version = "0.3.4"
hex = "0.4"
hexdump = "0.1"
hmac = "0.12"
-idna = "0.5"
itertools = "0.12"
ipnet = "2.9.0"
lazy_static = "1.4"
@@ -67,8 +64,8 @@ md-5 = "0.10"
mktemp = "0.5"
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"
@@ -86,12 +83,14 @@ pretty_env_logger = "0.5"
structopt = { version = "0.3", default-features = false }
syslog-tracing = "0.3"
tracing = "0.1"
+tracing-journald = "0.3.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
heed = { version = "0.11", default-features = false, features = ["lmdb"] }
-rusqlite = "0.31.0"
+rusqlite = "0.37"
r2d2 = "0.8"
-r2d2_sqlite = "0.24"
+r2d2_sqlite = "0.31"
+fjall = "2.4"
async-compression = { version = "0.4", features = ["tokio", "zstd"] }
zstd = { version = "0.13", default-features = false }
@@ -102,7 +101,6 @@ 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"] }
@@ -138,7 +136,7 @@ prometheus = "0.13"
aws-sigv4 = { version = "1.1", default-features = false }
hyper-rustls = { version = "0.26", default-features = false, features = ["http1", "http2", "ring", "rustls-native-certs"] }
log = "0.4"
-thiserror = "1.0"
+thiserror = "2.0"
# ---- used only as build / dev dependencies ----
assert-json-diff = "2.0"
@@ -148,12 +146,8 @@ 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 = true
-codegen-units = 1
-opt-level = "s"
-strip = true
+lto = "thin"
+codegen-units = 16
+opt-level = 3
+strip = "debuginfo"
diff --git a/doc/api/garage-admin-v0.html b/doc/api/garage-admin-v0.html
index 4949cc37..dbdd9e1c 100644
--- a/doc/api/garage-admin-v0.html
+++ b/doc/api/garage-admin-v0.html
@@ -1,7 +1,7 @@
- Garage adminstration API v0
+ Garage Adminstration API v0
diff --git a/doc/api/garage-admin-v1.html b/doc/api/garage-admin-v1.html
index a9708e92..783d459e 100644
--- a/doc/api/garage-admin-v1.html
+++ b/doc/api/garage-admin-v1.html
@@ -1,7 +1,7 @@
- Garage adminstration API v1
+ Garage Adminstration API v0
diff --git a/doc/api/garage-admin-v2.html b/doc/api/garage-admin-v2.html
deleted file mode 100644
index 0911f205..00000000
--- a/doc/api/garage-admin-v2.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
- Garage adminstration API v2
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/doc/api/garage-admin-v2.json b/doc/api/garage-admin-v2.json
deleted file mode 100644
index 4e07ed68..00000000
--- a/doc/api/garage-admin-v2.json
+++ /dev/null
@@ -1,4331 +0,0 @@
-{
- "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.0.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": "path",
- "description": "The domain name to check for",
- "required": true
- }
- ],
- "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": "path",
- "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
- "required": true
- }
- ],
- "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": "path",
- "description": "Admin API token ID",
- "required": true
- }
- ],
- "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": "path",
- "description": "ID of the bucket to delete",
- "required": true
- }
- ],
- "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": "path",
- "description": "Access key ID",
- "required": true
- }
- ],
- "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": "path",
- "description": "Admin API token ID",
- "required": true,
- "schema": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- {
- "name": "search",
- "in": "path",
- "description": "Partial token ID or name to search for",
- "required": true,
- "schema": {
- "type": [
- "string",
- "null"
- ]
- }
- }
- ],
- "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": "path",
- "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
- "required": true
- }
- ],
- "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": "path",
- "description": "Exact bucket ID to look up",
- "required": true,
- "schema": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- {
- "name": "globalAlias",
- "in": "path",
- "description": "Global alias of bucket to look up",
- "required": true,
- "schema": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- {
- "name": "search",
- "in": "path",
- "description": "Partial ID or alias to search for",
- "required": true,
- "schema": {
- "type": [
- "string",
- "null"
- ]
- }
- }
- ],
- "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/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": "path",
- "description": "Access key ID",
- "required": true,
- "schema": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- {
- "name": "search",
- "in": "path",
- "description": "Partial key ID or name to search for",
- "required": true,
- "schema": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- {
- "name": "showSecretKey",
- "in": "path",
- "description": "Whether to return the secret access key",
- "required": true,
- "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": "path",
- "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
- "required": true
- }
- ],
- "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": "path",
- "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
- "required": true
- }
- ],
- "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": "path",
- "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
- "required": true
- }
- ],
- "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": "path",
- "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
- "required": true
- }
- ],
- "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": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "key",
- "in": "path",
- "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": "path",
- "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
- "required": true
- }
- ],
- "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": "path",
- "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
- "required": true
- }
- ],
- "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": "path",
- "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
- "required": true
- }
- ],
- "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": "path",
- "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
- "required": true
- }
- ],
- "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": "path",
- "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
- "required": true
- }
- ],
- "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": "path",
- "description": "Node ID to query, or `*` for all nodes, or `self` for the node responding to the request",
- "required": true
- }
- ],
- "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": "path",
- "description": "Admin API token ID",
- "required": true
- }
- ],
- "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": "path",
- "description": "ID of the bucket to update",
- "required": true
- }
- ],
- "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": "path",
- "description": "Access key ID",
- "required": true
- }
- ],
- "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",
- "storageNodesOk",
- "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
- },
- "storageNodesOk": {
- "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)."
- }
- }
- },
- "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"
- ],
- "properties": {
- "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"
- ],
- "properties": {
- "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"
- }
- }
- }
- ]
- },
- "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/connect/apps/index.md b/doc/book/connect/apps/index.md
index 14868373..f52d434b 100644
--- a/doc/book/connect/apps/index.md
+++ b/doc/book/connect/apps/index.md
@@ -12,7 +12,7 @@ In this section, we cover the following web applications:
| [Mastodon](#mastodon) | ✅ | Natively supported |
| [Matrix](#matrix) | ✅ | Tested with `synapse-s3-storage-provider` |
| [ejabberd](#ejabberd) | ✅ | `mod_s3_upload` |
-| [Pixelfed](#pixelfed) | ❓ | Not yet tested |
+| [Pixelfed](#pixelfed) | ✅ | Natively supported |
| [Pleroma](#pleroma) | ❓ | Not yet tested |
| [Lemmy](#lemmy) | ✅ | Supported with pict-rs |
| [Funkwhale](#funkwhale) | ❓ | Not yet tested |
@@ -69,7 +69,7 @@ $CONFIG = array(
'hostname' => '127.0.0.1', // Can also be a domain name, eg. garage.example.com
'port' => 3900, // Put your reverse proxy port or your S3 API port
'use_ssl' => false, // Set it to true if you have a TLS enabled reverse proxy
- 'region' => 'garage', // Garage has only one region named "garage"
+ 'region' => 'garage', // Garage default region is named "garage", edit according to your cluster config
'use_path_style' => true // Garage supports only path style, must be set to true
],
],
@@ -135,7 +135,7 @@ bucket but doesn't also know the secret encryption key.
*Click on the picture to zoom*
Add a new external storage. Put what you want in "folder name" (eg. "shared"). Select "Amazon S3". Keep "Access Key" for the Authentication field.
-In Configuration, put your bucket name (eg. nextcloud), the host (eg. 127.0.0.1), the port (eg. 3900 or 443), the region (garage). Tick the SSL box if you have put an HTTPS proxy in front of garage. You must tick the "Path access" box and you must leave the "Legacy authentication (v2)" box empty. Put your Key ID (eg. GK...) and your Secret Key in the last two input boxes. Finally click on the tick symbol on the right of your screen.
+In Configuration, put your bucket name (eg. nextcloud), the host (eg. 127.0.0.1), the port (eg. 3900 or 443), the region ("garage" if you use the default, or the one your configured in your `garage.toml`). Tick the SSL box if you have put an HTTPS proxy in front of garage. You must tick the "Path access" box and you must leave the "Legacy authentication (v2)" box empty. Put your Key ID (eg. GK...) and your Secret Key in the last two input boxes. Finally click on the tick symbol on the right of your screen.
Now go to your "Files" app and a new "linked folder" has appeared with the name you chose earlier (eg. "shared").
@@ -191,10 +191,10 @@ garage key create peertube-key
Keep the Key ID and the Secret key in a pad, they will be needed later.
-We need two buckets, one for normal videos (named peertube-video) and one for webtorrent videos (named peertube-playlist).
+We need two buckets, one for normal videos (named peertube-videos) and one for webtorrent videos (named peertube-playlists).
```bash
garage bucket create peertube-videos
-garage bucket create peertube-playlist
+garage bucket create peertube-playlists
```
Now we allow our key to read and write on these buckets:
@@ -238,7 +238,7 @@ object_storage:
# Put localhost only if you have a garage instance running on that node
endpoint: 'http://localhost:3900' # or "garage.example.com" if you have TLS on port 443
- # Garage supports only one region for now, named garage
+ # Garage default region is named "garage", edit according to your config
region: 'garage'
credentials:
@@ -253,7 +253,7 @@ object_storage:
proxify_private_files: false
streaming_playlists:
- bucket_name: 'peertube-playlist'
+ bucket_name: 'peertube-playlists'
# Keep it empty for our example
prefix: ''
@@ -441,7 +441,7 @@ media_storage_providers:
store_synchronous: True # do we want to wait that the file has been written before returning?
config:
bucket: matrix # the name of our bucket, we chose matrix earlier
- region_name: garage # only "garage" is supported for the region field
+ region_name: garage # "garage" by default, edit according to your cluster config
endpoint_url: http://localhost:3900 # the path to the S3 endpoint
access_key_id: "GKxxx" # your Key ID
secret_access_key: "xxxx" # your Secret Key
diff --git a/doc/book/connect/backup.md b/doc/book/connect/backup.md
index f39cc3b6..7e97d777 100644
--- a/doc/book/connect/backup.md
+++ b/doc/book/connect/backup.md
@@ -161,3 +161,49 @@ kopia repository validate-provider
You can then run all the standard kopia commands: `kopia snapshot create`, `kopia mount`...
Everything should work out-of-the-box.
+
+## Plakar
+
+Create your key and bucket on Garage server:
+
+```bash
+garage key create my-plakar-key
+garage bucket create plakar-backups
+garage bucket allow plakar-backups --read --write --key my-plakar-key
+…
+```
+
+On Plakar server, add your Garage as a storage location:
+```bash
+plakar store add garageS3 s3://my-garage.tld/plakar-backups \
+region=garage # Or as you've specified in garage.toml \
+access_key= \
+secret_access_key=
+```
+
+Then create the repository.
+```bash
+plakar at @garageS3 create -plaintext # Unencrypted
+# or
+plakar at @garageS3 create #encrypted
+```
+
+If you encrypt your backups (Plakar default), you will need to define a strong passphrase. Do not forget to save your password safely. It will be needed to decrypt your backups.
+
+
+After the repository has been created, check that everything works as expected (that might give an empty result as no file has been added yet, but no error message):
+```bash
+plakar at @garageS3 check
+```
+
+Now that everything is configure, you can use Garage as your backups storage. For instance sync it with a local backup storage:
+```bash
+$ plakar at ~/backups sync to @garageS3
+```
+
+Or list the S3 storage content:
+```bash
+$ plakar at @garageS3 ls
+```
+
+More information in Plakar documentation: https://www.plakar.io/docs/main/quickstart/
diff --git a/doc/book/cookbook/ansible.md b/doc/book/cookbook/ansible.md
index 6d624c9c..8b0d2969 100644
--- a/doc/book/cookbook/ansible.md
+++ b/doc/book/cookbook/ansible.md
@@ -8,18 +8,18 @@ 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) |
-|------------------------------------|---------------------------------------------|---------------------------------------------------------------|
-| **Runtime** | Systemd | Docker |
-| **Target OS** | Any Linux | Any Linux |
-| **Architecture** | amd64, arm64, i686 | amd64, arm64 |
-| **Additional software** | None | Traefik |
-| **Automatic node connection** | ❌ | ✅ |
-| **Layout management** | ❌ | ✅ |
-| **Manage buckets & keys** | ❌ | ✅ (basic) |
-| **Allow custom Garage config** | ✅ | ❌ |
-| **Facilitate Garage upgrades** | ✅ | ❌ |
-| **Multiple instances on one host** | ✅ | ✅ |
+| 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) |
+|------------------------------------|---------------------------------------------|---------------------------------------------------------------|---------------------------------|
+| **Runtime** | Systemd | Docker | Systemd |
+| **Target OS** | Any Linux | Any Linux | Any Linux |
+| **Architecture** | amd64, arm64, i686 | amd64, arm64 | arm64, arm, 386, amd64 |
+| **Additional software** | None | Traefik | Ngnix and Keepalived (optional) |
+| **Automatic node connection** | ❌ | ✅ | ✅ |
+| **Layout management** | ❌ | ✅ | ✅ |
+| **Manage buckets & keys** | ❌ | ✅ (basic) | ✅ |
+| **Allow custom Garage config** | ✅ | ❌ | ❌ |
+| **Facilitate Garage upgrades** | ✅ | ❌ | ✅ |
+| **Multiple instances on one host** | ✅ | ✅ | ❌ |
## zorun/ansible-role-garage
@@ -49,3 +49,15 @@ structured DNS names, etc).
As a result, this role makes it easier to start with Garage on Ansible,
but is less flexible.
+
+## eddster2309/ansible-role-garage
+
+[Source code](https://github.com/eddster2309/ansible-role-garage), [Ansible galaxy](https://galaxy.ansible.com/ui/standalone/roles/eddster2309/garage/)
+
+This role is a opinionated but customisable role using the official Garage
+static binaries and only requires Systemd. As such it should work on any
+Linux based host. It includes all the nesscary configuration to
+automatically setup a clustered Garage deployment. Most Garage
+configuration options are exposed through Ansible variables so while you
+can't provide a custom config you can get very close. It can optionally
+installed a HA nginx deployment with Keepalived.
diff --git a/doc/book/cookbook/binary-packages.md b/doc/book/cookbook/binary-packages.md
index 0a6ad8fc..ce6beb7b 100644
--- a/doc/book/cookbook/binary-packages.md
+++ b/doc/book/cookbook/binary-packages.md
@@ -15,9 +15,10 @@ Alpine Linux repositories (available since v3.17):
apk add garage
```
-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.
+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.
Please note that this package is built without Consul discovery, Kubernetes
discovery, OpenTelemetry exporter, and K2V features (K2V will be enabled once
@@ -26,7 +27,7 @@ it's stable).
## Arch Linux
-Garage is available in the [AUR](https://aur.archlinux.org/packages/garage).
+Garage is available in the official repositories under [extra](https://archlinux.org/packages/extra/x86_64/garage).
## FreeBSD
diff --git a/doc/book/cookbook/kubernetes.md b/doc/book/cookbook/kubernetes.md
index af04e94d..f5bceec8 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/scripts/helm
+cd garage/script/helm
```
Deploy with default options:
@@ -26,6 +26,13 @@ Or deploy with custom values:
helm install --create-namespace --namespace garage garage ./garage -f values.override.yaml
```
+If you want to manage the CustomRessourceDefinition used by garage for its `kubernetes_discovery` outside of the helm chart, add `garage.kubernetesSkipCrd: true` to your custom values and use the kustomization before deploying the helm chart:
+
+```bash
+kubectl apply -k ../k8s/crd
+helm install --create-namespace --namespace garage garage ./garage -f values.override.yaml
+```
+
After deploying, cluster layout must be configured manually as described in [Creating a cluster layout](@/documentation/quick-start/_index.md#creating-a-cluster-layout). Use the following command to access garage CLI:
```bash
diff --git a/doc/book/cookbook/real-world.md b/doc/book/cookbook/real-world.md
index 910c227b..b9927c06 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. `v2.0.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.0.0` but it's up to you
+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
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:v2.0.0
+sudo docker pull dxflrs/garage:v1.3.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:v2.0.0
+ dxflrs/garage:v1.3.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:v2.0.0
+ image: dxflrs/garage:v1.3.0
network_mode: "host"
restart: unless-stopped
volumes:
diff --git a/doc/book/cookbook/systemd.md b/doc/book/cookbook/systemd.md
index c0ed7d1f..ebff8c15 100644
--- a/doc/book/cookbook/systemd.md
+++ b/doc/book/cookbook/systemd.md
@@ -28,6 +28,7 @@ StateDirectory=garage
DynamicUser=true
ProtectHome=true
NoNewPrivileges=true
+LimitNOFILE=42000
[Install]
WantedBy=multi-user.target
diff --git a/doc/book/quick-start/_index.md b/doc/book/quick-start/_index.md
index b94257d5..633b785a 100644
--- a/doc/book/quick-start/_index.md
+++ b/doc/book/quick-start/_index.md
@@ -129,10 +129,10 @@ docker run \
-d \
--name garaged \
-p 3900:3900 -p 3901:3901 -p 3902:3902 -p 3903:3903 \
- -v /etc/garage.toml:/path/to/garage.toml \
- -v /var/lib/garage/meta:/path/to/garage/meta \
- -v /var/lib/garage/data:/path/to/garage/data \
- dxflrs/garage:v2.0.0
+ -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
```
Under Linux, you can substitute `--network host` for `-p 3900:3900 -p 3901:3901 -p 3902:3902 -p 3903:3903`
@@ -182,11 +182,12 @@ ID Hostname Address Tag Zone Capacit
## Creating a cluster layout
Creating a cluster layout for a Garage deployment means informing Garage
-of the disk space available on each node of the cluster
-as well as the zone (e.g. datacenter) each machine is located in.
+of the disk space available on each node of the cluster, `-c`,
+as well as the name of the zone (e.g. datacenter), `-z`, each machine is located in.
-For our test deployment, we are using only one node. The way in which we configure
-it does not matter, you can simply write:
+For our test deployment, we are have only one node with zone named `dc1` and a
+capacity of `1G`, though the capacity is ignored for a single node deployment
+and can be changed later when adding new nodes.
```bash
garage layout assign -z dc1 -c 1G
diff --git a/doc/book/reference-manual/configuration.md b/doc/book/reference-manual/configuration.md
index 6e4daea0..1f583fe6 100644
--- a/doc/book/reference-manual/configuration.md
+++ b/doc/book/reference-manual/configuration.md
@@ -24,7 +24,8 @@ 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
@@ -46,6 +47,7 @@ bootstrap_peers = [
"212fd62eeaca72c122b45a7f4fa0f55e012aa5e24ac384a72a3016413fa724ff@[fc00:F::1]:3901",
]
+allow_punycode = false
[consul_discovery]
api = "catalog"
@@ -80,7 +82,6 @@ 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"
```
@@ -93,29 +94,32 @@ The following gives details about each available configuration option.
[Environment variables](#env_variables).
-Top-level configuration options:
+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_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),
+[`consistency_mode`](#consistency_mode),
[`data_dir`](#data_dir),
[`data_fsync`](#data_fsync),
[`db_engine`](#db_engine),
[`disable_scrub`](#disable_scrub),
-[`use_local_tz`](#use_local_tz),
[`lmdb_map_size`](#lmdb_map_size),
[`metadata_auto_snapshot_interval`](#metadata_auto_snapshot_interval),
[`metadata_dir`](#metadata_dir),
[`metadata_fsync`](#metadata_fsync),
[`metadata_snapshots_dir`](#metadata_snapshots_dir),
[`replication_factor`](#replication_factor),
-[`consistency_mode`](#consistency_mode),
[`rpc_bind_addr`](#rpc_bind_addr),
[`rpc_bind_outgoing`](#rpc_bind_outgoing),
[`rpc_public_addr`](#rpc_public_addr),
[`rpc_public_addr_subnet`](#rpc_public_addr_subnet)
-[`rpc_secret`/`rpc_secret_file`](#rpc_secret).
+[`rpc_secret`/`rpc_secret_file`](#rpc_secret),
+[`use_local_tz`](#use_local_tz).
The `[consul_discovery]` section:
[`api`](#consul_api),
@@ -146,20 +150,23 @@ 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),
### Environment variables {#env_variables}
-The following configuration parameter must be specified as an environment
-variable, it does not exist in the configuration file:
+The following configuration parameters must be specified as environment variables,
+they do not exist in the configuration file:
- `GARAGE_LOG_TO_SYSLOG` (since `v0.9.4`): set this to `1` or `true` to make the
Garage daemon send its logs to `syslog` (using the libc `syslog` function)
instead of printing to stderr.
+- `GARAGE_LOG_TO_JOURNALD` (since `v1.2.0`): set this to `1` or `true` to make the
+ Garage daemon send its logs to `journald` (using the native protocol of `systemd-journald`)
+ instead of printing to stderr.
+
The following environment variables can be used to override the corresponding
values in the configuration file:
@@ -171,7 +178,7 @@ values in the configuration file:
### Top-level configuration options
-#### `replication_factor` {#replication_factor}
+#### `replication_factor` (since `v1.0.0`) {#replication_factor}
The replication factor can be any positive integer smaller or equal the node count in your cluster.
The chosen replication factor has a big impact on the cluster's failure tolerancy and performance characteristics.
@@ -219,7 +226,7 @@ is in progress. In theory, no data should be lost as rebalancing is a
routine operation for Garage, although we cannot guarantee you that everything
will go right in such an extreme scenario.
-#### `consistency_mode` {#consistency_mode}
+#### `consistency_mode` (since `v1.0.0`) {#consistency_mode}
The consistency mode setting determines the read and write behaviour of your cluster.
@@ -329,6 +336,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/` |
| [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.
@@ -365,6 +373,14 @@ LMDB works very well, but is known to have the following limitations:
so it is not the best choice for high-performance storage clusters,
but it should work fine in many cases.
+- 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.**
+
+
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:
@@ -402,6 +418,7 @@ Here is how this option impacts the different database engines:
|----------|------------------------------------|-------------------------------|
| Sqlite | `PRAGMA synchronous = OFF` | `PRAGMA synchronous = NORMAL` |
| LMDB | `MDB_NOMETASYNC` + `MDB_NOSYNC` | `MDB_NOMETASYNC` |
+| Fjall | default options | not supported |
Note that the Sqlite database is always ran in `WAL` mode (`PRAGMA journal_mode = WAL`).
@@ -508,6 +525,37 @@ node.
The default value is 256MiB.
+#### `block_max_concurrent_reads` (since `v1.3.0` / `v2.1.0`) {#block_max_concurrent_reads}
+
+The maximum number of blocks (individual files in the data directory) open
+simultaneously for reading.
+
+Reducing this number does not limit the number of data blocks that can be
+transferred through the network simultaneously. This mechanism was just added
+as a backpressure mechanism for HDD read speed: it helps avoid a situation
+where too many requests are coming in and Garage is reading too many block
+files simultaneously, thus not making timely progress on any of the reads.
+
+When a request to read a data block comes in through the network, the requests
+awaits for one of the `block_max_concurrent_reads` slots to be available
+(internally implemented using a Semaphore object). Once it acquired a read
+slot, it reads the entire block file to RAM and frees the slot as soon as the
+block file is finished reading. Only after the slot is released will the
+block's data start being transferred over the network. If the request fails to
+acquire a reading slot wihtin 15 seconds, it fails with a timeout error.
+Timeout events can be monitored through the `block_read_semaphore_timeouts`
+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,
@@ -606,7 +654,7 @@ be obtained by running `garage node id` and then included directly in the
key will be returned by `garage node id` and you will have to add the IP
yourself.
-### `allow_world_readable_secrets` or `GARAGE_ALLOW_WORLD_READABLE_SECRETS` (env) {#allow_world_readable_secrets}
+#### `allow_world_readable_secrets` or `GARAGE_ALLOW_WORLD_READABLE_SECRETS` (env) {#allow_world_readable_secrets}
Garage checks the permissions of your secret files to make sure they're not
world-readable. In some cases, the check might fail and consider your files as
@@ -618,6 +666,13 @@ permission verification.
Alternatively, you can set the `GARAGE_ALLOW_WORLD_READABLE_SECRETS`
environment variable to `true` to bypass the permissions check.
+#### `allow_punycode` {#allow_punycode}
+
+Allow creating buckets with names containing punycode. When used for buckets served
+as websites, this allows using almost any unicode character in the domain name.
+
+Default to `false`.
+
### The `[consul_discovery]` section
Garage supports discovering other nodes of the cluster using Consul. For this
@@ -769,34 +824,10 @@ 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 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.
+The token for accessing the Metrics endpoint. If this token is not set, 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`.
@@ -805,12 +836,17 @@ 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`.
-#### `metrics_require_token` (since `v2.0.0`) {#admin_metrics_require_token}
+#### `admin_token`, `admin_token_file` or `GARAGE_ADMIN_TOKEN`, `GARAGE_ADMIN_TOKEN_FILE` (env) {#admin_token}
-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.
+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`.
#### `trace_sink` {#admin_trace_sink}
diff --git a/doc/book/reference-manual/s3-compatibility.md b/doc/book/reference-manual/s3-compatibility.md
index d2c47f3e..b869b6f4 100644
--- a/doc/book/reference-manual/s3-compatibility.md
+++ b/doc/book/reference-manual/s3-compatibility.md
@@ -23,17 +23,17 @@ Feel free to open a PR to suggest fixes this table. Minio is missing because the
- 2022-05-25 - Many Ceph S3 endpoints are not documented but implemented. Following a notification from the Ceph community, we added them.
-
## High-level features
| 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/general/latest/gr/signature-version-2.html) (deprecated) | ❌ Missing | ✅ | ✅ | ✅ | ✅ |
+| [signature v2](https://docs.aws.amazon.com/AmazonS3/latest/API/Appendix-Sigv2.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 | ❌| ✅| ✅ | ✅ |
| [Presigned URLs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html) | ✅ Implemented | ❌| ✅ | ✅ | ✅(❓) |
| [SSE-C encryption](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html) | ✅ Implemented | ❓ | ✅ | ❌ | ✅ |
+| [Bucket versioning](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Versioning.html) | ❌ Missing | ✅ | ✅ | ❌ | ✅ |
*Note:* OpenIO does not says if it supports presigned URLs. Because it is part
of signature v4 and they claim they support it without additional precisions,
diff --git a/doc/drafts/admin-api.md b/doc/drafts/admin-api.md
index 0613c535..3ee948cb 100644
--- a/doc/drafts/admin-api.md
+++ b/doc/drafts/admin-api.md
@@ -13,9 +13,8 @@ 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, and was
-changed several times.
-This document applies only to the Garage v2 API (starting with Garage v2.0.0).
+The Garage administration API was introduced in version 0.7.2, this document
+does not apply to older versions of Garage.
## Access control
@@ -53,28 +52,34 @@ 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 `/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.
+See `/v1/health` for an API that also returns JSON output.
### Cluster operations
-#### GetClusterStatus `GET /v2/GetClusterStatus`
+#### GetClusterStatus `GET /v1/status`
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": [
{
@@ -164,7 +169,7 @@ Example response body:
}
```
-#### GetClusterHealth `GET /v2/GetClusterHealth`
+#### GetClusterHealth `GET /v1/health`
Returns the cluster's current health in JSON format, with the following variables:
@@ -197,7 +202,7 @@ Example response body:
}
```
-#### ConnectClusterNodes `POST /v2/ConnectClusterNodes`
+#### ConnectClusterNodes `POST /v1/connect`
Instructs this Garage node to connect to other Garage nodes at specified addresses.
@@ -227,7 +232,7 @@ Example response:
]
```
-#### GetClusterLayout `GET /v2/GetClusterLayout`
+#### GetClusterLayout `GET /v1/layout`
Returns the cluster's current layout in JSON, including:
@@ -288,7 +293,7 @@ Example response body:
}
```
-#### UpdateClusterLayout `POST /v2/UpdateClusterLayout`
+#### UpdateClusterLayout `POST /v1/layout`
Send modifications to the cluster layout. These modifications will
be included in the staged role changes, visible in subsequent calls
@@ -325,7 +330,7 @@ This returns the new cluster layout with the proposed staged changes,
as returned by GetClusterLayout.
-#### ApplyClusterLayout `POST /v2/ApplyClusterLayout`
+#### ApplyClusterLayout `POST /v1/layout/apply`
Applies to the cluster the layout changes currently registered as
staged layout changes.
@@ -345,11 +350,23 @@ 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 /v2/RevertClusterLayout`
+#### RevertClusterLayout `POST /v1/layout/revert`
Clears all of the staged layout changes.
-This requests contains an empty body.
+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 returns the new cluster layout with all changes reverted,
as returned by GetClusterLayout.
@@ -357,7 +374,7 @@ as returned by GetClusterLayout.
### Access key operations
-#### ListKeys `GET /v2/ListKeys`
+#### ListKeys `GET /v1/key`
Returns all API access keys in the cluster.
@@ -376,8 +393,8 @@ Example response:
]
```
-#### GetKeyInfo `GET /v2/GetKeyInfo?id=`
-#### GetKeyInfo `GET /v2/GetKeyInfo?search=`
+#### GetKeyInfo `GET /v1/key?id=`
+#### GetKeyInfo `GET /v1/key?search=`
Returns information about the requested API access key.
@@ -451,7 +468,7 @@ Example response:
}
```
-#### CreateKey `POST /v2/CreateKey`
+#### CreateKey `POST /v1/key`
Creates a new API access key.
@@ -466,7 +483,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 /v2/ImportKey`
+#### ImportKey `POST /v1/key/import`
Imports an existing API key.
This will check that the imported key is in the valid format, i.e.
@@ -484,7 +501,7 @@ Request body format:
This returns the key info in the same format as the result of GetKeyInfo.
-#### UpdateKey `POST /v2/UpdateKey?id=`
+#### UpdateKey `POST /v1/key?id=`
Updates information about the specified API access key.
@@ -506,14 +523,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 `POST /v2/DeleteKey?id=`
+#### DeleteKey `DELETE /v1/key?id=`
Deletes an API access key.
### Bucket operations
-#### ListBuckets `GET /v2/ListBuckets`
+#### ListBuckets `GET /v1/bucket`
Returns all storage buckets in the cluster.
@@ -555,8 +572,8 @@ Example response:
]
```
-#### GetBucketInfo `GET /v2/GetBucketInfo?id=`
-#### GetBucketInfo `GET /v2/GetBucketInfo?globalAlias=`
+#### GetBucketInfo `GET /v1/bucket?id=`
+#### GetBucketInfo `GET /v1/bucket?globalAlias=`
Returns information about the requested storage bucket.
@@ -599,7 +616,7 @@ Example response:
}
```
-#### CreateBucket `POST /v2/CreateBucket`
+#### CreateBucket `POST /v1/bucket`
Creates a new storage bucket.
@@ -639,7 +656,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 `POST /v2/UpdateBucket?id=`
+#### UpdateBucket `PUT /v1/bucket?id=`
Updates configuration of the given bucket.
@@ -671,38 +688,16 @@ 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 `POST /v2/DeleteBucket?id=`
+#### DeleteBucket `DELETE /v1/bucket?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
-#### AllowBucketKey `POST /v2/AllowBucketKey`
+#### BucketAllowKey `POST /v1/bucket/allow`
Allows a key to do read/write/owner operations on a bucket.
@@ -723,7 +718,7 @@ Request body format:
Flags in `permissions` which have the value `true` will be activated.
Other flags will remain unchanged.
-#### DenyBucketKey `POST /v2/DenyBucketKey`
+#### BucketDenyKey `POST /v1/bucket/deny`
Denies a key from doing read/write/owner operations on a bucket.
@@ -747,35 +742,19 @@ Other flags will remain unchanged.
### Operations on bucket aliases
-#### AddBucketAlias `POST /v2/AddBucketAlias`
+#### GlobalAliasBucket `PUT /v1/bucket/alias/global?id=&alias=`
-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.
+Empty body. Creates a global alias for a bucket.
-Request body format:
+#### GlobalUnaliasBucket `DELETE /v1/bucket/alias/global?id=&alias=`
-```json
-{
- "bucketId": "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b",
- "globalAlias": "my-bucket"
-}
-```
+Removes a global alias for a bucket.
-or:
+#### LocalAliasBucket `PUT /v1/bucket/alias/local?id=&accessKeyId=&alias=`
-```json
-{
- "bucketId": "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b",
- "accessKeyId": "GK31c2f218a2e44f485b94239e",
- "localAlias": "my-bucket"
-}
-```
+Empty body. Creates a local alias for a bucket in the namespace of a specific access key.
-#### RemoveBucketAlias `POST /v2/RemoveBucketAlias`
+#### LocalUnaliasBucket `DELETE /v1/bucket/alias/local?id=&accessKeyId&alias=`
-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.
+Removes a local alias for a bucket in the namespace of a specific access key.
-Request body format: same as AddBucketAlias.
diff --git a/flake.lock b/flake.lock
index 2cfbfda4..211b70e0 100644
--- a/flake.lock
+++ b/flake.lock
@@ -50,17 +50,17 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1736692550,
- "narHash": "sha256-7tk8xH+g0sJkKLTJFOxphJxxOjMDFMWv24nXslaU2ro=",
+ "lastModified": 1763977559,
+ "narHash": "sha256-g4MKqsIRy5yJwEsI+fYODqLUnAqIY4kZai0nldAP6EM=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "7c4869c47090dd7f9f1bdfb49a22aea026996815",
+ "rev": "cfe2c7d5b5d3032862254e68c37a6576b633d632",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "7c4869c47090dd7f9f1bdfb49a22aea026996815",
+ "rev": "cfe2c7d5b5d3032862254e68c37a6576b633d632",
"type": "github"
}
},
@@ -80,17 +80,17 @@
]
},
"locked": {
- "lastModified": 1738549608,
- "narHash": "sha256-GdyT9QEUSx5k/n8kILuNy83vxxdyUfJ8jL5mMpQZWfw=",
+ "lastModified": 1763952169,
+ "narHash": "sha256-+PeDBD8P+NKauH+w7eO/QWCIp8Cx4mCfWnh9sJmy9CM=",
"owner": "oxalica",
"repo": "rust-overlay",
- "rev": "35c6f8c4352f995ecd53896200769f80a3e8f22d",
+ "rev": "ab726555a9a72e6dc80649809147823a813fa95b",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
- "rev": "35c6f8c4352f995ecd53896200769f80a3e8f22d",
+ "rev": "ab726555a9a72e6dc80649809147823a813fa95b",
"type": "github"
}
},
diff --git a/flake.nix b/flake.nix
index fc599e0b..01a077c4 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,13 +2,13 @@
description =
"Garage, an S3-compatible distributed object store for self-hosted deployments";
- # Nixpkgs 24.11 as of 2025-01-12
+ # Nixpkgs 25.05 as of 2025-11-24
inputs.nixpkgs.url =
- "github:NixOS/nixpkgs/7c4869c47090dd7f9f1bdfb49a22aea026996815";
+ "github:NixOS/nixpkgs/cfe2c7d5b5d3032862254e68c37a6576b633d632";
- # Rust overlay as of 2025-02-03
+ # Rust overlay as of 2025-11-24
inputs.rust-overlay.url =
- "github:oxalica/rust-overlay/35c6f8c4352f995ecd53896200769f80a3e8f22d";
+ "github:oxalica/rust-overlay/ab726555a9a72e6dc80649809147823a813fa95b";
inputs.rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
inputs.crane.url = "github:ipetkov/crane";
@@ -30,6 +30,10 @@
inherit system nixpkgs crane rust-overlay extraTestEnv;
release = false;
}).garage-test;
+ lints = (compile {
+ inherit system nixpkgs crane rust-overlay;
+ release = false;
+ });
in
{
packages = {
@@ -53,6 +57,13 @@
tests-sqlite = testWith {
GARAGE_TEST_INTEGRATION_DB_ENGINE = "sqlite";
};
+ 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 ----
diff --git a/nix/compile.nix b/nix/compile.nix
index 8cd88d01..c6df9dbd 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.82.0".default.override {
+ toolchainFn = (p: p.rust-bin.stable."1.91.0".default.override {
targets = lib.optionals (target != null) [ rustTarget ];
extensions = [
"rust-src"
@@ -68,12 +68,13 @@ let
rootFeatures = if features != null then
features
else
- ([ "bundled-libs" "lmdb" "sqlite" "k2v" ] ++ (lib.optionals release [
+ ([ "bundled-libs" "lmdb" "sqlite" "fjall" "k2v" ] ++ (lib.optionals release [
"consul-discovery"
"kubernetes-discovery"
"metrics"
"telemetry-otlp"
"syslog"
+ "journald"
]));
featuresStr = lib.concatStringsSep "," rootFeatures;
@@ -189,4 +190,15 @@ 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 82e73652..708c2c43 100755
--- a/script/dev-bucket.sh
+++ b/script/dev-bucket.sh
@@ -17,19 +17,13 @@ else
fi
$GARAGE_BIN -c /tmp/config.1.toml bucket create eprouvette
-if [ "$GARAGE_OLDVER" = "v08" ]; then
+if [ "$GARAGE_08" = "1" ]; then
KEY_INFO=$($GARAGE_BIN -c /tmp/config.1.toml key new --name 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]+$'`
-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`
+ KEY_INFO=$($GARAGE_BIN -c /tmp/config.1.toml key create opérateur)
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-configure.sh b/script/dev-configure.sh
index 86fa84c5..0649cdbe 100755
--- a/script/dev-configure.sh
+++ b/script/dev-configure.sh
@@ -29,7 +29,7 @@ until $GARAGE_BIN -c /tmp/config.1.toml status 2>&1|grep -q HEALTHY ; do
sleep 1
done
-if [ "$GARAGE_OLDVER" = "v08" ]; then
+if [ "$GARAGE_08" = "1" ]; 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 808f9cf1..41f1fdde 100644
--- a/script/dev-env-aws.sh
+++ b/script/dev-env-aws.sh
@@ -1,6 +1,7 @@
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 5fe180a0..b3a7b921 100644
--- a/script/helm/garage/Chart.yaml
+++ b/script/helm/garage/Chart.yaml
@@ -1,24 +1,18 @@
apiVersion: v2
name: garage
description: S3-compatible object store for small self-hosted geo-distributed deployments
-
-# A chart can be either an 'application' or a 'library' chart.
-#
-# Application charts are a collection of templates that can be packaged into versioned archives
-# to be deployed.
-#
-# Library charts provide useful utilities or functions for the chart developer. They're included as
-# a dependency of application charts to inject those utilities and functions into the rendering
-# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
+version: 0.7.3
+appVersion: "v1.3.1"
+home: https://garagehq.deuxfleurs.fr/
+icon: https://garagehq.deuxfleurs.fr/images/garage-logo.svg
-# This is the chart version. This version number should be incremented each time you make changes
-# to the chart and its templates, including the app version.
-# Versions are expected to follow Semantic Versioning (https://semver.org/)
-version: 0.8.0
+keywords:
+- geo-distributed
+- read-after-write-consistency
+- s3-compatible
-# This is the version number of the application being deployed. This version number should be
-# incremented each time you make changes to the application. Versions are not expected to
-# follow Semantic Versioning. They should reflect the version the application is using.
-# It is recommended to use it with quotes.
-appVersion: "v2.0.0"
+sources:
+- https://git.deuxfleurs.fr/Deuxfleurs/garage.git
+
+maintainers: []
diff --git a/script/helm/garage/README.md b/script/helm/garage/README.md
index c2eb086f..bdf69ec4 100644
--- a/script/helm/garage/README.md
+++ b/script/helm/garage/README.md
@@ -1,9 +1,15 @@
# garage
-  
+  
S3-compatible object store for small self-hosted geo-distributed deployments
+**Homepage:**
+
+## Source Code
+
+*
+
## Values
| Key | Type | Default | Description |
@@ -23,6 +29,7 @@ S3-compatible object store for small self-hosted geo-distributed deployments
| 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.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 |
@@ -49,6 +56,7 @@ S3-compatible object store for small self-hosted geo-distributed deployments
| initImage.pullPolicy | string | `"IfNotPresent"` | |
| initImage.repository | string | `"busybox"` | |
| initImage.tag | string | `"stable"` | |
+| livenessProbe | object | `{}` | Specifies a livenessProbe |
| monitoring.metrics.enabled | bool | `false` | If true, a service for monitoring is created with a prometheus.io/scrape annotation |
| monitoring.metrics.serviceMonitor.enabled | bool | `false` | If true, a ServiceMonitor CRD is created for a prometheus operator https://github.com/coreos/prometheus-operator |
| monitoring.metrics.serviceMonitor.interval | string | `"15s"` | |
@@ -71,6 +79,7 @@ S3-compatible object store for small self-hosted geo-distributed deployments
| podSecurityContext.runAsGroup | int | `1000` | |
| podSecurityContext.runAsNonRoot | bool | `true` | |
| podSecurityContext.runAsUser | int | `1000` | |
+| readinessProbe | object | `{}` | Specifies a readinessProbe |
| resources | object | `{}` | |
| securityContext.capabilities | object | `{"drop":["ALL"]}` | The default security context is heavily restricted, feel free to tune it to your requirements |
| securityContext.readOnlyRootFilesystem | bool | `true` | |
diff --git a/script/helm/garage/templates/configmap.yaml b/script/helm/garage/templates/configmap.yaml
index 81ca205e..ab5b84db 100644
--- a/script/helm/garage/templates/configmap.yaml
+++ b/script/helm/garage/templates/configmap.yaml
@@ -19,6 +19,10 @@ data:
compression_level = {{ .Values.garage.compressionLevel }}
+ {{- if .Values.garage.metadataAutoSnapshotInterval }}
+ metadata_auto_snapshot_interval = {{ .Values.garage.metadataAutoSnapshotInterval | quote }}
+ {{- end }}
+
rpc_bind_addr = "{{ .Values.garage.rpcBindAddr }}"
# rpc_secret will be populated by the init container from a k8s secret object
rpc_secret = "__RPC_SECRET_REPLACE__"
diff --git a/script/helm/garage/templates/service.yaml b/script/helm/garage/templates/service.yaml
index 37218872..887c90d0 100644
--- a/script/helm/garage/templates/service.yaml
+++ b/script/helm/garage/templates/service.yaml
@@ -4,6 +4,10 @@ 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:
@@ -37,4 +41,4 @@ spec:
name: metrics
selector:
{{- include "garage.selectorLabels" . | nindent 4 }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/script/helm/garage/templates/workload.yaml b/script/helm/garage/templates/workload.yaml
index cb9e76a2..d144cb41 100644
--- a/script/helm/garage/templates/workload.yaml
+++ b/script/helm/garage/templates/workload.yaml
@@ -78,15 +78,14 @@ spec:
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
- # TODO
- # livenessProbe:
- # httpGet:
- # path: /
- # port: 3900
- # readinessProbe:
- # httpGet:
- # path: /
- # port: 3900
+ {{- with .Values.livenessProbe }}
+ livenessProbe:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
+ {{- with .Values.readinessProbe }}
+ readinessProbe:
+ {{- toYaml . | nindent 12 }}
+ {{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
diff --git a/script/helm/garage/values.yaml b/script/helm/garage/values.yaml
index 38715e38..5e419fe2 100644
--- a/script/helm/garage/values.yaml
+++ b/script/helm/garage/values.yaml
@@ -21,6 +21,10 @@ garage:
# 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.
+ # https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#metadata_auto_snapshot_interval
+ metadataAutoSnapshotInterval: ""
+
rpcBindAddr: "[::]:3901"
# -- If not given, a random secret will be generated and stored in a Secret object
rpcSecret: ""
@@ -120,6 +124,8 @@ service:
# - NodePort (+ Ingress)
# - LoadBalancer
type: ClusterIP
+ # -- Annotations to add to the service
+ annotations: {}
s3:
api:
port: 3900
@@ -191,6 +197,21 @@ resources: {}
# cpu: 100m
# memory: 512Mi
+# -- Specifies a livenessProbe
+livenessProbe: {}
+ #httpGet:
+ # path: /health
+ # port: 3903
+ #initialDelaySeconds: 5
+ #periodSeconds: 30
+# -- Specifies a readinessProbe
+readinessProbe: {}
+ #httpGet:
+ # path: /health
+ # port: 3903
+ #initialDelaySeconds: 5
+ #periodSeconds: 30
+
nodeSelector: {}
tolerations: []
diff --git a/script/k8s/crd/garagenodes.deuxfleurs.fr.yaml b/script/k8s/crd/garagenodes.deuxfleurs.fr.yaml
new file mode 100644
index 00000000..cd0fb166
--- /dev/null
+++ b/script/k8s/crd/garagenodes.deuxfleurs.fr.yaml
@@ -0,0 +1,43 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ name: garagenodes.deuxfleurs.fr
+spec:
+ conversion:
+ strategy: None
+ group: deuxfleurs.fr
+ names:
+ kind: GarageNode
+ listKind: GarageNodeList
+ plural: garagenodes
+ singular: garagenode
+ scope: Namespaced
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Auto-generated derived type for Node via `CustomResource`
+ properties:
+ spec:
+ properties:
+ address:
+ format: ip
+ type: string
+ hostname:
+ type: string
+ port:
+ format: uint16
+ minimum: 0
+ type: integer
+ required:
+ - address
+ - hostname
+ - port
+ type: object
+ required:
+ - spec
+ title: GarageNode
+ type: object
+ served: true
+ storage: true
+ subresources: {}
\ No newline at end of file
diff --git a/script/k8s/crd/kustomization.yaml b/script/k8s/crd/kustomization.yaml
new file mode 100644
index 00000000..9f20eccf
--- /dev/null
+++ b/script/k8s/crd/kustomization.yaml
@@ -0,0 +1,5 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+
+resources:
+- garagenodes.deuxfleurs.fr.yaml
\ No newline at end of file
diff --git a/script/test-upgrade.sh b/script/test-upgrade.sh
index 8f66ab8b..dc25e7c6 100755
--- a/script/test-upgrade.sh
+++ b/script/test-upgrade.sh
@@ -24,17 +24,9 @@ echo "============= insert data into old version cluster ================="
export GARAGE_BIN=/tmp/old_garage
if echo $OLD_VERSION | grep 'v0\.8\.'; then
echo "Detected Garage v0.8.x"
- export GARAGE_OLDVER=v08
-elif (echo $OLD_VERSION | grep 'v0\.9\.') || (echo $OLD_VERSION | grep 'v1\.'); then
- echo "Detected Garage v0.9.x / v1.x"
- export GARAGE_OLDVER=v1
+ export GARAGE_08=1
fi
-if echo $OLD_VERSION | grep 'v1\.'; then
- DO_SSEC_TEST=1
-fi
-SSEC_KEY="u8zCfnEyt5Imo/krN+sxA1DQXxLWtPJavU6T6gOVj1Y="
-
echo "⏳ Setup cluster using old version"
$GARAGE_BIN --version
${SCRIPT_FOLDER}/dev-clean.sh
@@ -45,23 +37,7 @@ ${SCRIPT_FOLDER}/dev-bucket.sh
echo "🛠️ Inserting data in old cluster"
source ${SCRIPT_FOLDER}/dev-env-rclone.sh
-rclone copy "${SCRIPT_FOLDER}/../.git/" garage:eprouvette/test_dotgit \
- --stats=1s --stats-log-level=NOTICE --stats-one-line
-
-if [ "$DO_SSEC_TEST" = "1" ]; then
- # upload small file (should be single part)
- rclone copy "${SCRIPT_FOLDER}/test-upgrade.sh" garage:eprouvette/test-ssec \
- --s3-sse-customer-algorithm AES256 \
- --s3-sse-customer-key-base64 "$SSEC_KEY" \
- --stats=1s --stats-log-level=NOTICE --stats-one-line
- # do a multipart upload
- dd if=/dev/urandom of=/tmp/randfile-for-upgrade bs=5M count=5
- rclone copy "/tmp/randfile-for-upgrade" garage:eprouvette/test-ssec \
- --s3-chunk-size 5M \
- --s3-sse-customer-algorithm AES256 \
- --s3-sse-customer-key-base64 "$SSEC_KEY" \
- --stats=1s --stats-log-level=NOTICE --stats-one-line
-fi
+rclone copy "${SCRIPT_FOLDER}/../.git/" garage:eprouvette/test_dotgit --stats=1s --stats-log-level=NOTICE --stats-one-line
echo "🏁 Stopping old cluster"
killall -INT old_garage
@@ -71,7 +47,7 @@ killall -9 old_garage || true
echo "🏁 Removing old garage version"
rm -rv $GARAGE_BIN
export -n GARAGE_BIN
-export -n GARAGE_OLDVER
+export -n GARAGE_08
echo "================ read data from new cluster ==================="
@@ -84,8 +60,7 @@ ${SCRIPT_FOLDER}/dev-cluster.sh >> /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"
@@ -93,23 +68,6 @@ 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 cfccfe94..c3dedca8 100644
--- a/shell.nix
+++ b/shell.nix
@@ -34,6 +34,8 @@ in
jq
];
shellHook = ''
+ export AWS_REQUEST_CHECKSUM_CALCULATION='when_required'
+
function to_s3 {
aws \
--endpoint-url https://garage.deuxfleurs.fr \
diff --git a/src/api/admin/Cargo.toml b/src/api/admin/Cargo.toml
index 1b1fab13..656c6825 100644
--- a/src/api/admin/Cargo.toml
+++ b/src/api/admin/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "garage_api_admin"
-version = "2.0.0"
+version = "1.3.1"
authors = ["Alex Auvolat "]
edition = "2018"
license = "AGPL-3.0"
@@ -14,9 +14,7 @@ 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
@@ -24,11 +22,8 @@ garage_api_common.workspace = true
argon2.workspace = true
async-trait.workspace = true
-bytesize.workspace = true
-chrono.workspace = true
-err-derive.workspace = true
+thiserror.workspace = true
hex.workspace = true
-paste.workspace = true
tracing.workspace = true
futures.workspace = true
@@ -39,7 +34,6 @@ url.workspace = true
serde.workspace = true
serde_json.workspace = true
-utoipa.workspace = true
opentelemetry.workspace = true
opentelemetry-prometheus = { workspace = true, optional = true }
@@ -47,4 +41,3 @@ 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
deleted file mode 100644
index 082d942a..00000000
--- a/src/api/admin/admin_token.rs
+++ /dev/null
@@ -1,235 +0,0 @@
-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.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()],
- },
- );
- }
-
- if garage.config.admin.metrics_token.is_some() {
- res.insert(
- 1,
- GetAdminTokenInfoResponse {
- id: None,
- created: None,
- name: "metrics_token (from daemon configuration)".into(),
- expiration: None,
- expired: false,
- scope: vec!["Metrics".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)
- }
-}
-
-// ---- 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
deleted file mode 100644
index 1766ae28..00000000
--- a/src/api/admin/api.rs
+++ /dev/null
@@ -1,1311 +0,0 @@
-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::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,
-
- // 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,
-}
-
-// **********************************************
-// 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)]
-pub struct CheckDomainRequest {
- 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_ok: 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)]
-#[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)]
-pub struct UpdateAdminTokenRequest {
- pub id: String,
- 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)]
-pub struct DeleteAdminTokenRequest {
- pub id: String,
-}
-
-#[derive(Debug, Clone, Serialize, Deserialize)]
-pub struct DeleteAdminTokenResponse;
-
-// **********************************************
-// 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)]
-#[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)]
-pub struct UpdateKeyRequest {
- pub id: String,
- 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)]
-pub struct DeleteKeyRequest {
- 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)]
-#[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)]
-pub struct UpdateBucketRequest {
- pub id: String,
- 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)]
-pub struct DeleteBucketRequest {
- 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)]
-#[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),
-}
-
-#[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,
-}
diff --git a/src/api/admin/api_server.rs b/src/api/admin/api_server.rs
index 14029423..6f0c474f 100644
--- a/src/api/admin/api_server.rs
+++ b/src/api/admin/api_server.rs
@@ -1,230 +1,333 @@
-use std::borrow::Cow;
+use std::collections::HashMap;
use std::sync::Arc;
-use http::header::{HeaderValue, ACCESS_CONTROL_ALLOW_ORIGIN, AUTHORIZATION};
-use hyper::{body::Incoming as IncomingBody, Request, Response};
-use serde::{Deserialize, Serialize};
+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 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::{Endpoint as RpcEndpoint, *};
-use garage_table::EmptyKey;
-use garage_util::background::BackgroundRunner;
-use garage_util::data::Uuid;
+use garage_rpc::system::ClusterHealthStatus;
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::api::*;
+use crate::bucket::*;
+use crate::cluster::*;
use crate::error::*;
+use crate::key::*;
use crate::router_v0;
-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 ----
+use crate::router_v1::{Authorization, Endpoint};
pub type ResBody = BoxBody;
pub struct AdminApiServer {
garage: Arc,
#[cfg(feature = "metrics")]
- pub(crate) exporter: PrometheusExporter,
+ 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,
- ) -> Arc {
+ ) -> Self {
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);
- let metrics_require_token = cfg.metrics_require_token;
-
- let endpoint = garage.system.netapp.endpoint(ADMIN_RPC_PATH.into());
- let admin = Arc::new(Self {
+ 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: Arc,
+ self,
bind_addr: UnixOrTCPSocketAddress,
must_exit: watch::Receiver,
) -> Result<(), GarageError> {
let region = self.garage.config.s3_api.s3_region.clone();
- ApiServer::new(region, ArcAdminApiServer(self))
+ ApiServer::new(region, self)
.run_server(bind_addr, Some(0o220), must_exit)
.await
}
- async fn handle_http_api(
+ 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(
&self,
req: Request,
- endpoint: HttpEndpoint,
) -> Result, Error> {
- let auth_header = req.headers().get(AUTHORIZATION).cloned();
+ 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 request = match endpoint {
- HttpEndpoint::Old(endpoint_v1) => AdminApiRequest::from_v1(endpoint_v1, req).await?,
- HttpEndpoint::New(_) => AdminApiRequest::from_request(req).await?,
+ 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 (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,
+ 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",
),
- 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
+ );
- if token_required {
- verify_authorization(&self.garage, global_token_hash, auth_header, request.name())?;
- }
+ Ok(Response::builder()
+ .status(status)
+ .header(http::header::CONTENT_TYPE, "text/plain")
+ .body(string_body(status_str))?)
+ }
- 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)
- }
+ 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()))?)
}
+ #[cfg(not(feature = "metrics"))]
+ Err(Error::bad_request(
+ "Garage was built without the metrics feature".to_string(),
+ ))
}
}
-struct ArcAdminApiServer(Arc);
-
-impl ApiHandler for ArcAdminApiServer {
+impl ApiHandler for AdminApiServer {
const API_NAME: &'static str = "admin";
const API_NAME_DISPLAY: &'static str = "Admin";
- type Endpoint = HttpEndpoint;
+ type Endpoint = Endpoint;
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)?;
- 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))
+ Endpoint::from_v0(endpoint_v0)
} else {
- Ok(HttpEndpoint::New(req.uri().path().to_string()))
+ Endpoint::from_request(req)
}
}
async fn handle(
&self,
req: Request,
- endpoint: HttpEndpoint,
+ endpoint: Endpoint,
) -> Result, Error> {
- self.0.handle_http_api(req, endpoint).await
+ 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),
+ },
+ };
+
+ 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,
+ }
}
}
-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()),
- }
+impl ApiEndpoint for Endpoint {
+ fn name(&self) -> &'static str {
+ Endpoint::name(self)
}
fn add_span_attributes(&self, _span: SpanRef<'_>) {}
@@ -244,87 +347,20 @@ fn hash_bearer_token(token: &str) -> String {
.to_string()
}
-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};
+fn verify_bearer_token(token: &hyper::http::HeaderValue, password_hash: &str) -> Result<(), Error> {
+ use argon2::{password_hash::PasswordVerifier, Argon2};
- let invalid_msg = "Invalid bearer token";
+ let parsed_hash = PasswordHash::new(&password_hash).unwrap();
- let token = match &auth_header {
- None => {
- return Err(Error::forbidden(
- "Bearer token must be provided in Authorization header",
- ))
- }
- Some(authorization) => authorization
- .to_str()?
- .strip_prefix("Bearer ")
- .ok_or_else(|| Error::forbidden("Invalid Authorization header"))?
- .trim(),
- };
-
- 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()))
- .filter(|p| p.has_scope(endpoint_name))
- .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))?;
+ token
+ .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(())
}
-
-pub(crate) fn find_matching_nodes(garage: &Garage, spec: &str) -> Result, Error> {
- let mut res = vec![];
- if spec == "*" {
- res = garage.system.cluster_layout().all_nodes().to_vec();
- for node in garage.system.get_known_nodes() {
- if node.is_up && !res.contains(&node.id) {
- res.push(node.id);
- }
- }
- } else if spec == "self" {
- res.push(garage.system.id);
- } else {
- let layout = garage.system.cluster_layout();
- let known_nodes = garage.system.get_known_nodes();
- let all_nodes = layout
- .all_nodes()
- .iter()
- .copied()
- .chain(known_nodes.iter().filter(|x| x.is_up).map(|x| x.id));
- for node in all_nodes {
- if !res.contains(&node) && hex::encode(node).starts_with(spec) {
- res.push(node);
- }
- }
- if res.is_empty() {
- return Err(Error::bad_request(format!("No nodes matching {}", spec)));
- }
- if res.len() > 1 {
- return Err(Error::bad_request(format!(
- "Multiple nodes matching {}: {:?}",
- spec, res
- )));
- }
- }
- Ok(res)
-}
diff --git a/src/api/admin/block.rs b/src/api/admin/block.rs
deleted file mode 100644
index 4b8edc63..00000000
--- a/src/api/admin/block.rs
+++ /dev/null
@@ -1,276 +0,0 @@
-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;
-
- 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;
- }
- }
- }
- }
-
- Ok(LocalPurgeBlocksResponse {
- blocks_purged: self.0.len() as u64,
- 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 b0fd101b..207693b6 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 chrono::DateTime;
+use hyper::{body::Incoming as IncomingBody, Request, Response, StatusCode};
+use serde::{Deserialize, Serialize};
use garage_util::crdt::*;
use garage_util::data::*;
@@ -18,603 +18,102 @@ 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::*;
+use crate::api_server::ResBody;
use crate::error::*;
-use crate::{Admin, RequestHandler};
+use crate::key::ApiBucketKeyPerm;
-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) {
- 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) {
- 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
- .unset_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)
+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,
+ )
.await?;
- bucket_info_results(garage, bucket.id).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::>(),
+ }
+ })
+ .collect::>();
+
+ Ok(json_ok_response(&res)?)
}
-// ---- BUCKET ALIASES ----
+#[derive(Serialize)]
+#[serde(rename_all = "camelCase")]
+struct ListBucketResultItem {
+ id: String,
+ global_aliases: Vec,
+ local_aliases: Vec,
+}
-impl RequestHandler for AddBucketAliasRequest {
- type Response = AddBucketAliasResponse;
+#[derive(Serialize)]
+#[serde(rename_all = "camelCase")]
+struct BucketLocalAlias {
+ access_key_id: String,
+ alias: String,
+}
- async fn handle(
- self,
- garage: &Arc,
- _admin: &Admin,
- ) -> Result {
- let bucket_id = parse_bucket_id(&self.bucket_id)?;
+#[derive(Serialize, Deserialize)]
+#[serde(rename_all = "camelCase")]
+struct ApiBucketQuotas {
+ max_size: Option,
+ max_objects: Option,
+}
- 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?
- }
+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)",
+ ));
}
+ };
- Ok(AddBucketAliasResponse(
- bucket_info_results(garage, bucket_id).await?,
- ))
- }
+ 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 {
+) -> Result, Error> {
let bucket = garage
.bucket_helper()
.get_existing_bucket(bucket_id)
@@ -623,7 +122,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();
@@ -631,7 +130,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();
@@ -677,65 +176,407 @@ async fn bucket_info_results(
let state = bucket.state.as_option().unwrap();
let quotas = state.quotas.get();
- 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()
- .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 =
+ 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,
}
- })
- .collect::>(),
- objects: *counters.get(OBJECTS).unwrap_or(&0),
- bytes: *counters.get(BYTES).unwrap_or(&0),
- unfinished_uploads: *counters.get(UNFINISHED_UPLOADS).unwrap_or(&0),
- unfinished_multipart_uploads: *mpu_counters.get(mpu_table::UPLOADS).unwrap_or(&0),
- unfinished_multipart_upload_parts: *mpu_counters.get(mpu_table::PARTS).unwrap_or(&0),
- unfinished_multipart_upload_bytes: *mpu_counters.get(mpu_table::BYTES).unwrap_or(&0),
- quotas: ApiBucketQuotas {
- max_size: quotas.max_size,
- max_objects: quotas.max_objects,
- },
- };
+ }),
+ 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::>(),
+ }
+ })
+ .collect::>(),
+ objects: *counters.get(OBJECTS).unwrap_or(&0),
+ bytes: *counters.get(BYTES).unwrap_or(&0),
+ unfinished_uploads: *counters.get(UNFINISHED_UPLOADS).unwrap_or(&0),
+ unfinished_multipart_uploads: *mpu_counters.get(mpu_table::UPLOADS).unwrap_or(&0),
+ unfinished_multipart_upload_parts: *mpu_counters.get(mpu_table::PARTS).unwrap_or(&0),
+ unfinished_multipart_upload_bytes: *mpu_counters.get(mpu_table::BYTES).unwrap_or(&0),
+ quotas: ApiBucketQuotas {
+ max_size: quotas.max_size,
+ max_objects: quotas.max_objects,
+ },
+ };
- Ok(res)
+ Ok(json_ok_response(&res)?)
}
+#[derive(Serialize)]
+#[serde(rename_all = "camelCase")]
+struct GetBucketInfoResult {
+ id: String,
+ global_aliases: Vec,
+ website_access: bool,
+ #[serde(default)]
+ website_config: Option,
+ keys: Vec,
+ objects: i64,
+ bytes: i64,
+ unfinished_uploads: i64,
+ unfinished_multipart_uploads: i64,
+ unfinished_multipart_upload_parts: i64,
+ unfinished_multipart_upload_bytes: i64,
+ quotas: ApiBucketQuotas,
+}
+
+#[derive(Serialize)]
+#[serde(rename_all = "camelCase")]
+struct GetBucketInfoWebsiteResult {
+ index_document: String,
+ error_document: Option,
+}
+
+#[derive(Serialize)]
+#[serde(rename_all = "camelCase")]
+struct GetBucketInfoKey {
+ access_key_id: String,
+ name: String,
+ permissions: ApiBucketKeyPerm,
+ bucket_local_aliases: Vec,
+}
+
+pub async fn handle_create_bucket(
+ garage: &Arc