|
|
@@ -16,11 +16,28 @@ message Request {
|
|
|
Tester Tester = 3;
|
|
|
}
|
|
|
|
|
|
+// SnapshotInfo contains SAVE_SNAPSHOT request results.
|
|
|
+message SnapshotInfo {
|
|
|
+ string MemberName = 1;
|
|
|
+ repeated string MemberClientURLs = 2;
|
|
|
+ string SnapshotPath = 3;
|
|
|
+ string SnapshotFileSize = 4;
|
|
|
+ string SnapshotTotalSize = 5;
|
|
|
+ int64 SnapshotTotalKey = 6;
|
|
|
+ int64 SnapshotHash = 7;
|
|
|
+ int64 SnapshotRevision = 8;
|
|
|
+ string Took = 9;
|
|
|
+}
|
|
|
+
|
|
|
message Response {
|
|
|
bool Success = 1;
|
|
|
string Status = 2;
|
|
|
+
|
|
|
// Member contains the same Member object from tester request.
|
|
|
Member Member = 3;
|
|
|
+
|
|
|
+ // SnapshotInfo contains SAVE_SNAPSHOT request results.
|
|
|
+ SnapshotInfo SnapshotInfo = 4;
|
|
|
}
|
|
|
|
|
|
service Transport {
|
|
|
@@ -30,7 +47,6 @@ service Transport {
|
|
|
message Member {
|
|
|
// EtcdExecPath is the executable etcd binary path in agent server.
|
|
|
string EtcdExecPath = 1 [(gogoproto.moretags) = "yaml:\"etcd-exec-path\""];
|
|
|
-
|
|
|
// TODO: support embedded etcd
|
|
|
|
|
|
// AgentAddr is the agent HTTP server address.
|
|
|
@@ -54,6 +70,9 @@ message Member {
|
|
|
string EtcdClientEndpoint = 301 [(gogoproto.moretags) = "yaml:\"etcd-client-endpoint\""];
|
|
|
// Etcd defines etcd binary configuration flags.
|
|
|
Etcd Etcd = 302 [(gogoproto.moretags) = "yaml:\"etcd\""];
|
|
|
+ // EtcdOnSnapshotRestore defines one-time use configuration during etcd
|
|
|
+ // snapshot recovery process.
|
|
|
+ Etcd EtcdOnSnapshotRestore = 303;
|
|
|
|
|
|
// ClientCertData contains cert file contents from this member's etcd server.
|
|
|
string ClientCertData = 401 [(gogoproto.moretags) = "yaml:\"client-cert-data\""];
|
|
|
@@ -74,6 +93,11 @@ message Member {
|
|
|
// PeerTrustedCAData contains trusted CA file contents from this member's etcd server.
|
|
|
string PeerTrustedCAData = 505 [(gogoproto.moretags) = "yaml:\"peer-trusted-ca-data\""];
|
|
|
string PeerTrustedCAPath = 506 [(gogoproto.moretags) = "yaml:\"peer-trusted-ca-path\""];
|
|
|
+
|
|
|
+ // SnapshotPath is the snapshot file path to store or restore from.
|
|
|
+ string SnapshotPath = 601 [(gogoproto.moretags) = "yaml:\"snapshot-path\""];
|
|
|
+ // SnapshotInfo contains last SAVE_SNAPSHOT request results.
|
|
|
+ SnapshotInfo SnapshotInfo = 602;
|
|
|
}
|
|
|
|
|
|
message Tester {
|
|
|
@@ -93,22 +117,21 @@ message Tester {
|
|
|
|
|
|
// RoundLimit is the limit of rounds to run failure set (-1 to run without limits).
|
|
|
int32 RoundLimit = 21 [(gogoproto.moretags) = "yaml:\"round-limit\""];
|
|
|
- // ExitOnFailure is true, then exit tester on first failure.
|
|
|
- bool ExitOnFailure = 22 [(gogoproto.moretags) = "yaml:\"exit-on-failure\""];
|
|
|
- // ConsistencyCheck is true to check consistency (revision, hash).
|
|
|
- bool ConsistencyCheck = 23 [(gogoproto.moretags) = "yaml:\"consistency-check\""];
|
|
|
+ // ExitOnCaseFail is true, then exit tester on first failure.
|
|
|
+ bool ExitOnCaseFail = 22 [(gogoproto.moretags) = "yaml:\"exit-on-failure\""];
|
|
|
// EnablePprof is true to enable profiler.
|
|
|
- bool EnablePprof = 24 [(gogoproto.moretags) = "yaml:\"enable-pprof\""];
|
|
|
+ bool EnablePprof = 23 [(gogoproto.moretags) = "yaml:\"enable-pprof\""];
|
|
|
|
|
|
- // FailureDelayMs is the delay duration after failure is injected.
|
|
|
+ // CaseDelayMs is the delay duration after failure is injected.
|
|
|
// Useful when triggering snapshot or no-op failure cases.
|
|
|
- uint32 FailureDelayMs = 31 [(gogoproto.moretags) = "yaml:\"failure-delay-ms\""];
|
|
|
- // FailureShuffle is true to randomize failure injecting order.
|
|
|
- bool FailureShuffle = 32 [(gogoproto.moretags) = "yaml:\"failure-shuffle\""];
|
|
|
- // FailureCases is the selected test cases to schedule.
|
|
|
+ uint32 CaseDelayMs = 31 [(gogoproto.moretags) = "yaml:\"case-delay-ms\""];
|
|
|
+ // CaseShuffle is true to randomize failure injecting order.
|
|
|
+ bool CaseShuffle = 32 [(gogoproto.moretags) = "yaml:\"case-shuffle\""];
|
|
|
+ // Cases is the selected test cases to schedule.
|
|
|
// If empty, run all failure cases.
|
|
|
- repeated string FailureCases = 33 [(gogoproto.moretags) = "yaml:\"failure-cases\""];
|
|
|
- // Failpoinommands is the list of "gofail" commands (e.g. panic("etcd-tester"),1*sleep(1000)
|
|
|
+ repeated string Cases = 33 [(gogoproto.moretags) = "yaml:\"cases\""];
|
|
|
+ // FailpointCommands is the list of "gofail" commands
|
|
|
+ // (e.g. panic("etcd-tester"),1*sleep(1000).
|
|
|
repeated string FailpointCommands = 34 [(gogoproto.moretags) = "yaml:\"failpoint-commands\""];
|
|
|
|
|
|
// RunnerExecPath is a path of etcd-runner binary.
|
|
|
@@ -116,27 +139,32 @@ message Tester {
|
|
|
// ExternalExecPath is a path of script for enabling/disabling an external fault injector.
|
|
|
string ExternalExecPath = 42 [(gogoproto.moretags) = "yaml:\"external-exec-path\""];
|
|
|
|
|
|
- // StressTypes is the list of stresser names:
|
|
|
- // keys, lease, nop, election-runner, watch-runner, lock-racer-runner, lease-runner.
|
|
|
- repeated string StressTypes = 101 [(gogoproto.moretags) = "yaml:\"stress-types\""];
|
|
|
+ // Stressers is the list of stresser types:
|
|
|
+ // KV, LEASE, ELECTION_RUNNER, WATCH_RUNNER, LOCK_RACER_RUNNER, LEASE_RUNNER.
|
|
|
+ repeated string Stressers = 101 [(gogoproto.moretags) = "yaml:\"stressers\""];
|
|
|
+ // Checkers is the list of consistency checker types:
|
|
|
+ // KV_HASH, LEASE_EXPIRE, NO_CHECK, RUNNER.
|
|
|
+ // Leave empty to skip consistency checks.
|
|
|
+ repeated string Checkers = 102 [(gogoproto.moretags) = "yaml:\"checkers\""];
|
|
|
+
|
|
|
// StressKeySize is the size of each small key written into etcd.
|
|
|
- int32 StressKeySize = 102 [(gogoproto.moretags) = "yaml:\"stress-key-size\""];
|
|
|
+ int32 StressKeySize = 201 [(gogoproto.moretags) = "yaml:\"stress-key-size\""];
|
|
|
// StressKeySizeLarge is the size of each large key written into etcd.
|
|
|
- int32 StressKeySizeLarge = 103 [(gogoproto.moretags) = "yaml:\"stress-key-size-large\""];
|
|
|
+ int32 StressKeySizeLarge = 202 [(gogoproto.moretags) = "yaml:\"stress-key-size-large\""];
|
|
|
// StressKeySuffixRange is the count of key range written into etcd.
|
|
|
// Stress keys are created with "fmt.Sprintf("foo%016x", rand.Intn(keySuffixRange)".
|
|
|
- int32 StressKeySuffixRange = 104 [(gogoproto.moretags) = "yaml:\"stress-key-suffix-range\""];
|
|
|
+ int32 StressKeySuffixRange = 203 [(gogoproto.moretags) = "yaml:\"stress-key-suffix-range\""];
|
|
|
// StressKeySuffixRangeTxn is the count of key range written into etcd txn (max 100).
|
|
|
// Stress keys are created with "fmt.Sprintf("/k%03d", i)".
|
|
|
- int32 StressKeySuffixRangeTxn = 105 [(gogoproto.moretags) = "yaml:\"stress-key-suffix-range-txn\""];
|
|
|
+ int32 StressKeySuffixRangeTxn = 204 [(gogoproto.moretags) = "yaml:\"stress-key-suffix-range-txn\""];
|
|
|
// StressKeyTxnOps is the number of operations per a transaction (max 64).
|
|
|
- int32 StressKeyTxnOps = 106 [(gogoproto.moretags) = "yaml:\"stress-key-txn-ops\""];
|
|
|
+ int32 StressKeyTxnOps = 205 [(gogoproto.moretags) = "yaml:\"stress-key-txn-ops\""];
|
|
|
|
|
|
// StressClients is the number of concurrent stressing clients
|
|
|
// with "one" shared TCP connection.
|
|
|
- int32 StressClients = 201 [(gogoproto.moretags) = "yaml:\"stress-clients\""];
|
|
|
+ int32 StressClients = 301 [(gogoproto.moretags) = "yaml:\"stress-clients\""];
|
|
|
// StressQPS is the maximum number of stresser requests per second.
|
|
|
- int32 StressQPS = 202 [(gogoproto.moretags) = "yaml:\"stress-qps\""];
|
|
|
+ int32 StressQPS = 302 [(gogoproto.moretags) = "yaml:\"stress-qps\""];
|
|
|
}
|
|
|
|
|
|
message Etcd {
|
|
|
@@ -194,12 +222,24 @@ enum Operation {
|
|
|
// directories to simulate destroying the whole machine.
|
|
|
SIGQUIT_ETCD_AND_REMOVE_DATA = 21;
|
|
|
|
|
|
+ // SAVE_SNAPSHOT is sent to trigger local member to download its snapshot
|
|
|
+ // onto its local disk with the specified path from tester.
|
|
|
+ SAVE_SNAPSHOT = 30;
|
|
|
+ // RESTORE_RESTART_FROM_SNAPSHOT is sent to trigger local member to
|
|
|
+ // restore a cluster from existing snapshot from disk, and restart
|
|
|
+ // an etcd instance from recovered data.
|
|
|
+ RESTORE_RESTART_FROM_SNAPSHOT = 31;
|
|
|
+ // RESTART_FROM_SNAPSHOT is sent to trigger local member to restart
|
|
|
+ // and join an existing cluster that has been recovered from a snapshot.
|
|
|
+ // Local member joins this cluster with fresh data.
|
|
|
+ RESTART_FROM_SNAPSHOT = 32;
|
|
|
+
|
|
|
// SIGQUIT_ETCD_AND_ARCHIVE_DATA is sent when consistency check failed,
|
|
|
// thus need to archive etcd data directories.
|
|
|
- SIGQUIT_ETCD_AND_ARCHIVE_DATA = 30;
|
|
|
+ SIGQUIT_ETCD_AND_ARCHIVE_DATA = 40;
|
|
|
// SIGQUIT_ETCD_AND_REMOVE_DATA_AND_STOP_AGENT destroys etcd process,
|
|
|
// etcd data, and agent server.
|
|
|
- SIGQUIT_ETCD_AND_REMOVE_DATA_AND_STOP_AGENT = 31;
|
|
|
+ SIGQUIT_ETCD_AND_REMOVE_DATA_AND_STOP_AGENT = 41;
|
|
|
|
|
|
// BLACKHOLE_PEER_PORT_TX_RX drops all outgoing/incoming packets from/to
|
|
|
// the peer port on target member's peer port.
|
|
|
@@ -214,12 +254,12 @@ enum Operation {
|
|
|
UNDELAY_PEER_PORT_TX_RX = 201;
|
|
|
}
|
|
|
|
|
|
-// FailureCase defines various system faults in distributed systems,
|
|
|
+// Case defines various system faults or test case in distributed systems,
|
|
|
// in order to verify correct behavior of etcd servers and clients.
|
|
|
-enum FailureCase {
|
|
|
+enum Case {
|
|
|
// SIGTERM_ONE_FOLLOWER stops a randomly chosen follower (non-leader)
|
|
|
// but does not delete its data directories on disk for next restart.
|
|
|
- // It waits "failure-delay-ms" before recovering this failure.
|
|
|
+ // It waits "delay-ms" before recovering this failure.
|
|
|
// The expected behavior is that the follower comes back online
|
|
|
// and rejoins the cluster, and then each member continues to process
|
|
|
// client requests ('Put' request that requires Raft consensus).
|
|
|
@@ -237,9 +277,8 @@ enum FailureCase {
|
|
|
SIGTERM_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT = 1;
|
|
|
|
|
|
// SIGTERM_LEADER stops the active leader node but does not delete its
|
|
|
- // data directories on disk for next restart. Then it waits
|
|
|
- // "failure-delay-ms" before recovering this failure, in order to
|
|
|
- // trigger election timeouts.
|
|
|
+ // data directories on disk for next restart. Then it waits "delay-ms"
|
|
|
+ // before recovering this failure, in order to trigger election timeouts.
|
|
|
// The expected behavior is that a new leader gets elected, and the
|
|
|
// old leader comes back online and rejoins the cluster as a follower.
|
|
|
// As always, after recovery, each member must be able to process
|
|
|
@@ -259,16 +298,15 @@ enum FailureCase {
|
|
|
|
|
|
// SIGTERM_QUORUM stops majority number of nodes to make the whole cluster
|
|
|
// inoperable but does not delete data directories on stopped nodes
|
|
|
- // for next restart. And it waits "failure-delay-ms" before recovering
|
|
|
- // this failure.
|
|
|
+ // for next restart. And it waits "delay-ms" before recovering failure.
|
|
|
// The expected behavior is that nodes come back online, thus cluster
|
|
|
// comes back operative as well. As always, after recovery, each member
|
|
|
// must be able to process client requests.
|
|
|
SIGTERM_QUORUM = 4;
|
|
|
|
|
|
// SIGTERM_ALL stops the whole cluster but does not delete data directories
|
|
|
- // on disk for next restart. And it waits "failure-delay-ms" before
|
|
|
- // recovering this failure.
|
|
|
+ // on disk for next restart. And it waits "delay-ms" before recovering
|
|
|
+ // this failure.
|
|
|
// The expected behavior is that nodes come back online, thus cluster
|
|
|
// comes back operative as well. As always, after recovery, each member
|
|
|
// must be able to process client requests.
|
|
|
@@ -278,7 +316,7 @@ enum FailureCase {
|
|
|
// (non-leader), deletes its data directories on disk, and removes
|
|
|
// this member from cluster (membership reconfiguration). On recovery,
|
|
|
// tester adds a new member, and this member joins the existing cluster
|
|
|
- // with fresh data. It waits "failure-delay-ms" before recovering this
|
|
|
+ // with fresh data. It waits "delay-ms" before recovering this
|
|
|
// failure. This simulates destroying one follower machine, where operator
|
|
|
// needs to add a new member from a fresh machine.
|
|
|
// The expected behavior is that a new member joins the existing cluster,
|
|
|
@@ -301,7 +339,7 @@ enum FailureCase {
|
|
|
// SIGQUIT_AND_REMOVE_LEADER stops the active leader node, deletes its
|
|
|
// data directories on disk, and removes this member from cluster.
|
|
|
// On recovery, tester adds a new member, and this member joins the
|
|
|
- // existing cluster with fresh data. It waits "failure-delay-ms" before
|
|
|
+ // existing cluster with fresh data. It waits "delay-ms" before
|
|
|
// recovering this failure. This simulates destroying a leader machine,
|
|
|
// where operator needs to add a new member from a fresh machine.
|
|
|
// The expected behavior is that a new member joins the existing cluster,
|
|
|
@@ -322,9 +360,36 @@ enum FailureCase {
|
|
|
// member must be able to process client requests.
|
|
|
SIGQUIT_AND_REMOVE_LEADER_UNTIL_TRIGGER_SNAPSHOT = 13;
|
|
|
|
|
|
+ // SIGQUIT_AND_REMOVE_QUORUM_AND_RESTORE_LEADER_SNAPSHOT_FROM_SCRATCH first
|
|
|
+ // stops majority number of nodes, deletes data directories on those quorum
|
|
|
+ // nodes, to make the whole cluster inoperable. Now that quorum and their
|
|
|
+ // data are totally destroyed, cluster cannot even remove unavailable nodes
|
|
|
+ // (e.g. 2 out of 3 are lost, so no leader can be elected).
|
|
|
+ // Let's assume 3-node cluster of node A, B, and C. One day, node A and B
|
|
|
+ // are destroyed and all their data are gone. The only viable solution is
|
|
|
+ // to recover from C's latest snapshot.
|
|
|
+ //
|
|
|
+ // To simulate:
|
|
|
+ // 1. Assume node C is the current leader with most up-to-date data.
|
|
|
+ // 2. Download snapshot from node C, before destroying node A and B.
|
|
|
+ // 3. Destroy node A and B, and make the whole cluster inoperable.
|
|
|
+ // 4. Now node C cannot operate either.
|
|
|
+ // 5. SIGTERM node C and remove its data directories.
|
|
|
+ // 6. Restore a new seed member from node C's latest snapshot file.
|
|
|
+ // 7. Add another member to establish 2-node cluster.
|
|
|
+ // 8. Add another member to establish 3-node cluster.
|
|
|
+ // 9. Add more if any.
|
|
|
+ //
|
|
|
+ // The expected behavior is that etcd successfully recovers from such
|
|
|
+ // disastrous situation as only 1-node survives out of 3-node cluster,
|
|
|
+ // new members joins the existing cluster, and previous data from snapshot
|
|
|
+ // are still preserved after recovery process. As always, after recovery,
|
|
|
+ // each member must be able to process client requests.
|
|
|
+ SIGQUIT_AND_REMOVE_QUORUM_AND_RESTORE_LEADER_SNAPSHOT_FROM_SCRATCH = 14;
|
|
|
+
|
|
|
// BLACKHOLE_PEER_PORT_TX_RX_ONE_FOLLOWER drops all outgoing/incoming
|
|
|
// packets from/to the peer port on a randomly chosen follower
|
|
|
- // (non-leader), and waits for "failure-delay-ms" until recovery.
|
|
|
+ // (non-leader), and waits for "delay-ms" until recovery.
|
|
|
// The expected behavior is that once dropping operation is undone,
|
|
|
// each member must be able to process client requests.
|
|
|
BLACKHOLE_PEER_PORT_TX_RX_ONE_FOLLOWER = 100;
|
|
|
@@ -342,7 +407,7 @@ enum FailureCase {
|
|
|
|
|
|
// BLACKHOLE_PEER_PORT_TX_RX_LEADER drops all outgoing/incoming packets
|
|
|
// from/to the peer port on the active leader (isolated), and waits for
|
|
|
- // "failure-delay-ms" until recovery, in order to trigger election timeout.
|
|
|
+ // "delay-ms" until recovery, in order to trigger election timeout.
|
|
|
// The expected behavior is that after election timeout, a new leader gets
|
|
|
// elected, and once dropping operation is undone, the old leader comes
|
|
|
// back and rejoins the cluster as a follower. As always, after recovery,
|
|
|
@@ -362,7 +427,7 @@ enum FailureCase {
|
|
|
|
|
|
// BLACKHOLE_PEER_PORT_TX_RX_QUORUM drops all outgoing/incoming packets
|
|
|
// from/to the peer ports on majority nodes of cluster, thus losing its
|
|
|
- // leader and cluster being inoperable. And it waits for "failure-delay-ms"
|
|
|
+ // leader and cluster being inoperable. And it waits for "delay-ms"
|
|
|
// until recovery.
|
|
|
// The expected behavior is that once packet drop operation is undone,
|
|
|
// nodes come back online, thus cluster comes back operative. As always,
|
|
|
@@ -371,7 +436,7 @@ enum FailureCase {
|
|
|
|
|
|
// BLACKHOLE_PEER_PORT_TX_RX_ALL drops all outgoing/incoming packets
|
|
|
// from/to the peer ports on all nodes, thus making cluster totally
|
|
|
- // inoperable. It waits for "failure-delay-ms" until recovery.
|
|
|
+ // inoperable. It waits for "delay-ms" until recovery.
|
|
|
// The expected behavior is that once packet drop operation is undone,
|
|
|
// nodes come back online, thus cluster comes back operative. As always,
|
|
|
// after recovery, each member must be able to process client requests.
|
|
|
@@ -379,7 +444,7 @@ enum FailureCase {
|
|
|
|
|
|
// DELAY_PEER_PORT_TX_RX_ONE_FOLLOWER delays outgoing/incoming packets
|
|
|
// from/to the peer port on a randomly chosen follower (non-leader).
|
|
|
- // It waits for "failure-delay-ms" until recovery.
|
|
|
+ // It waits for "delay-ms" until recovery.
|
|
|
// The expected behavior is that once packet delay operation is undone,
|
|
|
// the follower comes back and tries to catch up with latest changes from
|
|
|
// cluster. And as always, after recovery, each member must be able to
|
|
|
@@ -388,8 +453,8 @@ enum FailureCase {
|
|
|
|
|
|
// RANDOM_DELAY_PEER_PORT_TX_RX_ONE_FOLLOWER delays outgoing/incoming
|
|
|
// packets from/to the peer port on a randomly chosen follower
|
|
|
- // (non-leader) with a randomized time duration (thus isolated). It waits
|
|
|
- // for "failure-delay-ms" until recovery.
|
|
|
+ // (non-leader) with a randomized time duration (thus isolated). It
|
|
|
+ // waits for "delay-ms" until recovery.
|
|
|
// The expected behavior is that once packet delay operation is undone,
|
|
|
// each member must be able to process client requests.
|
|
|
RANDOM_DELAY_PEER_PORT_TX_RX_ONE_FOLLOWER = 201;
|
|
|
@@ -418,8 +483,8 @@ enum FailureCase {
|
|
|
RANDOM_DELAY_PEER_PORT_TX_RX_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT = 203;
|
|
|
|
|
|
// DELAY_PEER_PORT_TX_RX_LEADER delays outgoing/incoming packets from/to
|
|
|
- // the peer port on the active leader. And waits for "failure-delay-ms"
|
|
|
- // until recovery.
|
|
|
+ // the peer port on the active leader. And waits for "delay-ms" until
|
|
|
+ // recovery.
|
|
|
// The expected behavior is that cluster may elect a new leader, and
|
|
|
// once packet delay operation is undone, the (old) leader comes back
|
|
|
// and tries to catch up with latest changes from cluster. As always,
|
|
|
@@ -428,7 +493,7 @@ enum FailureCase {
|
|
|
|
|
|
// RANDOM_DELAY_PEER_PORT_TX_RX_LEADER delays outgoing/incoming packets
|
|
|
// from/to the peer port on the active leader with a randomized time
|
|
|
- // duration. And waits for "failure-delay-ms" until recovery.
|
|
|
+ // duration. And waits for "delay-ms" until recovery.
|
|
|
// The expected behavior is that cluster may elect a new leader, and
|
|
|
// once packet delay operation is undone, the (old) leader comes back
|
|
|
// and tries to catch up with latest changes from cluster. As always,
|
|
|
@@ -462,7 +527,7 @@ enum FailureCase {
|
|
|
|
|
|
// DELAY_PEER_PORT_TX_RX_QUORUM delays outgoing/incoming packets from/to
|
|
|
// the peer ports on majority nodes of cluster. And it waits for
|
|
|
- // "failure-delay-ms" until recovery, likely to trigger election timeouts.
|
|
|
+ // "delay-ms" until recovery, likely to trigger election timeouts.
|
|
|
// The expected behavior is that cluster may elect a new leader, while
|
|
|
// quorum of nodes struggle with slow networks, and once delay operation
|
|
|
// is undone, nodes come back and cluster comes back operative. As always,
|
|
|
@@ -471,8 +536,8 @@ enum FailureCase {
|
|
|
|
|
|
// RANDOM_DELAY_PEER_PORT_TX_RX_QUORUM delays outgoing/incoming packets
|
|
|
// from/to the peer ports on majority nodes of cluster, with randomized
|
|
|
- // time durations. And it waits for "failure-delay-ms" until recovery,
|
|
|
- // likely to trigger election timeouts.
|
|
|
+ // time durations. And it waits for "delay-ms" until recovery, likely
|
|
|
+ // to trigger election timeouts.
|
|
|
// The expected behavior is that cluster may elect a new leader, while
|
|
|
// quorum of nodes struggle with slow networks, and once delay operation
|
|
|
// is undone, nodes come back and cluster comes back operative. As always,
|
|
|
@@ -480,8 +545,8 @@ enum FailureCase {
|
|
|
RANDOM_DELAY_PEER_PORT_TX_RX_QUORUM = 209;
|
|
|
|
|
|
// DELAY_PEER_PORT_TX_RX_ALL delays outgoing/incoming packets from/to the
|
|
|
- // peer ports on all nodes. And it waits for "failure-delay-ms" until
|
|
|
- // recovery, likely to trigger election timeouts.
|
|
|
+ // peer ports on all nodes. And it waits for "delay-ms" until recovery,
|
|
|
+ // likely to trigger election timeouts.
|
|
|
// The expected behavior is that cluster may become totally inoperable,
|
|
|
// struggling with slow networks across the whole cluster. Once delay
|
|
|
// operation is undone, nodes come back and cluster comes back operative.
|
|
|
@@ -491,7 +556,7 @@ enum FailureCase {
|
|
|
|
|
|
// RANDOM_DELAY_PEER_PORT_TX_RX_ALL delays outgoing/incoming packets
|
|
|
// from/to the peer ports on all nodes, with randomized time durations.
|
|
|
- // And it waits for "failure-delay-ms" until recovery, likely to trigger
|
|
|
+ // And it waits for "delay-ms" until recovery, likely to trigger
|
|
|
// election timeouts.
|
|
|
// The expected behavior is that cluster may become totally inoperable,
|
|
|
// struggling with slow networks across the whole cluster. Once delay
|
|
|
@@ -500,14 +565,26 @@ enum FailureCase {
|
|
|
// requests.
|
|
|
RANDOM_DELAY_PEER_PORT_TX_RX_ALL = 211;
|
|
|
|
|
|
- // NO_FAIL_WITH_STRESS runs no-op failure injection that does not do
|
|
|
- // anything against cluster for "failure-delay-ms" duration, while
|
|
|
- // stressers are still sending requests.
|
|
|
+ // NO_FAIL_WITH_STRESS stops injecting failures while testing the
|
|
|
+ // consistency and correctness under pressure loads, for the duration of
|
|
|
+ // "delay-ms". Goal is to ensure cluster be still making progress
|
|
|
+ // on recovery, and verify system does not deadlock following a sequence
|
|
|
+ // of failure injections.
|
|
|
+ // The expected behavior is that cluster remains fully operative in healthy
|
|
|
+ // condition. As always, after recovery, each member must be able to process
|
|
|
+ // client requests.
|
|
|
NO_FAIL_WITH_STRESS = 300;
|
|
|
|
|
|
- // NO_FAIL_WITH_NO_STRESS_FOR_LIVENESS runs no-op failure injection
|
|
|
- // that does not do anything against cluster for "failure-delay-ms"
|
|
|
- // duration, while all stressers are stopped.
|
|
|
+ // NO_FAIL_WITH_NO_STRESS_FOR_LIVENESS neither injects failures nor
|
|
|
+ // sends stressig client requests to the cluster, for the duration of
|
|
|
+ // "delay-ms". Goal is to ensure cluster be still making progress
|
|
|
+ // on recovery, and verify system does not deadlock following a sequence
|
|
|
+ // of failure injections.
|
|
|
+ // The expected behavior is that cluster remains fully operative in healthy
|
|
|
+ // condition, and clients requests during liveness period succeed without
|
|
|
+ // errors.
|
|
|
+ // Note: this is how Google Chubby does failure injection testing
|
|
|
+ // https://static.googleusercontent.com/media/research.google.com/en//archive/paxos_made_live.pdf.
|
|
|
NO_FAIL_WITH_NO_STRESS_FOR_LIVENESS = 301;
|
|
|
|
|
|
// FAILPOINTS injects failpoints to etcd server runtime, triggering panics
|
|
|
@@ -518,7 +595,7 @@ enum FailureCase {
|
|
|
EXTERNAL = 500;
|
|
|
}
|
|
|
|
|
|
-enum StressType {
|
|
|
+enum Stresser {
|
|
|
KV = 0;
|
|
|
LEASE = 1;
|
|
|
ELECTION_RUNNER = 2;
|
|
|
@@ -526,3 +603,10 @@ enum StressType {
|
|
|
LOCK_RACER_RUNNER = 4;
|
|
|
LEASE_RUNNER = 5;
|
|
|
}
|
|
|
+
|
|
|
+enum Checker {
|
|
|
+ KV_HASH = 0;
|
|
|
+ LEASE_EXPIRE = 1;
|
|
|
+ RUNNER = 2;
|
|
|
+ NO_CHECK = 3;
|
|
|
+}
|