Jepsen testing (NLnet task 3 subtask 1) #544

Merged
lx merged 41 commits from jepsen into main 2024-01-11 10:52:13 +00:00
2 changed files with 24 additions and 22 deletions
Showing only changes of commit 9030c1eef8 - Show all commits

View file

@ -73,7 +73,7 @@
(gen/nemesis (:generator scenario)) (gen/nemesis (:generator scenario))
(gen/time-limit (:time-limit opts))) (gen/time-limit (:time-limit opts)))
(gen/log "Healing cluster") (gen/log "Healing cluster")
(gen/nemesis (gen/once {:type :info, :f :partition-stop})) (gen/nemesis (:final-generator scenario))
(gen/log "Waiting for recovery") (gen/log "Waiting for recovery")
(gen/sleep 10) (gen/sleep 10)
(gen/clients (:final-generator workload))) (gen/clients (:final-generator workload)))

View file

@ -64,28 +64,30 @@
(defn scenario-cp (defn scenario-cp
"Clock scramble + parittion scenario" "Clock scramble + parittion scenario"
[opts] [opts]
{:generator (cycle [(gen/sleep 5) {:generator (cycle [(gen/sleep 5)
{:type :info, :f :partition-start} {:type :info, :f :partition-start}
(gen/sleep 5) (gen/sleep 5)
{:type :info, :f :clock-scramble} {:type :info, :f :clock-scramble}
(gen/sleep 5) (gen/sleep 5)
{:type :info, :f :partition-stop} {:type :info, :f :partition-stop}
(gen/sleep 5) (gen/sleep 5)
{:type :info, :f :clock-scramble}]) {:type :info, :f :clock-scramble}])
:nemesis (nemesis/compose :final-generator (gen/once {:type :info, :f :partition-stop})
{{:partition-start :start :nemesis (nemesis/compose
:partition-stop :stop} (nemesis/partition-random-halves) {{:partition-start :start
{:clock-scramble :scramble} (nemesis/clock-scrambler 20.0)})}) :partition-stop :stop} (nemesis/partition-random-halves)
{:clock-scramble :scramble} (nemesis/clock-scrambler 20.0)})})
(defn scenario-r (defn scenario-r
"Cluster reconfiguration scenario" "Cluster reconfiguration scenario"
[opts] [opts]
{:generator (cycle [(gen/sleep 5) {:generator (cycle [(gen/sleep 5)
{:type :info, :f :reconfigure-start} {:type :info, :f :reconfigure-start}
(gen/sleep 5) (gen/sleep 5)
{:type :info, :f :reconfigure-start} {:type :info, :f :reconfigure-start}
(gen/sleep 5) (gen/sleep 5)
{:type :info, :f :reconfigure-stop}]) {:type :info, :f :reconfigure-stop}])
:nemesis (nemesis/compose :final-generator (gen/once {:type :info, :f :reconfigure-stop})
{{:reconfigure-start :start :nemesis (nemesis/compose
:reconfigure-stop :stop} (reconfigure-subset 3)})}) {{:reconfigure-start :start
:reconfigure-stop :stop} (reconfigure-subset 3)})})