The problem
With every fault family on in every run, each family gets a small share of the run. Some bugs need one fault many times, with no other fault in the way: a long partition and no reboot, or a disk that fails again and again. When each run has a little of everything, these runs never come.
The technique
With ChaosMode::Swarm, each seed switches each fault family off with a probability of one half. The families that stay on get all of the run. Over many seeds, each family is on in about half of the runs, and alone or with few others in some of them. The seed decides the set, so the set replays with the seed.
The simulator records the families of each seed in a chaos_families event. It is read-only: it draws nothing and does not change the run.
The live run
Eight seeds of the same register, with network faults, storage faults and reboots in swarm mode. Each row is one seed: a dot for each family that is on. Columns 1 to 9 are the network families, columns a to l the storage families. Hover a column for its name. Select a row to open its run in the player.
- 1 clog
- 2 partition
- 3 bit_flip
- 4 random_close
- 5 connect_failure
- 6 clock_drift
- 7 buggified_delay
- 8 pair_latency
- 9 black_hole
- a corruption
- b eio
- c misdirect
- d phantom_write
- e sync_failure
- f short_transfer
- g dir_entry_loss
- h crash_damage
- i degradation
- j disk_failure
- k dropped_mutation_discard
- l writeback_error
The code
One mode for each surface. The site's engine picks Swarm or Random for the network and the storage:
let mode = if swarm {
ChaosMode::Swarm
} else {
ChaosMode::Random
};
if chaos.network {
out.push(Chaos::Network(mode));
}
if chaos.storage {
out.push(Chaos::Storage(mode));
}A test can also remove families for each seed, with network_fault_mask andstorage_fault_mask: a mask applies after the swarm draw and draws nothing.