Skip to content
rustfsPublic

About

Official Jepsen distributed consistency and fault-tolerance test suite for RustFS.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

RustFS Jepsen — Distributed Consistency & Fault-Tolerance Suite

License

RustFS Jepsen is the official Jepsen distributed verification suite for RustFS. It deploys real multi-node RustFS erasure-coded clusters over SSH, drives concurrent S3 client traffic via the official AWS SDK v2, injects adversarial network, process, packet, drive, and clock faults, and verifies histories with Knossos and Elle.

Workloads & Verified Properties

Workload Consistency Engine Operations Verified Properties
register Knossos PutObject, GetObject, DeleteObject, conditional If-Match / If-None-Match CAS Per-object linearizability, strict HTTP 200 payload corruption detection, and conditional writes/conflicts
append Elle (elle.list-append) Conditional S3 read-modify-write list append Strict serializability (G0, G1a, G1b, G1c, G-single, G2-item) with anti-vacuous append coverage & strict payload parsing
versioned Custom durability checker Versioned PutObject, GetObject(VersionId), delete marker, DeleteObject(VersionId), ListObjectVersions Unique non-empty VersionId, zero lost/resurrected versions, single isLatest, SHA-256 integrity, cross-node listing convergence
multipart Custom atomicity checker CreateMultipartUpload, out-of-order UploadPart (≥5 MiB), CompleteMultipartUpload, explicit AbortMultipartUpload, concurrent GetObject All-or-nothing visibility (aborted uploads never visible), mid-run real-time freshness, exact cross-node post-heal SHA-256
list Custom convergence checker Concurrent PutObject (overwrites & nested prefixes), DeleteObject, mid-run & cross-node post-heal ListObjectsV2 Every committed live key present, zero resurrected/phantom/duplicate keys, full cross-node listing convergence

Plus 6 dedicated distributed storage-engine chaos workloads (--suite storage):

  • crash-recovery: Mixed inline + non-inline EC-striped durability under simultaneous full-cluster SIGKILL (:crash-all)
  • bitrot-heal: Non-inline part.* bit-flip / 1-byte tail truncation / xl.meta corruption + cross-stripe Range GET parity reconstruction + verified physical on-disk deep heal (scanMode=2)
  • batch-delete: S3 DeleteObjects batch atomicity and mixed WORM-locked batch protection
  • dlock-cache-coherence: HeadObject/GetObject/Range triple coherence, cross-node overwrite cache coherence, and post-heal /rustfs/admin/v3/top/locks leak checks
  • bucket-lifecycle: Concurrent CreateBucket/DeleteBucket, BucketNotEmpty protection, deleted-bucket non-resurrection (#9647), and clean recreate
  • hdd-slow-disk: Single-drive HDD gray-failure (:slow-disk) tail-latency, zero-loss durability, and Scanner disk_io_budget backpressure & concurrency recovery

Nemesis Fault Matrix

Powered by jepsen.nemesis.combined plus 8 RustFS storage & network chaos nemeses (13 total):

  • partition: Random halves, majorities ring, and isolated single node via iptables.
  • asymmetric-partition: One-way TCP drops and non-transitive bridge partitions (A <-> B <-> C, A -X- C) on the S3/RPC port.
  • kill: SIGKILL and restart of rustfs processes via start-stop-daemon (configurable --kill-targets).
  • crash-all: Simultaneous full-cluster SIGKILL power-loss simulation + restart of all active nodes.
  • pause: SIGSTOP / SIGCONT process stalls simulating long GC / kernel I/O freezes.
  • packet: tc netem latency jitter (100ms ± 40ms), 15% loss, 20% reorder (with 50ms delay), 5% duplicate, and 2% corruption.
  • drive: Deny new path access to one drive (chmod 0000) for the unprivileged RustFS process, then restore permissions.
  • drive-ro: Read-only drive (chmod 0555) inducing quorum write-asymmetry while the drive still serves stale reads.
  • slow-disk: Degraded HDD gray-failure throttling on a single drive via Linux cgroup v2 io.max (--slow-disk-mbps, --slow-disk-iops) or drive-local direct-IO saturation fallback.
  • bitrot: Bounded on-disk part.* bit-flip, 1-byte tail truncation (#8005), and xl.meta corruption (#5837) + deep heal (POST /rustfs/admin/v3/heal/{bucket}).
  • disk-full: Bounded ENOSPC balloon exhaustion on one drive (--enospc-max-mb) + cleanup, testing degraded writes and ENOSPC DeleteObject (#9461).
  • clock: Wall-clock skew bumps (enabled on independent Linux VMs / bare-metal nodes; omitted in shared-kernel Docker).
  • clock-jump: Large forward wall-clock jump (--clock-jump-days, default +45d, independent VMs only) targeting WORM COMPLIANCE retention and ILM expiration.

Official Topologies

Topology Nodes × Drives Total Drives Parity Read Quorum (R) Write Quorum (W) RUSTFS_VOLUMES Expansion
4x4 4 × 4 16 4 12 12 http://n{1...4}:9000/var/lib/rustfs/data{1...4}
3x2 3 × 2 6 3 3 4 http://n{1...3}:9000/var/lib/rustfs/data{1...2}
4x2 4 × 2 8 4 4 5 http://n{1...4}:9000/var/lib/rustfs/data{1...2}

The DB harness always exports a shared RUSTFS_RPC_SECRET (--rpc-secret, default jepsen-rpc-secret). RustFS will not derive internode RPC authentication when either root credential is still the public default rustfsadmin, which is what this suite uses. It sets RUSTFS_UNSAFE_BYPASS_DISK_CHECK=true only when every data directory on a node has the same st_dev (the Docker one-volume-per-node layout). Separate disks keep RustFS's physical-disk independence check on.

Quickstart

1. Run Checker & Topology Unit Tests (No Cluster Required)

Requires JDK 21 or newer and Leiningen.

lein test
lein run test --help

2. Run Against a Docker Cluster (4x4 or 3x2)

export JEPSEN_SSH_PUBKEY="$(cat ~/.ssh/id_ed25519.pub)"
export JEPSEN_SSH_KEY="$HOME/.ssh/id_ed25519"

# Start 4x4 topology (4 RustFS nodes + control container)
./scripts/up.sh 4x4

# Execute a single workload inside the control container
docker exec -it rustfs-jepsen-control \
  lein run test \
    --topology 4x4 \
    --workload register \
    --time-limit 90 \
    --concurrency 8 \
    --rate 10 \
    --faults partition,kill,pause,packet,drive \
    --username jepsen \
    --ssh-private-key /root/.ssh/id_ed25519

# Or run all 5 workloads sequentially
docker exec -it rustfs-jepsen-control ./scripts/run-suite.sh 4x4

# Tear down and switch to 3x2 (volumes are wiped so format.json is never reused)
./scripts/up.sh 3x2

3. Testing a Locally Built RustFS Binary

lein run test \
  --topology 4x4 \
  --workload append \
  --local-binary /path/to/linux-rustfs \
  --time-limit 120 \
  --faults partition,kill,pause,drive

4. Inspecting Results

Jepsen stores every run under store/rustfs-<topology>-<workload>/latest/:

  • results.edn — overall :valid? and the results of each checker. Read the workload, statistics and nemesis results before attributing an aggregate outcome to RustFS.
  • timeline.html — interactive operation concurrency timeline
  • latency-raw.png / rate.png — latency & throughput plots annotated with nemesis windows
  • n*/rustfs.log — collected RustFS server logs from every cluster node

Documentation

License

Licensed under the Apache License, Version 2.0.

About

Official Jepsen distributed consistency and fault-tolerance test suite for RustFS.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages