Skip to content

Conversation

zasweq
Copy link
Contributor

@zasweq zasweq commented Oct 7, 2020

Commit Message: Added least request load balancer fuzz. It uses the same health check fuzz base class as #13400.
Additional Description: 56.6% line coverage over source/common/upstream/load_balancer_impl.cc. Runs at 25 - 30 exec/sec.
Risk Level: Low
Testing:
Docs Changes:
Release Notes:

zasweq added 21 commits October 1, 2020 22:24
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
Signed-off-by: Zach <zasweq@google.com>
@zasweq
Copy link
Contributor Author

zasweq commented Oct 7, 2020

/assign @asraa @adisuissa

Signed-off-by: Zach <zasweq@google.com>
uint32_t num_excluded_hosts) {
MockHostSet& host_set = *priority_set_.getMockHostSet(int(failover_host_set));
uint32_t i = 0;
for (; i < num_healthy_hosts && i < host_set.hosts_.size(); ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, reserve space in host_set.healthy_hosts_ before appending.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do, thanks!

@zasweq zasweq closed this Oct 8, 2020
htuch pushed a commit that referenced this pull request Oct 20, 2020
Part of securing Envoy against untrusted upstreams. The high level design of this fuzzer is a base class that handles static host setup/updates, setting up random() calls, and replays the action stream. Then, more specific fuzzers (in this pull request, random), create specific load balancers with all the state they need, pass it into the base class, which then runs checks on it. #13424 also uses this design pattern, except with a least request load balancer, however using the same shared base class.

43.6% line coverage over source/common/upstream/load_balancer_impl.cc, 30ish exec/sec.

Risk Level: Low
Testing: Added corpus entries that represent unit tests.

Signed-off-by: Zach <zasweq@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants