53 Commits

Author SHA1 Message Date
fanmin shi
394ab43587 etcd-tester: refactor lease checker
Move few checking logic from lease stresser to lease checker and change connection logic for lease stresser and checker
2016-11-30 17:29:58 -08:00
fanmin shi
107d7b663c etcd-tester: changed compaction timeout calculation
functional tester sometime experiences timeout during compaction phase. I changed the timeout calculation base on number of entries created and deleted.

FIX #6805
2016-11-08 17:00:04 -08:00
Anthony Romano
308f2a1695 etcd-tester: refactor stresser/checker organization
The checkers and stressers should be composable without special cases; this
patch tries to address that while refactoring out some old cruft.

Namely,
* Single stresser/checker for a tester; built from composition
* Composite stresser via comma-separated list of stressers
* Split stressers into separate files
* Removed v2 only flags and special cases
* Rate limiter shared among key stresser and leases stresser
* Composite checker is now concurrent
* Stresser can return a Checker to check its invariants
* Each lease checker only operates on a single lease stresser
2016-10-31 13:59:04 -07:00
Anthony Romano
86c4a74139 etcd-tester: move stresser and checker to tester
These really belong in tester code; the stressers and
checkers are higher order operations that are orchestrated
by the tester. They're not really cluster primitives.
2016-10-29 10:57:17 -07:00
fanmin shi
34c906be55 functional-tester: fix log statement
simple fix for wrongly printed statement.
2016-10-28 14:27:09 -07:00
fanmin shi
7f5a7d1da5 functional-tester: always clean up if tester encouters an error
The current tester doesn't not clean up if any of the failure injection/recovery fails. if tester fails to recover a dead node, tester hangs in the next round because the tester will keep waiting until cluster becomes healthy which is impossible since a node is down. To fix this issue, we will always clean up if any error happens during each round so that cluster will be healthy for next round.

FIX #6743
2016-10-27 15:07:58 -07:00
fanmin shi
94ea82c00d functional-tester: add logic to ensure etcd node is alive after fault recovery returns
failure recovery needs to wait etcd node to become alive before returning

FIX #6654
2016-10-20 10:31:08 -07:00
fanmin shi
ab2b58a80f functional-tester: add lease stresser
Add lease stresser to test lease code under stress and etcd failures

resolve #6380
2016-10-18 14:20:26 -07:00
fanmin shi
7d86d1050e functional-tester: move checker logic to cluster
I move the checker logic from tester to cluster so that stressers and checkers can be initialized at the same time.
this is useful because some checker depends on stressers.
2016-10-18 11:17:40 -07:00
Anthony Romano
d4eff5381c etcd-tester: split out consistency checking code from tester 2016-09-20 10:26:58 -07:00
Gyu-Ho Lee
0bf2ef3c1b etcd-tester: return error for mismatch rev/hash 2016-08-27 22:14:42 -07:00
Xiang Li
017aac88a8 etcd-tester: do not restart stresser on error 2016-08-27 20:47:45 -07:00
Gyu-Ho Lee
0c37df7265 etcd-tester: fix compact rev counting 2016-08-22 22:58:44 -07:00
Gyu-Ho Lee
c6cf015e26 etcd-tester: fix tester for 5-node cluster
1. fix failure case counting
2. match ErrClientConnClosing in stresser
3. longer timeout for set-health-key
4. fixed range for range/delete stresser
5. remove Limit in RangeRequest
2016-08-07 21:15:01 -07:00
Gyu-Ho Lee
ceb9fe4822 etcd-tester: stop stress before compact, fix races
fix race condition between stresser cancel, start
2016-07-14 12:16:42 -07:00
Gyu-Ho Lee
8e59fb749c etcd-tester: increase default qps, fix cleanup 2016-07-14 11:20:16 -07:00
Anthony Romano
5f459a64ce etcd-tester: refactor cluster member handling 2016-06-29 11:25:33 -07:00
Anthony Romano
63f78bf7c8 etcd-tester: refactor round loop 2016-06-29 11:03:34 -07:00
Gyu-Ho Lee
84953365a2 etcd-tester: cleanup in compact error, log level 2016-06-13 14:54:53 -07:00
Gyu-Ho Lee
5631acdb8f etcd-tester: do not exit for compact timeout
Temporary fix for https://github.com/coreos/etcd/issues/5606.
2016-06-10 09:44:45 -07:00
Gyu-Ho Lee
04039eb006 etcd-tester: more logs for compact operations 2016-05-27 09:55:13 -07:00
Gyu-Ho Lee
3ed5d28e2e etcd-tester: fix, clean up multiple things (#5462)
* etcd-tester: more logging, fix typo

* etcd-tester: fix prevCompactRev scope

Fix https://github.com/coreos/etcd/issues/5440.

* etcd-tester: move utils to bottom, clean up logs

And remove stresser operation inside defrag

* etcd-tester: separate update revision call

* etcd-tester: fix cleanup when case is -1
2016-05-26 11:37:49 -07:00
Gyu-Ho Lee
4c7af825c7 etcd-tester: timeout per number of compact entries
Fix https://github.com/coreos/etcd/issues/5440.
2016-05-25 18:37:13 -07:00
Gyu-Ho Lee
3d523e34b1 tools: update LICENSE header 2016-05-12 20:50:17 -07:00
Gyu-Ho Lee
cc7dd9b729 etcd-tester: refactor 2016-05-05 10:55:42 -07:00
Gyu-Ho Lee
151d0d3831 etcd-tester: flag consistency-check 2016-04-22 22:22:12 -07:00
Gyu-Ho Lee
0feb88cee1 etcd-tester: change var success->failed
Previous success overwrites the later failure.
Make it simpler by changing the variable to 'failed'.
2016-04-22 09:27:37 -07:00
Gyu-Ho Lee
e835d24bea etcd-tester: skip compaction after different hash
When hashes don't match, there could be some nodes
falling behind and the compact request can then error
with 'future revision compact'.
2016-04-20 17:13:51 -07:00
Gyu-Ho Lee
cb280bae91 etcd-tester: fix govet 2016-04-13 11:12:31 -07:00
Gyu-Ho Lee
b866337f25 functional-tester: defrag every 500 round
Fix https://github.com/coreos/etcd/issues/4665.
2016-04-02 18:51:26 -07:00
Anthony Romano
4c65f3fe7a etcd-tester: check compaction revision
Faster than waiting 30 seconds between rounds.
2016-03-30 09:45:30 -07:00
Gyu-Ho Lee
061e996998 functional-tester: remove log prefixes
capnslog already prefixes with its package name.
2016-02-17 19:01:16 -08:00
Gyu-Ho Lee
7aa62ec595 functional-tester: plog for milli-second timestamp
Standard log package by default only prints out the second-scale
so the 3rd party log feeder mixes the order of the events, which makes
the debugging hard. This replaces it with capnslog and make them consistent
with all other etcd log formats.
2016-02-17 18:39:05 -08:00
Xiang Li
c15b2a5077 Merge pull request #4514 from xiang90/tester
tools/functional-tester: add metrics
2016-02-12 14:45:10 -08:00
Xiang Li
1bec0e6a0b tools/functional-tester: add metrics 2016-02-12 14:42:41 -08:00
Gyu-Ho Lee
5b2847b338 etcd-tester: use Hash method to get both revision and hash 2016-02-12 14:40:51 -08:00
Gyu-Ho Lee
7d2b7e0d23 etcd-tester: close leaky gRPC connections
when closed errors will be one of:

```
grpc.ErrorDesc(err) == context.Canceled.Error() ||
grpc.ErrorDesc(err) == context.DeadlineExceeded.Error() ||
grpc.ErrorDesc(err) == "transport is closing" ||
grpc.ErrorDesc(err) == "grpc: the client connection is closing"
```
2016-02-09 16:26:33 -08:00
Gyu-Ho Lee
16aa263d8c etcd-tester: continue after cleanup 2016-02-09 13:32:39 -08:00
Gyu-Ho Lee
e252c0c0ca etcd-tester: fix wrong error checking
Hash method returns either (nil, err) or (Hash, nil).
The current error checking is wrong. It only needs to check
the error is either nil or non-nil.

This causes panic in https://github.com/coreos/etcd/issues/4463
by allowing the case when resp is nil, but err is not nil.
2016-02-09 10:00:05 -08:00
Xiang Li
25834211a9 etcd-tester: cleanup 2016-02-08 20:54:25 -08:00
Gyu-Ho Lee
16543778f1 etcd-tester: avoid directory name conflict 2016-02-08 13:38:26 -08:00
Gyu-Ho Lee
08dbabdb5f etcd-tester: add compactKV
It compacts storage for every case.
For https://github.com/coreos/etcd/issues/4380.
2016-02-06 15:02:58 -08:00
Gyu-Ho Lee
044f7775e3 etcd-tester: log cancel in stresser
And fix some minor print formats.
2016-02-05 18:31:27 -08:00
Gyu-Ho Lee
09fc764552 functional-tester/etcd-tester: silent grpclog, check revs 2016-02-05 14:04:58 -08:00
Gyu-Ho Lee
85a4a5b596 functional-tester: fix grpc endpoint, consistent check
And some clean ups.
2016-02-04 15:10:43 -08:00
Xiang Li
46ebb83b90 tools/functional-tester/etcd-tester: report agent status 2015-03-13 15:29:57 -07:00
Xiang Li
462f32a81b tools/functional-tester: add http status reporter 2015-03-12 12:49:48 -07:00
Yicheng Qin
eba6daef4b Merge pull request #2450 from yichengq/335
tools/functional-tester: add cleanup rpc
2015-03-05 16:36:16 -08:00
Yicheng Qin
2152447361 tools/functional-tester: add cleanup rpc 2015-03-05 15:55:28 -08:00
Yicheng Qin
267313a3f8 tools/etcd-tester: add kill majority test 2015-03-05 15:14:14 -08:00