-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: functional-tester: decoupling stresser, fault injector and consistency checker #6446
Comments
/cc @AkihiroSuda |
@mitake I think this is a good idea. We want to make the functionality boundary clear a while ago, but have not got time to do it. @heyitsanthony also has some opinions. I can give this a closer look later this week. |
@mitake It's already possible to bypass consistency check (only do stressing with fault injection https://github.com/coreos/etcd/blob/master/tools/functional-tester/etcd-tester/main.go#L49). If you can help decouple more of those, it would be great. First we need to do compaction more often, before we do the decoupling. Currently, we do compaction every round. If we stop fault injection, we write more keys per round, which would take tester more time to finish compaction. |
@mitake I peeked at your branch and have some suggestions about the general architecture for integrating this. I agree with your observation about the complexity going off the rails-- the on/off booleans seem like too much special casing. It might be worthwhile to have general stresser/checker/fault injection interfaces with several implementations. The The tester would be called like // nopStresser implements Stresser that does nothing
type nopStresser struct {}
func (s *nopStresser) Stress() error { return nil }
func (s *nopStresser) Cancel() {}
func (s *nopStresser) Report() (int, int) { return 0, 0} I'm not familiar with the namazu architecture, but would it be possible to have stresser/fault injector implementations that etcd-tester can call to orchestrate namazu (or some general stresser/injector that can kick off a script that would activate/deactivate namazu)? |
@heyitsanthony the generalized functionalities seem to be good and it will work well with namazu. Can I work on it if you are busy? |
@mitake sure, have at it. |
This commit decouples stresser from the tester of functional-tester. For doing it, this commit adds a new option --stresser to etcd-tester. The option accepts two types of stresser: "default" and "nop". If the option is "default", etcd-tester stresses its etcd cluster with the existing stresser. If the option is "nop", etcd-tester does nothing for stressing. Partially fixes etcd-io#6446
This commit decouples stresser from the tester of functional-tester. For doing it, this commit adds a new option --stresser to etcd-tester. The option accepts two types of stresser: "default" and "nop". If the option is "default", etcd-tester stresses its etcd cluster with the existing stresser. If the option is "nop", etcd-tester does nothing for stressing. Partially fixes etcd-io#6446
@mitake Do you need still more changes to run Please feel free to leave this open. Thanks. |
@heyitsanthony @gyuho I still want to introduce some changes (as Anthony mentioned, decoupling fault injection and agent termination) but they will be straightforward. Closing this issue is ok. I'll open new PRs later. |
Hi @gyuho,
I'm trying to integrate an external fuzzing and fault injection tester (https://github.com/osrg/namazu) to the functional-tester of etcd. The motivation is that fuzzing the well understood workload will increase a chance of finding bugs introduced by newer commits.
For doing it, I tried to decouple the stresser, fault injector and consistency checker for clean integration. Currently these components are tightly integrated and work in a single etcd-tester process. But namazu wants to fuzz the stresser and etcd cluster only. Fault injection is done by namazu and consistency checker shouldn't be fuzzed. So I'm working on some changes of etcd-tester like below:
And I noticed that the changes are introducing complexity to the source of the functional-tester :( So I'm considering that creating individual binaries for each functionality would be better than adding the options (e.g. etcd-stresser, etcd-checker). I'm glad if I can hear opinions.
(My very rought wip branch is here: https://github.com/mitake/etcd/tree/namazu)
The text was updated successfully, but these errors were encountered: