Closed tehnerd closed 10 months ago
Hey @avasylev do you folks still accept external patches or? There are 0 activity from FB folks in all recently opened PRs
of course we do, just sometimes get caught between things, I'll take care PRs in next couple days.
@avasylev has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@avasylev merged this pull request in facebookincubator/katran@43889f1932c4e7d79e55985e3aa1f4fa35197320.
Right now for ipip healtchecks we are using balancer's source ip. While for data packets (the one which would be actually load balanced) we are using specially crafted (mangled) source IPs to play nice with NIC's RSS. However there could be unfortunate scenarios when backend has some kind of FW rules installed which allow packets from internal IPs (e.g. from 10/8) but do not allow packets from say mangled space (which by default is 172.16/16). In such unfortunate events we could end up w/ load balancer thinks that backend is healthy (because healthchecks are passing just fine; as 10/8 is permitted from firewall point of view) but actually data packets are being dropped / blackholled by FW (because 172.16/16 is not allowed)
This diff creates a common functions which could be reused both in HC and Balancer itself to enable healtchecks source mangling. As well as introduces new compile time flag which enables this feature (so it is no-op for default setup) for ipip healthchecks
Tested by: default katran_tester's UTs are passing as is (both for balancer and healthchecker)
w/ MANGLE_HC_SOURCE define set HC sources became from the "mangled" space