Files
rustfs/flake.nix
T
RustFS d82bf5b1f5 fix(ecstore,scanner,heal): fix rolling, grey-fault, and scanner bugs (#9804)
* fix(ecstore,rustfs): fix rolling restarts, health probe, and request_id

- Unpin STREAM_AUTH_PINNED_ENDPOINTS on authenticated peer boot_epoch
  rotation (probed via signed Ping on legacy-downgraded streams) while
  remaining fail-closed for unauthenticated downgrades under unchanged
  epochs, fixing 1.0.8 -> 1.0.7 rollback stream-auth failures.
- Probe peer boot_epoch and re-sign replay scope headers on transient
  internode gRPC Unauthenticated errors during same-version restarts.
- Propagate online_drives_strict onReadQuorum retry hints and treat
  transient transport disconnects during quorum reads as retriable shard
  unavailable errors instead of immediate 503 SlowDown.
- Evaluate live erasure set read/write quorums across local and remote
  drives in /minio/health/cluster and /minio/health/cluster/read so a
  2/4-node outage returns HTTP 503 instead of a false-healthy 200.
- Propagate S3 x-amz-request-id end-to-end across internode gRPC and
  HTTP storage RPC boundaries for cross-node observability correlation.

Refs: https://github.com/rustfs/backlog/issues/3390

* fix(connect,release): raise symbol caps, compact 1GiB set, sync 1.0.8

- Raise GNU symbol-catalog budgets (aarch64-gnu 48 MiB, x86_64-gnu
  56 MiB) in crates/connect-symbol-catalog to accommodate expanded
  workspace symbol tables.
- Switch low-RAM (<= 2 GiB cgroup/host) CPU profile symbolizer fallback
  to a compact Vec<(u64, u64, Box<str>)> sorted address table so 1 GiB
  hosts never OOM during CPU profile symbolization.
- Synchronize workspace Cargo.toml, Cargo.lock, flake.nix, rustfs.spec,
  and helm/rustfs/Chart.yaml versions to 1.0.8.

Refs: https://github.com/rustfs/backlog/issues/3390

* fix(filemeta,scanner,heal): stabilize xl.meta, MRF fairness, telemetry

- Sort HashMap entries deterministically before MessagePack encoding in
  FileMeta::encode_to so healed and re-encoded xl.meta shards produce
  identical byte layouts and HighwayHash/CRC checksums across nodes.
- Classify confirmed object absence in MRF heal execution as terminal
  instead of looping recreate_failed retries, and enforce anti-starvation
  fairness for Scanner and ReadRepair lanes under MRF High bursts.
- Expose executed heal counters by source (MRF, Scanner, ReadRepair) in
  MRF status endpoints and export dirty_pending_buckets / scanner cycle
  telemetry in scanner activity snapshots.

Refs: https://github.com/rustfs/backlog/issues/3390

* fix(ecstore): bound 3x4 SIGSTOP stalls with hedging and host fast-fail

- Hedge multi-pending shard reads and read_xl_meta quorum fetches across
  remaining drives instead of stalling behind a single SIGSTOP'd node,
  and bound post-quorum write/delete straggler grace windows.
- Record peer straggler timeouts into host fast-fail windows and apply
  host fast-fail on read retries (including IgnoreFailure attempt 0) so
  subsequent operations bypass hung peers immediately.
- Allow .rustfs.sys metadata read-repair staging under a shared lock so
  a hung peer cannot hold an exclusive write lock for 10s across bucket
  validation paths.
- Switch SetDisks::stat_bucket_with_quorum from join_all to
  FuturesUnordered early-return on presence quorum or strict-majority
  absence so bucket existence revalidation after TTL expiry never blocks
  on a SIGSTOP'd peer.

Refs: https://github.com/rustfs/backlog/issues/3390

* test(ecstore): wire real-ECStore multipart DST cutpoints and SimDisk

- Wire opt-in DST crash cutpoints (MultipartBeforeQuorumRename,
  MultipartMidQuorumRename, MultipartAfterCommitBeforeCleanup) directly
  into SetDisks::complete_multipart_upload_inner and add transactional
  part staging/commit support in DstSimDisk.
- Add real-ECStore deterministic crash-recovery tests verifying
  all-or-nothing multipart visibility and convergent post-crash cleanup.

Refs: https://github.com/rustfs/backlog/issues/3390

* fix(ecstore,fuzz): fix test clippy lint and sync fuzz/Cargo.lock

- Replace index range loop over errs in 3x4 SIGSTOP metadata read test
  with errs.iter().enumerate().take(4) to satisfy clippy --all-targets.
- Sync workspace crate versions to 1.0.8 in fuzz/Cargo.lock so --locked
  fuzz harness checks succeed.
2026-11-30 20:36:16 +08:00

195 lines
5.2 KiB
Nix

# Nix flake for building RustFS
#
# Prerequisites:
# Install Nix: https://nixos.org/download/
# Enable flakes: https://nixos.wiki/wiki/Flakes#Enable_flakes
#
# Usage:
# nix build # Build rustfs binary
# nix run # Build and run rustfs
# ./result/bin/rustfs --help
{
description = "RustFS - High-performance S3-compatible object storage";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
rust-overlay,
...
}:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
in
{
nixosModules.rustfs = import ./nix/rustfs-module.nix {
defaultPackage = system: self.packages.${system}.rustfs;
};
nixosModules.default = self.nixosModules.rustfs;
overlays.default = final: prev:
let
packages = self.packages.${prev.stdenv.hostPlatform.system};
in
{
rustfs = packages.rustfs;
}
// prev.lib.optionalAttrs (builtins.hasAttr "rustfs-client" packages) {
rustfs-client = packages.rustfs-client;
rc = packages.rustfs-client;
};
packages = forAllSystems (
system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; };
# Use the latest stable rust toolchain
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
extensions = [
"rust-src"
"rust-analyzer"
"clippy"
"rustfmt"
];
};
rustPlatform = pkgs.makeRustPlatform {
cargo = rustToolchain;
rustc = rustToolchain;
};
clientVersion = "0.1.36";
rustfs = rustPlatform.buildRustPackage {
pname = "rustfs";
version = "1.0.8";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
allowBuiltinFetchGit = true;
};
nativeBuildInputs = with pkgs; [
pkg-config
protobuf
];
buildInputs = with pkgs; [
openssl
];
cargoBuildFlags = [
"--package"
"rustfs"
];
PROTOC = "${pkgs.protobuf}/bin/protoc";
doCheck = false;
meta = {
description = "High-performance S3-compatible object storage";
homepage = "https://rustfs.com";
license = pkgs.lib.licenses.asl20;
mainProgram = "rustfs";
};
};
clientAssets = {
"x86_64-linux" = {
name = "rustfs-cli-linux-amd64-v${clientVersion}.tar.gz";
hash = "sha256-SoEokRzK1Oe0gfJmNaTP0ewGRBIhBSbletLHSNNW87c=";
};
"aarch64-linux" = {
name = "rustfs-cli-linux-arm64-v${clientVersion}.tar.gz";
hash = "sha256-bp3qesT4FWKt2eHjEga6YFnW9ZKa1O2SSYYiMoKzqpw=";
};
};
clientSupported = builtins.hasAttr system clientAssets;
clientPackage =
if clientSupported then
let
asset = clientAssets.${system};
in
pkgs.stdenvNoCC.mkDerivation {
pname = "rustfs-cli";
version = clientVersion;
src = pkgs.fetchurl {
url = "https://github.com/rustfs/cli/releases/download/v${clientVersion}/${asset.name}";
inherit (asset) hash;
};
sourceRoot = ".";
installPhase = ''
runHook preInstall
install -Dm755 rc "$out/bin/rc"
runHook postInstall
'';
meta = {
description = "RustFS S3-compatible command-line client";
homepage = "https://github.com/rustfs/cli";
license = pkgs.lib.licenses.asl20;
mainProgram = "rc";
};
}
else
null;
in
{
inherit rustfs;
default = rustfs;
}
// pkgs.lib.optionalAttrs clientSupported {
rustfs-client = clientPackage;
rc = clientPackage;
}
);
devShells = forAllSystems (
system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; };
rustToolchain = pkgs.rust-bin.stable.latest.default.override {
extensions = [
"rust-src"
"rust-analyzer"
"clippy"
"rustfmt"
];
};
in
{
default = pkgs.mkShell {
packages = [
rustToolchain
pkgs.pkg-config
pkgs.protobuf
pkgs.openssl
];
PROTOC = "${pkgs.protobuf}/bin/protoc";
};
}
);
};
}