| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- syntax = "proto3";
- package rpcpb;
- import "github.com/gogo/protobuf/gogoproto/gogo.proto";
- option (gogoproto.marshaler_all) = true;
- option (gogoproto.sizer_all) = true;
- option (gogoproto.unmarshaler_all) = true;
- option (gogoproto.goproto_getters_all) = false;
- service Transport {
- rpc Transport(stream Request) returns (stream Response) {}
- }
- enum Operation {
- NotStarted = 0;
- // InitialStartEtcd is only called to start etcd very first time.
- InitialStartEtcd = 1;
- // RestartEtcd is sent to restart killed etcd.
- RestartEtcd = 2;
- // KillEtcd pauses etcd process while keeping data directories
- // and previous etcd configurations.
- KillEtcd = 3;
- // FailArchive is sent when consistency check failed,
- // thus need to archive etcd data directories.
- FailArchive = 4;
- // DestroyEtcdAgent destroys etcd process, etcd data, and agent server.
- DestroyEtcdAgent = 5;
- BlackholePeerPortTxRx = 100;
- UnblackholePeerPortTxRx = 101;
- DelayPeerPortTxRx = 102;
- UndelayPeerPortTxRx = 103;
- }
- message Etcd {
- string Name = 1 [(gogoproto.moretags) = "yaml:\"name\""];
- string DataDir = 2 [(gogoproto.moretags) = "yaml:\"data-dir\""];
- string WALDir = 3 [(gogoproto.moretags) = "yaml:\"wal-dir\""];
- repeated string ListenClientURLs = 4 [(gogoproto.moretags) = "yaml:\"listen-client-urls\""];
- repeated string AdvertiseClientURLs = 5 [(gogoproto.moretags) = "yaml:\"advertise-client-urls\""];
- repeated string ListenPeerURLs = 6 [(gogoproto.moretags) = "yaml:\"listen-peer-urls\""];
- repeated string InitialAdvertisePeerURLs = 7 [(gogoproto.moretags) = "yaml:\"initial-advertise-peer-urls\""];
- string InitialCluster = 8 [(gogoproto.moretags) = "yaml:\"initial-cluster\""];
- string InitialClusterState = 9 [(gogoproto.moretags) = "yaml:\"initial-cluster-state\""];
- string InitialClusterToken = 10 [(gogoproto.moretags) = "yaml:\"initial-cluster-token\""];
- int64 SnapshotCount = 11 [(gogoproto.moretags) = "yaml:\"snapshot-count\""];
- int64 QuotaBackendBytes = 12 [(gogoproto.moretags) = "yaml:\"quota-backend-bytes\""];
- bool PreVote = 13 [(gogoproto.moretags) = "yaml:\"pre-vote\""];
- bool InitialCorruptCheck = 14 [(gogoproto.moretags) = "yaml:\"initial-corrupt-check\""];
- // TODO: support TLS
- }
- 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.
- string AgentAddr = 11 [(gogoproto.moretags) = "yaml:\"agent-addr\""];
- // FailpointHTTPAddr is the agent's failpoints HTTP server address.
- string FailpointHTTPAddr = 12 [(gogoproto.moretags) = "yaml:\"failpoint-http-addr\""];
- // BaseDir is the base directory where all logs and etcd data are stored.
- string BaseDir = 101 [(gogoproto.moretags) = "yaml:\"base-dir\""];
- // EtcdLogPath is the log file to store current etcd server logs.
- string EtcdLogPath = 102 [(gogoproto.moretags) = "yaml:\"etcd-log-path\""];
- // EtcdClientTLS is true when client traffic needs to be encrypted.
- bool EtcdClientTLS = 201 [(gogoproto.moretags) = "yaml:\"etcd-client-tls\""];
- // EtcdClientProxy is true when client traffic needs to be proxied.
- // If true, listen client URL port must be different than advertise client URL port.
- bool EtcdClientProxy = 202 [(gogoproto.moretags) = "yaml:\"etcd-client-proxy\""];
- // EtcdPeerProxy is true when peer traffic needs to be proxied.
- // If true, listen peer URL port must be different than advertise peer URL port.
- bool EtcdPeerProxy = 203 [(gogoproto.moretags) = "yaml:\"etcd-peer-proxy\""];
- // EtcdClientEndpoint is the etcd client endpoint.
- string EtcdClientEndpoint = 204 [(gogoproto.moretags) = "yaml:\"etcd-client-endpoint\""];
- // Etcd defines etcd binary configuration flags.
- Etcd Etcd = 301 [(gogoproto.moretags) = "yaml:\"etcd\""];
- }
- enum FailureCase {
- KILL_ONE_FOLLOWER = 0;
- KILL_LEADER = 1;
- KILL_ONE_FOLLOWER_FOR_LONG = 2;
- KILL_LEADER_FOR_LONG = 3;
- KILL_QUORUM = 4;
- KILL_ALL = 5;
- BLACKHOLE_PEER_PORT_TX_RX_ONE_FOLLOWER = 6;
- BLACKHOLE_PEER_PORT_TX_RX_LEADER = 7;
- BLACKHOLE_PEER_PORT_TX_RX_ALL = 8;
- DELAY_PEER_PORT_TX_RX_ONE_FOLLOWER = 9;
- DELAY_PEER_PORT_TX_RX_LEADER = 10;
- DELAY_PEER_PORT_TX_RX_ALL = 11;
- FAILPOINTS = 100;
- NO_FAIL = 200;
- // TODO: support no-op of liveness duration
- // NO_FAIL_LIVENESS = 201;
- EXTERNAL = 300;
- }
- enum StressType {
- KV = 0;
- LEASE = 1;
- NO_STRESS = 2;
- ELECTION_RUNNER = 3;
- WATCH_RUNNER = 4;
- LOCK_RACER_RUNNER = 5;
- LEASE_RUNNER = 6;
- }
- message Tester {
- string TesterNetwork = 1 [(gogoproto.moretags) = "yaml:\"tester-network\""];
- string TesterAddr = 2 [(gogoproto.moretags) = "yaml:\"tester-addr\""];
- // DelayLatencyMsRv is the delay latency in milliseconds,
- // to inject to simulated slow network.
- uint32 DelayLatencyMs = 11 [(gogoproto.moretags) = "yaml:\"delay-latency-ms\""];
- // DelayLatencyMsRv is the delay latency random variable in milliseconds.
- uint32 DelayLatencyMsRv = 12 [(gogoproto.moretags) = "yaml:\"delay-latency-ms-rv\""];
- // 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\""];
- // EnablePprof is true to enable profiler.
- bool EnablePprof = 24 [(gogoproto.moretags) = "yaml:\"enable-pprof\""];
- // FailureCases is the selected test cases to schedule.
- // If empty, run all failure cases.
- // TODO: support no-op
- repeated string FailureCases = 31 [(gogoproto.moretags) = "yaml:\"failure-cases\""];
- // FailureShuffle is true to randomize failure injecting order.
- bool FailureShuffle = 32 [(gogoproto.moretags) = "yaml:\"failure-shuffle\""];
- // FailpointCommands is the list of "gofail" commands (e.g. panic("etcd-tester"),1*sleep(1000)).
- repeated string FailpointCommands = 33 [(gogoproto.moretags) = "yaml:\"failpoint-commands\""];
- // RunnerExecPath is a path of etcd-runner binary.
- string RunnerExecPath = 41 [(gogoproto.moretags) = "yaml:\"runner-exec-path\""];
- // 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\""];
- // StressKeySize is the size of each small key written into etcd.
- int32 StressKeySize = 102 [(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\""];
- // 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\""];
- // 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\""];
- // StressKeyTxnOps is the number of operations per a transaction (max 64).
- int32 StressKeyTxnOps = 106 [(gogoproto.moretags) = "yaml:\"stress-key-txn-ops\""];
- // StressQPS is the maximum number of stresser requests per second.
- int32 StressQPS = 107 [(gogoproto.moretags) = "yaml:\"stress-qps\""];
- }
- message Request {
- Operation Operation = 1;
- Member Member = 2;
- Tester Tester = 3;
- }
- message Response {
- bool Success = 1;
- string Status = 2;
- // TODO: support TLS
- }
|