From 909f0d57fb289a520ee8d6a09ea9e557a5e89b64 Mon Sep 17 00:00:00 2001 From: houseme Date: Wed, 27 May 2026 11:25:28 +0800 Subject: [PATCH] feat: improve degraded readiness reporting and shutdown handling (#3089) * fix(server): unify runtime readiness and shutdown flow * refactor(server): decouple readiness shared types * refactor(server): keep readiness types crate-private * refactor(server): await protocol shutdown handles * fix(server): bypass cached startup readiness * feat(health): expose degraded readiness reasons * fix(health): preserve raw IAM readiness in degraded reports --- Cargo.lock | 657 +++++++++--------- Cargo.toml | 16 +- .../bucket/lifecycle/bucket_lifecycle_ops.rs | 6 +- rustfs/src/admin/console.rs | 13 +- rustfs/src/admin/handlers/health.rs | 80 ++- rustfs/src/server/layer.rs | 17 +- rustfs/src/server/mod.rs | 3 + rustfs/src/server/readiness.rs | 75 +- 8 files changed, 492 insertions(+), 375 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6187a83f1..7cefb518e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -33,16 +33,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" -[[package]] -name = "aead" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" -dependencies = [ - "crypto-common 0.1.7", - "generic-array 0.14.7", -] - [[package]] name = "aead" version = "0.6.0-rc.10" @@ -73,34 +63,22 @@ dependencies = [ "cipher 0.5.2", "cpubits", "cpufeatures 0.3.0", + "zeroize", ] [[package]] name = "aes-gcm" -version = "0.10.3" +version = "0.11.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +checksum = "da8c919c118108f144adecad74b425b804ad075580d605d9b33c2d6d1c62a2f8" dependencies = [ - "aead 0.5.2", - "aes 0.8.4", - "cipher 0.4.4", - "ctr 0.9.2", - "ghash 0.5.1", - "subtle", -] - -[[package]] -name = "aes-gcm" -version = "0.11.0-rc.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22c0c90bbe8d4f77c3ca9ddabe41a1f8382d6fc1f7cea89459d0f320371f972" -dependencies = [ - "aead 0.6.0-rc.10", + "aead", "aes 0.9.0", "cipher 0.5.2", - "ctr 0.10.1", - "ghash 0.6.0", + "ctr", + "ghash", "subtle", + "zeroize", ] [[package]] @@ -178,9 +156,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "amq-protocol" -version = "10.6.1" +version = "10.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81833d7f9d250dda1ca55020d6dad20f5a242ad917dd6edd7c21f626424653a5" +checksum = "2eab68e8836c5812a01b34c5364d28db50bf686b442e902d9d93e4472318d86e" dependencies = [ "amq-protocol-tcp", "amq-protocol-types", @@ -192,9 +170,9 @@ dependencies = [ [[package]] name = "amq-protocol-tcp" -version = "10.6.1" +version = "10.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "889012b5e973bffd57bd668a9b184c2713754024ff1719164788e61ecb4450b5" +checksum = "8689f976dbd9864922f4f53e01ad2b43700ed3eb1bb5667b260522f291434dae" dependencies = [ "amq-protocol-uri", "async-rs", @@ -205,9 +183,9 @@ dependencies = [ [[package]] name = "amq-protocol-types" -version = "10.6.1" +version = "10.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356da5abbf8f1ad806d6eb77161ad2c878d892d74f756021c5002973303abb05" +checksum = "27894e9e57d07f701251aeee3d2ab3d7d114bc830bf722d6626027eb55f3b222" dependencies = [ "cookie-factory", "nom 8.0.0", @@ -217,9 +195,9 @@ dependencies = [ [[package]] name = "amq-protocol-uri" -version = "10.6.1" +version = "10.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c4982c5c729761a6e9c1464c2da53094c07e9cf45aa3daceb2620e17b1fce9" +checksum = "64fd5ca63f1b8cba2309aaec8595483c36f3a671225d5ab9fe8265adb9213514" dependencies = [ "amq-protocol-types", "percent-encoding", @@ -277,7 +255,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -288,7 +266,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -321,18 +299,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03918c3dbd7701a85c6b9887732e2921175f26c350b4563841d0958c21d57e6d" -[[package]] -name = "argon2" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072" -dependencies = [ - "base64ct", - "blake2 0.10.6", - "cpufeatures 0.2.17", - "password-hash 0.5.0", -] - [[package]] name = "argon2" version = "0.6.0-rc.8" @@ -342,7 +308,7 @@ dependencies = [ "base64ct", "blake2 0.11.0-rc.6", "cpufeatures 0.3.0", - "password-hash 0.6.1", + "password-hash", ] [[package]] @@ -714,9 +680,9 @@ dependencies = [ [[package]] name = "async-nats" -version = "0.48.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31811585c7c5bc2f60f8b80d5a6b0f737115611dac47567d7f7d94562ebb180b" +checksum = "407486109ea5cfdf53fde05f46996dadf0547518a4d49f050d25f405ae31ed2d" dependencies = [ "base64 0.22.1", "bytes", @@ -866,7 +832,7 @@ dependencies = [ "bytes", "fastrand", "hex", - "http 1.4.0", + "http 1.4.1", "sha1 0.10.6", "time", "tokio", @@ -929,7 +895,7 @@ dependencies = [ "bytes-utils", "fastrand", "http 0.2.12", - "http 1.4.0", + "http 1.4.1", "http-body 0.4.6", "http-body 1.0.1", "percent-encoding", @@ -963,7 +929,7 @@ dependencies = [ "hex", "hmac 0.13.0", "http 0.2.12", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "lru 0.16.4", "percent-encoding", @@ -992,7 +958,7 @@ dependencies = [ "bytes", "fastrand", "http 0.2.12", - "http 1.4.0", + "http 1.4.1", "regex-lite", "tracing", ] @@ -1016,7 +982,7 @@ dependencies = [ "bytes", "fastrand", "http 0.2.12", - "http 1.4.0", + "http 1.4.1", "regex-lite", "tracing", ] @@ -1041,7 +1007,7 @@ dependencies = [ "aws-types", "fastrand", "http 0.2.12", - "http 1.4.0", + "http 1.4.1", "regex-lite", "tracing", ] @@ -1063,7 +1029,7 @@ dependencies = [ "hex", "hmac 0.13.0", "http 0.2.12", - "http 1.4.0", + "http 1.4.1", "p256 0.13.2", "percent-encoding", "sha2 0.11.0", @@ -1095,7 +1061,7 @@ dependencies = [ "bytes", "crc-fast", "hex", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "http-body-util", "md-5 0.11.0", @@ -1129,7 +1095,7 @@ dependencies = [ "bytes-utils", "futures-core", "futures-util", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "http-body-util", "percent-encoding", @@ -1148,7 +1114,7 @@ dependencies = [ "aws-smithy-runtime-api", "aws-smithy-types", "h2", - "http 1.4.0", + "http 1.4.1", "hyper", "hyper-rustls", "hyper-util", @@ -1208,7 +1174,7 @@ dependencies = [ "bytes", "fastrand", "http 0.2.12", - "http 1.4.0", + "http 1.4.1", "http-body 0.4.6", "http-body 1.0.1", "http-body-util", @@ -1229,7 +1195,7 @@ dependencies = [ "aws-smithy-types", "bytes", "http 0.2.12", - "http 1.4.0", + "http 1.4.1", "pin-project-lite", "tokio", "tracing", @@ -1255,7 +1221,7 @@ checksum = "7442cb268338f0eb8278140a107c046756aa01093d8ef5e99628d34ae09c94f5" dependencies = [ "aws-smithy-runtime-api", "aws-smithy-types", - "http 1.4.0", + "http 1.4.1", ] [[package]] @@ -1269,7 +1235,7 @@ dependencies = [ "bytes-utils", "futures-core", "http 0.2.12", - "http 1.4.0", + "http 1.4.1", "http-body 0.4.6", "http-body 1.0.1", "http-body-util", @@ -1318,7 +1284,7 @@ dependencies = [ "bytes", "form_urlencoded", "futures-util", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "http-body-util", "hyper", @@ -1349,7 +1315,7 @@ checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" dependencies = [ "bytes", "futures-core", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "http-body-util", "mime", @@ -1426,13 +1392,13 @@ checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" [[package]] name = "bcrypt-pbkdf" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeac2e1fe888769f34f05ac343bbef98b14d1ffb292ab69d4608b3abc86f2a2" +checksum = "144e573728da132683b9488acd528274c790e07fc06ff81ee29f9d8f8b1041e0" dependencies = [ "blowfish", - "pbkdf2 0.12.2", - "sha2 0.10.9", + "pbkdf2 0.13.0", + "sha2 0.11.0", ] [[package]] @@ -1525,7 +1491,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.9", ] [[package]] @@ -1544,7 +1510,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.9", ] [[package]] @@ -1571,12 +1537,12 @@ dependencies = [ [[package]] name = "blowfish" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e412e2cd0f2b2d93e02543ceae7917b3c70331573df19ee046bcbc35e45e87d7" +checksum = "62ce3946557b35e71d1bbe07ec385073ce9eda05043f95de134eb578fcf1a298" dependencies = [ "byteorder", - "cipher 0.4.4", + "cipher 0.5.2", ] [[package]] @@ -1785,17 +1751,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" -[[package]] -name = "chacha20" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" -dependencies = [ - "cfg-if", - "cipher 0.4.4", - "cpufeatures 0.2.17", -] - [[package]] name = "chacha20" version = "0.10.0" @@ -1806,6 +1761,7 @@ dependencies = [ "cipher 0.5.2", "cpufeatures 0.3.0", "rand_core 0.10.1", + "zeroize", ] [[package]] @@ -1814,10 +1770,10 @@ version = "0.11.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c9ed179664f12fd6f155f6dd632edf5f3806d48c228c67ff78366f2a0eb6b5e" dependencies = [ - "aead 0.6.0-rc.10", - "chacha20 0.10.0", + "aead", + "chacha20", "cipher 0.5.2", - "poly1305 0.9.0", + "poly1305", ] [[package]] @@ -1877,7 +1833,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "crypto-common 0.1.7", + "crypto-common 0.1.6", "inout 0.1.4", ] @@ -1890,6 +1846,7 @@ dependencies = [ "block-buffer 0.12.0", "crypto-common 0.2.2", "inout 0.2.2", + "zeroize", ] [[package]] @@ -2332,7 +2289,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.9", "rand_core 0.6.4", "subtle", "zeroize", @@ -2357,11 +2314,11 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.9", "typenum", ] @@ -2408,15 +2365,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher 0.4.4", -] - [[package]] name = "ctr" version = "0.10.1" @@ -3292,7 +3240,7 @@ dependencies = [ "futures-util", "headers", "htmlescape", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "http-body-util", "libc", @@ -3504,6 +3452,15 @@ dependencies = [ "cipher 0.4.4", ] +[[package]] +name = "des" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916a94e407b54f9034d71dd748234cd1e516ced6284009906ae246f177eafe5a" +dependencies = [ + "cipher 0.5.2", +] + [[package]] name = "dial9-macro" version = "0.3.6" @@ -3578,7 +3535,7 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", "const-oid 0.9.6", - "crypto-common 0.1.7", + "crypto-common 0.1.6", "subtle", ] @@ -3673,7 +3630,7 @@ dependencies = [ "flatbuffers", "flate2", "futures", - "http 1.4.0", + "http 1.4.1", "md5 0.8.0", "rand 0.10.1", "rcgen", @@ -3806,7 +3763,7 @@ dependencies = [ "crypto-bigint 0.5.5", "digest 0.10.7", "ff", - "generic-array 0.14.7", + "generic-array 0.14.9", "group", "hkdf 0.12.4", "pem-rfc7468 0.7.0", @@ -3949,7 +3906,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -4270,9 +4227,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.7" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" dependencies = [ "typenum", "version_check", @@ -4285,7 +4242,7 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dab9e9188e97a93276e1fe7b56401b851e2b45a46d045ca658100c1303ada649" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.9", "rustversion", "typenum", ] @@ -4345,23 +4302,13 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "ghash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" -dependencies = [ - "opaque-debug", - "polyval 0.6.2", -] - [[package]] name = "ghash" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eecf2d5dc9b66b732b97707a0210906b1d30523eb773193ab777c0c84b3e8d5" dependencies = [ - "polyval 0.7.1", + "polyval", ] [[package]] @@ -4421,7 +4368,7 @@ dependencies = [ "google-cloud-gax", "hex", "hmac 0.13.0", - "http 1.4.0", + "http 1.4.1", "jsonwebtoken", "reqwest", "rustc_version", @@ -4447,7 +4394,7 @@ dependencies = [ "futures", "google-cloud-rpc", "google-cloud-wkt", - "http 1.4.0", + "http 1.4.1", "pin-project", "rand 0.10.1", "serde", @@ -4469,7 +4416,7 @@ dependencies = [ "google-cloud-rpc", "google-cloud-wkt", "h2", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "http-body-util", "hyper", @@ -4580,7 +4527,7 @@ dependencies = [ "google-cloud-type", "google-cloud-wkt", "hex", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "hyper", "md5 0.8.0", @@ -4651,7 +4598,7 @@ dependencies = [ "fnv", "futures-core", "futures-sink", - "http 1.4.0", + "http 1.4.1", "indexmap 2.14.0", "slab", "tokio", @@ -4738,7 +4685,7 @@ dependencies = [ "base64 0.22.1", "bytes", "headers-core", - "http 1.4.0", + "http 1.4.1", "httpdate", "mime", "sha1 0.10.6", @@ -4750,7 +4697,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" dependencies = [ - "http 1.4.0", + "http 1.4.1", ] [[package]] @@ -4948,9 +4895,9 @@ dependencies = [ [[package]] name = "http" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +checksum = "8be7462df143984c4598a256ef469b251d7d7f9e271135073e78fc535414f3d0" dependencies = [ "bytes", "itoa", @@ -4974,7 +4921,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.4.0", + "http 1.4.1", ] [[package]] @@ -4985,7 +4932,7 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "pin-project-lite", ] @@ -5031,7 +4978,7 @@ dependencies = [ "futures-channel", "futures-core", "h2", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "httparse", "httpdate", @@ -5048,7 +4995,7 @@ version = "0.27.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" dependencies = [ - "http 1.4.0", + "http 1.4.1", "hyper", "hyper-util", "log", @@ -5083,7 +5030,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "hyper", "ipnet", @@ -5307,7 +5254,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ "block-padding 0.3.3", - "generic-array 0.14.7", + "generic-array 0.14.9", ] [[package]] @@ -5335,35 +5282,6 @@ version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" -[[package]] -name = "internal-russh-forked-ssh-key" -version = "0.6.18+upstream-0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25f8a978272e3cbdf4768f7363eb1c8e1e6ba63c52a3ed05e29e222da4aec7cb" -dependencies = [ - "argon2 0.5.3", - "bcrypt-pbkdf", - "crypto-bigint 0.7.3", - "ecdsa 0.17.0-rc.18", - "ed25519-dalek 3.0.0-pre.7", - "hex", - "hmac 0.13.0", - "num-bigint-dig", - "p256 0.14.0-rc.9", - "p384 0.14.0-rc.9", - "p521", - "rand_core 0.10.1", - "rsa 0.10.0-rc.18", - "sec1 0.8.1", - "sha1 0.11.0", - "sha2 0.11.0", - "signature 3.0.0", - "ssh-cipher", - "ssh-encoding", - "subtle", - "zeroize", -] - [[package]] name = "internal-russh-num-bigint" version = "0.5.0" @@ -5426,7 +5344,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -5493,9 +5411,9 @@ dependencies = [ [[package]] name = "jiff" -version = "0.2.24" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00b5dbd620d61dfdcb6007c9c1f6054ebd75319f163d886a9055cec1155073d" +checksum = "392c70591e8749fe235ddaf513e6f58b26bce3dcc16524cecc8936f75afa161e" dependencies = [ "jiff-static", "jiff-tzdb-platform", @@ -5503,14 +5421,14 @@ dependencies = [ "portable-atomic", "portable-atomic-util", "serde_core", - "windows-sys 0.59.0", + "windows-link", ] [[package]] name = "jiff-static" -version = "0.2.24" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e000de030ff8022ea1da3f466fbb0f3a809f5e51ed31f6dd931c35181ad8e6d7" +checksum = "47b605b0c050d845fc355bb11eb3f9a8deddc218ea60c76e61aa1f2adfb2c96a" dependencies = [ "proc-macro2", "quote", @@ -5974,9 +5892,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.29" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "616ec5685824bcc94416c6d4a7a446eea774a31efd7062c8480ba6fd06d7a6e5" [[package]] name = "lru" @@ -5996,6 +5914,15 @@ dependencies = [ "hashbrown 0.16.1", ] +[[package]] +name = "lru" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a860605968fce16869fd239cf4237a82f3ac470723415db603b0e8b6c8d4fb9" +dependencies = [ + "hashbrown 0.17.1", +] + [[package]] name = "lru-slab" version = "0.1.2" @@ -6424,8 +6351,9 @@ dependencies = [ [[package]] name = "mysql_async" -version = "0.36.1" -source = "git+https://github.com/blackbeam/mysql_async?rev=2bad388283bc3ce48801fc2ffcd22445eb6f3d24#2bad388283bc3ce48801fc2ffcd22445eb6f3d24" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3519e91b0d254ac1ffa495bc42053286cb2172ad7241d5b3b1b9f8a891f21ee2" dependencies = [ "bytes", "crossbeam-queue", @@ -6435,7 +6363,7 @@ dependencies = [ "futures-sink", "futures-util", "keyed_priority_queue", - "lru 0.16.4", + "lru 0.18.0", "mysql_common", "percent-encoding", "rand 0.10.1", @@ -6687,7 +6615,6 @@ dependencies = [ "num-iter", "num-traits", "rand 0.8.6", - "serde", "smallvec", "zeroize", ] @@ -6812,10 +6739,10 @@ version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51e219e79014df21a225b1860a479e2dcd7cbd9130f4defd4bd0e191ea31d67d" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "chrono", "getrandom 0.2.17", - "http 1.4.0", + "http 1.4.1", "rand 0.8.6", "serde", "serde_json", @@ -6922,7 +6849,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "http 1.4.0", + "http 1.4.1", "humantime", "itertools 0.14.0", "parking_lot 0.12.5", @@ -6967,12 +6894,6 @@ version = "11.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - [[package]] name = "openidconnect" version = "4.0.1" @@ -6984,7 +6905,7 @@ dependencies = [ "dyn-clone", "ed25519-dalek 2.2.0", "hmac 0.12.1", - "http 1.4.0", + "http 1.4.1", "itertools 0.10.5", "log", "oauth2", @@ -7059,7 +6980,7 @@ checksum = "5683015d09e2df236ef005b17f6f196f0d5f6313c4fa43a7b6a53b52776e4331" dependencies = [ "async-trait", "bytes", - "http 1.4.0", + "http 1.4.1", "opentelemetry 0.32.0", "reqwest", ] @@ -7071,11 +6992,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9966929966d17620d7c316c643ba62631826e10021409357772d5eea84f62c35" dependencies = [ "flate2", - "http 1.4.0", + "http 1.4.1", "opentelemetry 0.32.0", "opentelemetry-http", "opentelemetry-proto", - "opentelemetry_sdk 0.32.0", + "opentelemetry_sdk 0.32.1", "prost 0.14.3", "reqwest", "thiserror 2.0.18", @@ -7088,7 +7009,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56d658ba1faf63f7b9c492cfbe6e0ec365440a16132d3270c1065f7b33f1b638" dependencies = [ "opentelemetry 0.32.0", - "opentelemetry_sdk 0.32.0", + "opentelemetry_sdk 0.32.1", "prost 0.14.3", ] @@ -7112,7 +7033,7 @@ checksum = "a1b1c6a247d79091f0062a5f4bd058589525cf987a8d4c169440d9c1be72f0ad" dependencies = [ "chrono", "opentelemetry 0.32.0", - "opentelemetry_sdk 0.32.0", + "opentelemetry_sdk 0.32.1", ] [[package]] @@ -7132,9 +7053,9 @@ dependencies = [ [[package]] name = "opentelemetry_sdk" -version = "0.32.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368afaed344110f40b179bb8fbe54bc52d98f9bd2b281799ef32487c2650c956" +checksum = "9b59f80e1ac4d5ff7a2db8fb6c80badb7f0f3f858211fba08dd9aaec750894f9" dependencies = [ "futures-channel", "futures-executor", @@ -7188,7 +7109,7 @@ dependencies = [ "cbc 0.1.2", "cms", "der 0.7.10", - "des", + "des 0.8.1", "hex", "hmac 0.12.1", "pkcs12", @@ -7278,16 +7199,18 @@ dependencies = [ [[package]] name = "pageant" -version = "0.2.0" -source = "git+https://github.com/Eugeny/russh?rev=fc6e3ab4cd4338e94ae64e17aeed2acee9335e6b#fc6e3ab4cd4338e94ae64e17aeed2acee9335e6b" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f3a5ae18f65a85c67a77d18d42d3606c07948e3c17c1e5f74852b26589e88a5" dependencies = [ + "base16ct 1.0.0", "byteorder", "bytes", "delegate", "futures", "log", "rand 0.10.1", - "sha2 0.10.9", + "sha2 0.11.0", "thiserror 2.0.18", "tokio", "windows", @@ -7384,17 +7307,6 @@ dependencies = [ "zstd", ] -[[package]] -name = "password-hash" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" -dependencies = [ - "base64ct", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "password-hash" version = "0.6.1" @@ -7757,17 +7669,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" -[[package]] -name = "poly1305" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" -dependencies = [ - "cpufeatures 0.2.17", - "opaque-debug", - "universal-hash 0.5.1", -] - [[package]] name = "poly1305" version = "0.9.0" @@ -7775,19 +7676,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a00baa632505d05512f48a963e16051c54fda9a95cc9acea1a4e3c90991c4a2e" dependencies = [ "cpufeatures 0.3.0", - "universal-hash 0.6.1", -] - -[[package]] -name = "polyval" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" -dependencies = [ - "cfg-if", - "cpufeatures 0.2.17", - "opaque-debug", - "universal-hash 0.5.1", + "universal-hash", + "zeroize", ] [[package]] @@ -7798,7 +7688,7 @@ checksum = "7dfc63250416fea14f5749b90725916a6c903f599d51cb635aa7a52bfd03eede" dependencies = [ "cpubits", "cpufeatures 0.3.0", - "universal-hash 0.6.1", + "universal-hash", ] [[package]] @@ -8415,7 +8305,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -8476,7 +8366,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" dependencies = [ - "chacha20 0.10.0", + "chacha20", "getrandom 0.4.2", "rand_core 0.10.1", "serde", @@ -8798,9 +8688,9 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "reqwest" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e0021ea2c22aed41653bc7e1419abb2c97e038ff2c33d0e1309e49a97deec0" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ "base64 0.22.1", "bytes", @@ -8809,7 +8699,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "http-body-util", "hyper", @@ -8964,7 +8854,7 @@ dependencies = [ "async-tungstenite", "futures-io", "futures-util", - "http 1.4.0", + "http 1.4.1", "rustls-native-certs", "rustls-pki-types", "rustls-webpki", @@ -8994,7 +8884,7 @@ dependencies = [ "flume", "futures-io", "futures-util", - "http 1.4.0", + "http 1.4.1", "log", "mqttbytes-core-next", "rumqttc-core-next", @@ -9009,29 +8899,25 @@ dependencies = [ [[package]] name = "russh" -version = "0.60.3" -source = "git+https://github.com/Eugeny/russh?rev=fc6e3ab4cd4338e94ae64e17aeed2acee9335e6b#fc6e3ab4cd4338e94ae64e17aeed2acee9335e6b" +version = "0.61.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f67013f080c226e5a34db1c71f2567f44d95a6300005bb6cd4e2c8fe3c326d1b" dependencies = [ - "aead 0.6.0-rc.10", - "aes 0.8.4", "aes 0.9.0", - "aes-gcm 0.11.0-rc.3", "aws-lc-rs", "bitflags 2.11.1", - "block-padding 0.3.3", + "block-padding 0.4.2", "byteorder", "bytes", - "cbc 0.1.2", "cbc 0.2.1", "cipher 0.5.2", "crypto-bigint 0.7.3", - "ctr 0.10.1", - "ctr 0.9.2", + "ctr", "curve25519-dalek 5.0.0-pre.6", "data-encoding", "delegate", "der 0.8.0", - "digest 0.10.7", + "digest 0.11.3", "ecdsa 0.17.0-rc.18", "ed25519-dalek 3.0.0-pre.7", "elliptic-curve 0.14.0-rc.32", @@ -9040,13 +8926,11 @@ dependencies = [ "futures", "generic-array 1.4.1", "getrandom 0.2.17", - "ghash 0.6.0", + "ghash", "hex-literal", "hkdf 0.13.0", - "hmac 0.12.1", "hmac 0.13.0", "inout 0.1.4", - "internal-russh-forked-ssh-key", "internal-russh-num-bigint", "keccak", "log", @@ -9058,12 +8942,11 @@ dependencies = [ "p384 0.14.0-rc.9", "p521", "pageant", - "pbkdf2 0.12.2", "pbkdf2 0.13.0", "pkcs1 0.8.0-rc.4", "pkcs5 0.8.0", "pkcs8 0.11.0", - "polyval 0.7.1", + "polyval", "rand 0.10.1", "rand_core 0.10.1", "rsa 0.10.0-rc.18", @@ -9072,26 +8955,26 @@ dependencies = [ "salsa20 0.11.0", "scrypt 0.12.0", "sec1 0.8.1", - "sha1 0.10.6", "sha1 0.11.0", - "sha2 0.10.9", "sha2 0.11.0", "sha3", "signature 3.0.0", "spki 0.8.0", "ssh-encoding", + "ssh-key", "subtle", "thiserror 2.0.18", "tokio", "typenum", - "universal-hash 0.6.1", + "universal-hash", "zeroize", ] [[package]] name = "russh-cryptovec" -version = "0.60.3" -source = "git+https://github.com/Eugeny/russh?rev=fc6e3ab4cd4338e94ae64e17aeed2acee9335e6b#fc6e3ab4cd4338e94ae64e17aeed2acee9335e6b" +version = "0.61.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "443f6bbcfacb34a1aab2b12b99bf08e0c63abdc5a0db261901365df9d57fff51" dependencies = [ "log", "nix 0.31.3", @@ -9122,7 +9005,8 @@ dependencies = [ [[package]] name = "russh-util" version = "0.52.0" -source = "git+https://github.com/Eugeny/russh?rev=fc6e3ab4cd4338e94ae64e17aeed2acee9335e6b#fc6e3ab4cd4338e94ae64e17aeed2acee9335e6b" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668424a5dde0bcb45b55ba7de8476b93831b4aa2fa6947e145f3b053e22c60b6" dependencies = [ "chrono", "tokio", @@ -9211,7 +9095,7 @@ dependencies = [ name = "rustfs" version = "1.0.0-beta.4" dependencies = [ - "aes-gcm 0.11.0-rc.3", + "aes-gcm", "anyhow", "astral-tokio-tar", "async-trait", @@ -9231,7 +9115,7 @@ dependencies = [ "futures-util", "hashbrown 0.17.1", "hex-simd", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "http-body-util", "hyper", @@ -9247,7 +9131,7 @@ dependencies = [ "mimalloc", "mime_guess", "opentelemetry 0.32.0", - "opentelemetry_sdk 0.32.0", + "opentelemetry_sdk 0.32.1", "percent-encoding", "pin-project-lite", "pprof-pyroscope-fork", @@ -9356,7 +9240,7 @@ dependencies = [ "base64-simd", "bytes", "crc-fast", - "http 1.4.0", + "http 1.4.1", "md-5 0.11.0", "pretty_assertions", "sha1 0.11.0", @@ -9414,8 +9298,8 @@ dependencies = [ name = "rustfs-crypto" version = "1.0.0-beta.4" dependencies = [ - "aes-gcm 0.11.0-rc.3", - "argon2 0.6.0-rc.8", + "aes-gcm", + "argon2", "base64-simd", "chacha20poly1305", "jsonwebtoken", @@ -9445,7 +9329,7 @@ dependencies = [ name = "rustfs-ecstore" version = "1.0.0-beta.4" dependencies = [ - "aes-gcm 0.11.0-rc.3", + "aes-gcm", "async-channel", "async-recursion", "async-trait", @@ -9471,7 +9355,7 @@ dependencies = [ "google-cloud-storage", "hex-simd", "hmac 0.13.0", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "http-body-util", "hyper", @@ -9484,7 +9368,7 @@ dependencies = [ "metrics", "num_cpus", "opentelemetry 0.32.0", - "opentelemetry_sdk 0.32.0", + "opentelemetry_sdk 0.32.1", "parking_lot 0.12.5", "path-absolutize", "pin-project-lite", @@ -9576,7 +9460,7 @@ dependencies = [ "anyhow", "async-trait", "futures", - "http 1.4.0", + "http 1.4.1", "metrics", "rustfs-common", "rustfs-config", @@ -9605,7 +9489,7 @@ dependencies = [ "async-trait", "base64-simd", "futures", - "http 1.4.0", + "http 1.4.1", "jsonwebtoken", "moka", "openidconnect", @@ -9710,7 +9594,7 @@ version = "1.0.0-beta.4" dependencies = [ "bytes", "futures", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "http-body-util", "hyper", @@ -9733,7 +9617,7 @@ dependencies = [ name = "rustfs-kms" version = "1.0.0-beta.4" dependencies = [ - "aes-gcm 0.11.0-rc.3", + "aes-gcm", "arc-swap", "async-trait", "base64 0.22.1", @@ -9864,7 +9748,7 @@ dependencies = [ "opentelemetry-otlp", "opentelemetry-semantic-conventions 0.32.0", "opentelemetry-stdout", - "opentelemetry_sdk 0.32.0", + "opentelemetry_sdk 0.32.1", "percent-encoding", "pyroscope", "rustfs-audit", @@ -9933,7 +9817,7 @@ dependencies = [ "futures-util", "hex", "hmac 0.13.0", - "http 1.4.0", + "http 1.4.1", "http-body-util", "hyper", "hyper-util", @@ -9998,7 +9882,7 @@ dependencies = [ name = "rustfs-rio" version = "1.0.0-beta.4" dependencies = [ - "aes-gcm 0.11.0-rc.3", + "aes-gcm", "axum", "base64 0.22.1", "bytes", @@ -10006,7 +9890,7 @@ dependencies = [ "faster-hex", "futures", "hex-simd", - "http 1.4.0", + "http 1.4.1", "http-body-util", "md-5 0.11.0", "pin-project-lite", @@ -10054,7 +9938,7 @@ dependencies = [ "datafusion", "futures", "futures-core", - "http 1.4.0", + "http 1.4.1", "metrics", "object_store", "parking_lot 0.12.5", @@ -10095,7 +9979,7 @@ dependencies = [ "async-trait", "chrono", "futures", - "http 1.4.0", + "http 1.4.1", "metrics", "rand 0.10.1", "rmp-serde", @@ -10125,7 +10009,7 @@ version = "1.0.0-beta.4" dependencies = [ "base64-simd", "bytes", - "http 1.4.0", + "http 1.4.1", "hyper", "rustfs-utils", "s3s", @@ -10207,7 +10091,7 @@ version = "1.0.0-beta.4" dependencies = [ "async-trait", "axum", - "http 1.4.0", + "http 1.4.1", "ipnetwork", "metrics", "moka", @@ -10240,7 +10124,7 @@ dependencies = [ "hex-simd", "highway", "hmac 0.13.0", - "http 1.4.0", + "http 1.4.1", "hyper", "local-ip-address", "lz4", @@ -10291,7 +10175,7 @@ dependencies = [ "anyhow", "async-trait", "bytes", - "http 1.4.0", + "http 1.4.1", "reqwest", "rustify_derive", "serde", @@ -10339,7 +10223,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -10413,7 +10297,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -10476,7 +10360,7 @@ dependencies = [ "futures", "hex-simd", "hmac 0.13.0", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "http-body-util", "httparse", @@ -10628,7 +10512,7 @@ checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct 0.2.0", "der 0.7.10", - "generic-array 0.14.7", + "generic-array 0.14.9", "pkcs8 0.10.2", "subtle", "zeroize", @@ -11171,7 +11055,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -11236,31 +11120,64 @@ dependencies = [ [[package]] name = "ssh-cipher" -version = "0.2.0" +version = "0.3.0-rc.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caac132742f0d33c3af65bfcde7f6aa8f62f0e991d80db99149eb9d44708784f" +checksum = "10db6f219196a8528f9ec904d9d45cdad692d65b0e57e72be4dedd1c5fddce36" dependencies = [ - "aes 0.8.4", - "aes-gcm 0.10.3", - "cbc 0.1.2", - "chacha20 0.9.1", - "cipher 0.4.4", - "ctr 0.9.2", - "poly1305 0.8.0", + "aead", + "aes 0.9.0", + "aes-gcm", + "cbc 0.2.1", + "chacha20", + "cipher 0.5.2", + "ctr", + "ctutils", + "des 0.9.0", + "poly1305", "ssh-encoding", - "subtle", + "zeroize", ] [[package]] name = "ssh-encoding" -version = "0.2.0" +version = "0.3.0-rc.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9242b9ef4108a78e8cd1a2c98e193ef372437f8c22be363075233321dd4a15" +checksum = "7abf34aa716da5d5b4c496936d042ea282ab392092cd68a72ef6a8863ff8c96a" dependencies = [ "base64ct", "bytes", - "pem-rfc7468 0.7.0", - "sha2 0.10.9", + "crypto-bigint 0.7.3", + "ctutils", + "digest 0.11.3", + "pem-rfc7468 1.0.0", + "zeroize", +] + +[[package]] +name = "ssh-key" +version = "0.7.0-rc.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45735ce3dea95690e4a9e414c4cfde7f79835063c3dcd35881df85a84118e74b" +dependencies = [ + "argon2", + "bcrypt-pbkdf", + "ctutils", + "ed25519-dalek 3.0.0-pre.7", + "hex", + "hmac 0.13.0", + "p256 0.14.0-rc.9", + "p384 0.14.0-rc.9", + "p521", + "rand_core 0.10.1", + "rsa 0.10.0-rc.18", + "sec1 0.8.1", + "serde", + "sha1 0.11.0", + "sha2 0.11.0", + "signature 3.0.0", + "ssh-cipher", + "ssh-encoding", + "zeroize", ] [[package]] @@ -11279,7 +11196,7 @@ dependencies = [ "cfg-if", "libc", "psm", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -11548,10 +11465,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.2", + "getrandom 0.3.4", "once_cell", "rustix 1.1.4", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -11914,7 +11831,7 @@ dependencies = [ "bytes", "futures-core", "futures-sink", - "http 1.4.0", + "http 1.4.1", "httparse", "rand 0.8.6", "ring", @@ -11967,7 +11884,7 @@ dependencies = [ "bytes", "flate2", "h2", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "http-body-util", "hyper", @@ -12056,7 +11973,7 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "http 1.4.0", + "http 1.4.1", "http-body 1.0.1", "http-body-util", "pin-project-lite", @@ -12244,7 +12161,7 @@ checksum = "6c01152af293afb9c7c2a57e4b559c5620b421f6d133261c60dd2d0cdb38e6b8" dependencies = [ "bytes", "data-encoding", - "http 1.4.0", + "http 1.4.1", "httparse", "log", "rand 0.9.4", @@ -12345,16 +12262,6 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "universal-hash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" -dependencies = [ - "crypto-common 0.1.7", - "subtle", -] - [[package]] name = "universal-hash" version = "0.6.1" @@ -12435,7 +12342,7 @@ checksum = "30ffcc0e81025065dda612ec1e26a3d81bb16ef3062354873d17a35965d68522" dependencies = [ "async-trait", "derive_builder", - "http 1.4.0", + "http 1.4.1", "reqwest", "rustify", "rustify_derive", @@ -12739,7 +12646,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -12866,7 +12773,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -12875,7 +12782,16 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "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]] @@ -12893,14 +12809,31 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_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]] @@ -12918,48 +12851,96 @@ 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.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.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.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.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.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.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + [[package]] name = "winnow" version = "1.0.3" diff --git a/Cargo.toml b/Cargo.toml index 9b3e0db97..9f896f562 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -117,11 +117,11 @@ rustfs-zip = { path = "./crates/zip", version = "1.0.0-beta.4" } # Async Runtime and Networking async-channel = "2.5.0" -mysql_async = { version = "0.36.1", default-features = false, features = ["default-rustls", "tracing"], git = "https://github.com/blackbeam/mysql_async", rev = "2bad388283bc3ce48801fc2ffcd22445eb6f3d24" } +mysql_async = { version = "0.37", default-features = false, features = ["default-rustls", "tracing"] } async-compression = { version = "0.4.42" } async-recursion = "1.1.1" async-trait = "0.1.89" -async-nats = "0.48.0" +async-nats = "0.49.0" axum = "0.8.9" futures = "0.3.32" futures-core = "0.3.32" @@ -132,10 +132,10 @@ lapin = { version = "4.10.0", default-features = false, features = ["tokio", "ru hyper = { version = "1.9.0", features = ["http2", "http1", "server"] } hyper-rustls = { version = "0.27.9", default-features = false, features = ["native-tokio", "http1", "tls12", "logging", "http2", "aws-lc-rs", "webpki-roots"] } hyper-util = { version = "0.1.20", features = ["tokio", "server-auto", "server-graceful", "tracing"] } -http = "1.4.0" +http = "1.4.1" http-body = "1.0.1" http-body-util = "0.1.3" -reqwest = { version = "0.13.3", default-features = false, features = ["rustls", "charset", "http2", "system-proxy", "stream", "json", "blocking", "query", "form"] } +reqwest = { version = "0.13.4", default-features = false, features = ["rustls", "charset", "http2", "system-proxy", "stream", "json", "blocking", "query", "form"] } rustfs-kafka-async = { version = "1.2.0" } socket2 = { version = "0.6.3", features = ["all"] } tokio = { version = "1.52.3", features = ["fs", "rt-multi-thread"] } @@ -164,7 +164,7 @@ serde_json = { version = "1.0.150", features = ["raw_value"] } serde_urlencoded = "0.7.1" # Cryptography and Security -aes-gcm = { version = "0.11.0-rc.3", features = ["rand_core"] } +aes-gcm = { version = "0.11.0-rc.4", features = ["rand_core"] } argon2 = { version = "0.6.0-rc.8" } blake2 = "0.11.0-rc.6" chacha20poly1305 = { version = "0.11.0-rc.3" } @@ -185,7 +185,7 @@ zeroize = { version = "1.8.2", features = ["derive"] } # Time and Date chrono = { version = "0.4.44", features = ["serde"] } humantime = "2.3.0" -jiff = { version = "0.2.24", features = ["serde"] } +jiff = { version = "0.2.27", features = ["serde"] } time = { version = "0.3.47", features = ["std", "parsing", "formatting", "macros", "serde"] } # Database @@ -298,7 +298,7 @@ dial9-tokio-telemetry = "0.3" opentelemetry = { version = "0.32.0" } opentelemetry-appender-tracing = { version = "0.32.0", features = ["experimental_span_attributes", "experimental_metadata_attributes"] } opentelemetry-otlp = { version = "0.32.0", features = ["gzip-http", "reqwest-rustls"] } -opentelemetry_sdk = { version = "0.32.0", features = ["rt-tokio"] } +opentelemetry_sdk = { version = "0.32.1", features = ["rt-tokio"] } opentelemetry-semantic-conventions = { version = "0.32.0", features = ["semconv_experimental"] } opentelemetry-stdout = { version = "0.32.0" } pyroscope = { version = "2.0.4", features = ["backend-pprof-rs"] } @@ -308,7 +308,7 @@ libunftp = { version = "0.23.0", features = ["experimental"] } unftp-core = "0.1.0" suppaftp = { version = "8.0.3", features = ["tokio", "tokio-rustls-aws-lc-rs"] } rcgen = "0.14.8" -russh = { version = "0.60.3", git = "https://github.com/Eugeny/russh", rev = "fc6e3ab4cd4338e94ae64e17aeed2acee9335e6b" } +russh = { version = "0.61.1",features = ["serde"] } russh-sftp = "2.3.0" # WebDAV diff --git a/crates/ecstore/src/bucket/lifecycle/bucket_lifecycle_ops.rs b/crates/ecstore/src/bucket/lifecycle/bucket_lifecycle_ops.rs index 9ea0947d9..0ca6c60be 100644 --- a/crates/ecstore/src/bucket/lifecycle/bucket_lifecycle_ops.rs +++ b/crates/ecstore/src/bucket/lifecycle/bucket_lifecycle_ops.rs @@ -48,8 +48,8 @@ use rustfs_common::heal_channel::rep_has_active_rules; use rustfs_common::metrics::{IlmAction, Metrics}; use rustfs_config::{ DEFAULT_TRANSITION_QUEUE_CAPACITY, DEFAULT_TRANSITION_QUEUE_SEND_TIMEOUT_MS, DEFAULT_TRANSITION_WORKERS_ABSOLUTE_MAX, - DEFAULT_TRANSITION_WORKERS_CAP, ENV_TEST_FORCE_IMMEDIATE_TRANSITION_ENQUEUE_TIMEOUT, ENV_TRANSITION_QUEUE_CAPACITY, - ENV_TRANSITION_QUEUE_SEND_TIMEOUT_MS, ENV_TRANSITION_WORKERS, ENV_TRANSITION_WORKERS_ABSOLUTE_MAX, + DEFAULT_TRANSITION_WORKERS_CAP, ENV_TRANSITION_QUEUE_CAPACITY, ENV_TRANSITION_QUEUE_SEND_TIMEOUT_MS, ENV_TRANSITION_WORKERS, + ENV_TRANSITION_WORKERS_ABSOLUTE_MAX, }; use rustfs_data_usage::TierStats; use rustfs_filemeta::{ @@ -145,7 +145,7 @@ fn is_immediate_transition_source(src: &LcEventSrc) -> bool { #[cfg(any(test, debug_assertions))] fn should_force_immediate_transition_enqueue_timeout() -> bool { - env::var(ENV_TEST_FORCE_IMMEDIATE_TRANSITION_ENQUEUE_TIMEOUT) + env::var(rustfs_config::ENV_TEST_FORCE_IMMEDIATE_TRANSITION_ENQUEUE_TIMEOUT) .ok() .is_some_and(|value| value == "1") } diff --git a/rustfs/src/admin/console.rs b/rustfs/src/admin/console.rs index 150212ab8..2d0b9adda 100644 --- a/rustfs/src/admin/console.rs +++ b/rustfs/src/admin/console.rs @@ -523,7 +523,9 @@ async fn health_check(method: Method, uri: Uri) -> Response { } else { HealthProbe::Liveness }; - let (storage_ready, iam_ready) = collect_dependency_readiness().await; + let readiness_report = collect_dependency_readiness().await; + let storage_ready = readiness_report.readiness.storage_ready; + let iam_ready = readiness_report.readiness.iam_ready; let health = health_check_state(storage_ready, iam_ready, probe); let builder = Response::builder() @@ -537,7 +539,14 @@ async fn health_check(method: Method, uri: Uri) -> Response { .duration_since(std::time::UNIX_EPOCH) .unwrap_or_default() .as_secs(); - let body_json = build_health_payload(health, storage_ready, iam_ready, "rustfs-console", Some(uptime)); + let body_json = build_health_payload( + health, + storage_ready, + iam_ready, + &readiness_report.degraded_reasons, + "rustfs-console", + Some(uptime), + ); // Return a minimal JSON when serialization fails to avoid panic let body_str = serde_json::to_string(&body_json).unwrap_or_else(|e| { diff --git a/rustfs/src/admin/handlers/health.rs b/rustfs/src/admin/handlers/health.rs index e4b55f88b..2fa880ca5 100644 --- a/rustfs/src/admin/handlers/health.rs +++ b/rustfs/src/admin/handlers/health.rs @@ -16,7 +16,7 @@ use super::profile::{TriggerProfileCPU, TriggerProfileMemory}; use crate::admin::router::{AdminOperation, Operation, S3Router}; use crate::server::{ HEALTH_PREFIX, HEALTH_READY_PATH, PROFILE_CPU_PATH, PROFILE_MEMORY_PATH, - collect_dependency_readiness as collect_runtime_dependency_readiness, + collect_dependency_readiness_report as collect_runtime_dependency_readiness_report, }; use http::{HeaderMap, HeaderValue}; use hyper::{Method, StatusCode}; @@ -57,9 +57,8 @@ pub(crate) enum HealthProbe { Readiness, } -pub(crate) async fn collect_dependency_readiness() -> (bool, bool) { - let readiness = collect_runtime_dependency_readiness().await; - (readiness.storage_ready, readiness.iam_ready) +pub(crate) async fn collect_dependency_readiness() -> crate::server::DependencyReadinessReport { + collect_runtime_dependency_readiness_report().await } pub(crate) fn health_check_state(storage_ready: bool, iam_ready: bool, probe: HealthProbe) -> HealthCheckState { @@ -99,6 +98,15 @@ pub(crate) fn build_component_details(storage_ready: bool, iam_ready: bool) -> V }) } +pub(crate) fn build_degraded_reasons(reasons: &[crate::server::ReadinessDegradedReason]) -> Value { + Value::Array( + reasons + .iter() + .map(|reason| Value::String(reason.as_str().to_string())) + .collect(), + ) +} + pub(crate) fn probe_from_path(path: &str) -> HealthProbe { if path == HEALTH_READY_PATH { HealthProbe::Readiness @@ -111,6 +119,7 @@ pub(crate) fn build_health_payload( health: HealthCheckState, storage_ready: bool, iam_ready: bool, + degraded_reasons: &[crate::server::ReadinessDegradedReason], service: &str, uptime: Option, ) -> Value { @@ -128,6 +137,7 @@ pub(crate) fn build_health_payload( "timestamp": jiff::Zoned::now().to_string(), "version": env!("CARGO_PKG_VERSION"), "details": build_component_details(storage_ready, iam_ready), + "degradedReasons": build_degraded_reasons(degraded_reasons), }); if let Some(uptime) = uptime { @@ -142,9 +152,10 @@ pub(crate) fn build_health_response( probe: HealthProbe, storage_ready: bool, iam_ready: bool, + degraded_reasons: &[crate::server::ReadinessDegradedReason], ) -> S3Response<(StatusCode, Body)> { let health = health_check_state(storage_ready, iam_ready, probe); - let health_info = build_health_payload(health, storage_ready, iam_ready, "rustfs-endpoint", None); + let health_info = build_health_payload(health, storage_ready, iam_ready, degraded_reasons, "rustfs-endpoint", None); let mut headers = HeaderMap::new(); headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); @@ -177,9 +188,15 @@ impl Operation for HealthCheckHandler { } let probe = probe_from_path(req.uri.path()); - let (storage_ready, iam_ready) = collect_dependency_readiness().await; + let readiness_report = collect_dependency_readiness().await; - Ok(build_health_response(method, probe, storage_ready, iam_ready)) + Ok(build_health_response( + method, + probe, + readiness_report.readiness.storage_ready, + readiness_report.readiness.iam_ready, + &readiness_report.degraded_reasons, + )) } } @@ -243,25 +260,43 @@ mod tests { #[test] fn test_build_health_response_readiness_returns_503_when_deps_not_ready() { - let resp = build_health_response(Method::GET, HealthProbe::Readiness, false, true); + let resp = build_health_response( + Method::GET, + HealthProbe::Readiness, + false, + true, + &[crate::server::ReadinessDegradedReason::StorageQuorumUnavailable], + ); assert_eq!(resp.output.0, StatusCode::SERVICE_UNAVAILABLE); } #[test] fn test_build_health_response_readiness_returns_200_when_deps_ready() { - let resp = build_health_response(Method::GET, HealthProbe::Readiness, true, true); + let resp = build_health_response(Method::GET, HealthProbe::Readiness, true, true, &[]); assert_eq!(resp.output.0, StatusCode::OK); } #[test] fn test_build_health_response_liveness_returns_200_when_deps_not_ready() { - let resp = build_health_response(Method::GET, HealthProbe::Liveness, false, false); + let resp = build_health_response( + Method::GET, + HealthProbe::Liveness, + false, + false, + &[crate::server::ReadinessDegradedReason::StorageAndIamUnavailable], + ); assert_eq!(resp.output.0, StatusCode::OK); } #[test] fn test_build_health_response_head_returns_empty_body() { - let resp = build_health_response(Method::HEAD, HealthProbe::Readiness, false, false); + let resp = build_health_response( + Method::HEAD, + HealthProbe::Readiness, + false, + false, + &[crate::server::ReadinessDegradedReason::StorageAndIamUnavailable], + ); assert_eq!(resp.output.0, StatusCode::SERVICE_UNAVAILABLE); } @@ -269,7 +304,14 @@ mod tests { fn test_build_health_payload_minimal_mode_returns_status_and_ready_only() { let health = health_check_state(true, false, HealthProbe::Readiness); with_var(rustfs_config::ENV_HEALTH_MINIMAL_RESPONSE_ENABLE, Some("true"), || { - let payload = build_health_payload(health, true, false, "rustfs-endpoint", Some(123)); + let payload = build_health_payload( + health, + true, + false, + &[crate::server::ReadinessDegradedReason::IamNotReady], + "rustfs-endpoint", + Some(123), + ); assert_eq!(payload["status"], "degraded"); assert_eq!(payload["ready"], false); assert!(payload.get("version").is_none()); @@ -278,4 +320,18 @@ mod tests { assert!(payload.get("uptime").is_none()); }); } + + #[test] + fn test_build_health_payload_includes_degraded_reasons() { + let health = health_check_state(false, false, HealthProbe::Readiness); + let payload = build_health_payload( + health, + false, + false, + &[crate::server::ReadinessDegradedReason::StorageAndIamUnavailable], + "rustfs-endpoint", + None, + ); + assert_eq!(payload["degradedReasons"][0], "storage_and_iam_unavailable"); + } } diff --git a/rustfs/src/server/layer.rs b/rustfs/src/server/layer.rs index 6fa1791ee..46b3a8733 100644 --- a/rustfs/src/server/layer.rs +++ b/rustfs/src/server/layer.rs @@ -13,13 +13,13 @@ // limitations under the License. use crate::admin::console::is_console_path; -use crate::admin::handlers::health::{build_health_payload, collect_dependency_readiness, health_check_state, probe_from_path}; +use crate::admin::handlers::health::{build_health_payload, health_check_state, probe_from_path}; use crate::error::ApiError; use crate::server::cors; use crate::server::hybrid::HybridBody; use crate::server::{ ADMIN_PREFIX, CONSOLE_PREFIX, HEALTH_PREFIX, HEALTH_READY_PATH, MINIO_ADMIN_PREFIX, MINIO_ADMIN_V3_PREFIX, RPC_PREFIX, - RUSTFS_ADMIN_PREFIX, + RUSTFS_ADMIN_PREFIX, collect_dependency_readiness_report, }; use crate::storage::apply_cors_headers; use crate::storage::request_context::{RequestContext, extract_request_id_from_headers}; @@ -639,12 +639,21 @@ where RestBody: From, { let probe = probe_from_path(&path); - let (storage_ready, iam_ready) = collect_dependency_readiness().await; + let readiness_report = collect_dependency_readiness_report().await; + let storage_ready = readiness_report.readiness.storage_ready; + let iam_ready = readiness_report.readiness.iam_ready; let health = health_check_state(storage_ready, iam_ready, probe); let body = if method == Method::HEAD { Bytes::new() } else { - let payload = build_health_payload(health, storage_ready, iam_ready, "rustfs-endpoint", None); + let payload = build_health_payload( + health, + storage_ready, + iam_ready, + &readiness_report.degraded_reasons, + "rustfs-endpoint", + None, + ); Bytes::from(serde_json::to_vec(&payload).unwrap_or_else(|_| b"{}".to_vec())) }; diff --git a/rustfs/src/server/mod.rs b/rustfs/src/server/mod.rs index 0ce5fa5d4..66134e908 100644 --- a/rustfs/src/server/mod.rs +++ b/rustfs/src/server/mod.rs @@ -51,8 +51,11 @@ pub(crate) use prefix::{ MINIO_ADMIN_V3_PREFIX, PROFILE_CPU_PATH, PROFILE_MEMORY_PATH, RPC_PREFIX, RUSTFS_ADMIN_PREFIX, TONIC_PREFIX, VERSION, }; pub(crate) use readiness::DependencyReadiness; +pub(crate) use readiness::DependencyReadinessReport; +pub(crate) use readiness::ReadinessDegradedReason; pub(crate) use readiness::ReadinessGateLayer; pub(crate) use readiness::collect_dependency_readiness; +pub(crate) use readiness::collect_dependency_readiness_report; pub use readiness::publish_ready_when_runtime_ready; #[derive(Clone, Copy, Debug)] diff --git a/rustfs/src/server/readiness.rs b/rustfs/src/server/readiness.rs index 384c6513d..14704ca29 100644 --- a/rustfs/src/server/readiness.rs +++ b/rustfs/src/server/readiness.rs @@ -18,6 +18,7 @@ use http::{Request as HttpRequest, Response, StatusCode}; use http_body::Body; use http_body_util::{BodyExt, Full}; use hyper::body::Incoming; +use metrics::{counter, gauge}; use rustfs_common::GlobalReadiness; use rustfs_ecstore::new_object_layer_fn; use rustfs_ecstore::store_api::StorageAPI; @@ -39,6 +40,8 @@ use tracing::{debug, info}; pub const STARTUP_RUNTIME_READINESS_MAX_WAIT: Duration = Duration::from_secs(30); pub const STARTUP_RUNTIME_READINESS_POLL_INTERVAL: Duration = Duration::from_secs(1); +const METRIC_RUNTIME_READINESS_READY: &str = "rustfs_runtime_readiness_ready"; +const METRIC_RUNTIME_READINESS_DEGRADED_TOTAL: &str = "rustfs_runtime_readiness_degraded_total"; #[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] pub struct DependencyReadiness { @@ -46,6 +49,29 @@ pub struct DependencyReadiness { pub iam_ready: bool, } +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum ReadinessDegradedReason { + StorageQuorumUnavailable, + IamNotReady, + StorageAndIamUnavailable, +} + +impl ReadinessDegradedReason { + pub fn as_str(&self) -> &'static str { + match self { + ReadinessDegradedReason::StorageQuorumUnavailable => "storage_quorum_unavailable", + ReadinessDegradedReason::IamNotReady => "iam_not_ready", + ReadinessDegradedReason::StorageAndIamUnavailable => "storage_and_iam_unavailable", + } + } +} + +#[derive(Debug, Clone, Default, PartialEq, Eq)] +pub struct DependencyReadinessReport { + pub readiness: DependencyReadiness, + pub degraded_reasons: Vec, +} + /// ReadinessGateLayer ensures that the system components (IAM, Storage) /// are fully initialized before allowing any request to proceed. #[derive(Clone)] @@ -320,8 +346,29 @@ fn storage_ready_from_runtime_state(info: &StorageInfo) -> bool { }) } +fn degraded_reasons(storage_ready: bool, iam_ready_raw: bool) -> Vec { + match (storage_ready, iam_ready_raw) { + (true, true) => Vec::new(), + (false, false) => vec![ReadinessDegradedReason::StorageAndIamUnavailable], + (false, true) => vec![ReadinessDegradedReason::StorageQuorumUnavailable], + (true, false) => vec![ReadinessDegradedReason::IamNotReady], + } +} + +fn record_readiness_report(report: &DependencyReadinessReport) { + let ready = report.readiness.storage_ready && report.readiness.iam_ready; + gauge!(METRIC_RUNTIME_READINESS_READY).set(if ready { 1.0 } else { 0.0 }); + for reason in &report.degraded_reasons { + counter!(METRIC_RUNTIME_READINESS_DEGRADED_TOTAL, "reason" => reason.as_str()).increment(1); + } +} + pub async fn collect_dependency_readiness() -> DependencyReadiness { - let iam_ready = get_global_iam_sys().is_some_and(|sys| sys.is_ready()); + collect_dependency_readiness_report().await.readiness +} + +pub async fn collect_dependency_readiness_report() -> DependencyReadinessReport { + let iam_ready_raw = get_global_iam_sys().is_some_and(|sys| sys.is_ready()); let storage_ready = if let Some(cached) = load_cached_storage_readiness().await { cached } else { @@ -330,20 +377,32 @@ pub async fn collect_dependency_readiness() -> DependencyReadiness { computed }; - DependencyReadiness { + let readiness = DependencyReadiness { storage_ready, - iam_ready: iam_ready && storage_ready, - } + iam_ready: iam_ready_raw, + }; + let report = DependencyReadinessReport { + degraded_reasons: degraded_reasons(readiness.storage_ready, iam_ready_raw), + readiness, + }; + record_readiness_report(&report); + report } async fn collect_dependency_readiness_uncached() -> DependencyReadiness { - let iam_ready = get_global_iam_sys().is_some_and(|sys| sys.is_ready()); + let iam_ready_raw = get_global_iam_sys().is_some_and(|sys| sys.is_ready()); let storage_ready = collect_storage_readiness_uncached().await; - DependencyReadiness { + let readiness = DependencyReadiness { storage_ready, - iam_ready: iam_ready && storage_ready, - } + iam_ready: iam_ready_raw, + }; + let report = DependencyReadinessReport { + degraded_reasons: degraded_reasons(readiness.storage_ready, iam_ready_raw), + readiness, + }; + record_readiness_report(&report); + report.readiness } async fn collect_storage_readiness_uncached() -> bool {