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

5 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 (checker/linearizable) PutObject, GetObject, DeleteObject, conditional If-Match / If-None-Match CAS Strict linearizability of single-object state transitions and atomic conditional writes
append Elle (elle.list-append) Conditional S3 read-modify-write list append Strict serializability — catches G0, G1a (aborted read), G1b, G1c, G-single, and G2-item anomalies
versioned Custom durability checker S3 versioned PutObject, GetObject(VersionId), delete marker, ListObjectVersions Unique non-empty VersionId, versions survive delete markers, SHA-256 payload integrity, final listing completeness, current object hidden by a delete marker
multipart Custom atomicity checker CreateMultipartUpload, UploadPart (5 MiB non-final parts), CompleteMultipartUpload, AbortMultipartUpload, concurrent GetObject All-or-nothing visibility (no partial part exposure) and exact post-heal SHA-256 integrity
list Custom convergence checker Concurrent PutObject, DeleteObject, post-heal ListObjectsV2 Every committed live key present, zero resurrected deleted keys, zero phantom keys

Nemesis Fault Matrix

Powered by jepsen.nemesis.combined plus a RustFS drive-fault nemesis:

  • partition: Random halves, majorities ring, and isolated single node via iptables.
  • kill: SIGKILL and restart of rustfs processes via start-stop-daemon (bypassing systemd Restart=always).
  • pause: SIGSTOP / SIGCONT process stalls simulating long GC / kernel I/O freezes.
  • packet: tc netem latency jitter (100ms ± 40ms) and 15% packet loss.
  • drive: Deny new path access to one drive for the unprivileged RustFS process, then restore the directory's previous permissions.
  • clock: Wall-clock skew bumps (enabled on independent Linux VMs / bare-metal nodes; omitted in shared-kernel Docker).

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 — top-level :valid? (true = passed, false = consistency violation, :unknown = inconclusive)
  • 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