Skip to content
forked from jepsen-io/jepsen

A framework for distributed systems verification, with fault injection

Notifications You must be signed in to change notification settings

rabbitmq/jepsen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jepsen Tests for RabbitMQ's Quorum Queue Implementation

How to run with Docker

cd into the jepsen/docker directory and start the containers:

cd docker
ssh-keygen -t ed25519 -m pem -f shared/jepsen-bot -C jepsen-bot -N ''
docker compose up --detach
./provision.sh

Connect to the Jepsen control container:

docker exec -it jepsen-control bash

Inside the control container, cd into the test directory and list the test aavailable options:

cd /root/rabbitmq
lein run test --help

To run a test for 30 seconds with network partition of 10 seconds:

lein run test --nodes n1,n2,n3 --ssh-private-key /root/shared/jepsen-bot --time-limit 30

The first run can take some time because of the provisioning of the nodes. The console output is like the following if the run is successful:

INFO [2024-10-21 12:48:18,043] jepsen test runner - jepsen.core {:perf {:latency-graph {:valid? true},
        :rate-graph {:valid? true},
        :valid? true},
 :queue {:ok-count 726,
         :duplicated-count 0,
         :valid? true,
         :lost-count 0,
         :lost #{},
         :acknowledged-count 725,
         :recovered #{799},
         :attempt-count 727,
         :unexpected #{},
         :unexpected-count 0,
         :recovered-count 1,
         :duplicated #{}},
 :valid? true}


Everything looks good! ヽ(‘ー`)ノ

Here is how to shut down and delete the containers:

docker compose down

Running on a locally-built binary

The test runs by default on a RabbitMQ version available on GitHub releases. It is also possible to run the test on a RabbitMQ Generic Unix package available on the local filesystem:

  • copy the Generic Unix archive in the rabbitmq directory (in the host system, not in the Docker container)
  • make sure the archive shows up in the controller Docker container: ls -al ~/rabbitmq
  • run the test with the --archive-url option, e.g.
lein run test --nodes n1,n2,n3 --ssh-private-key /root/shared/jepsen-bot --time-limit 30 --archive-url file:///root/rabbitmq/rabbitmq-server-generic-unix-4.0.2-alpha.9.tar.xz

About

A framework for distributed systems verification, with fault injection

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 38.7%
  • Clojure 30.7%
  • Shell 23.2%
  • Dockerfile 4.1%
  • HCL 3.3%