Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
proxy/ipvs: Only compute node ip addresses once per sync #79444
What type of PR is this?
What this PR does / why we need it:
This PR rearranges the
Previously the same ip addresses would be computed for each nodePort service and this could be CPU intensive for a large number of nodePort services with a large number of ipaddresses on the node.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Hi @cezarsa. Thanks for your PR.
I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with
Once the patch is verified, the new status will be reflected by the
I understand the commands that are listed here.
referenced this pull request
Jun 26, 2019
[APPROVALNOTIFIER] This PR is APPROVED
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing
Jul 24, 2019
23 checks passed
Thanks @lbernail! About your suggestion on ignoring the
To retrieve the IP addresses from the kernel a netlink RTM_GETADDR request is issued. One of the flags that can be be set is NLM_F_MATCH to filter the response, however according to the man page this flag is not implemented yet in the kernel. This also applies to getting routes from the kernel with RTM_GETROUTE. I found this somewhat old discussion on the subject here https://lists.infradead.org/pipermail/libnl/2013-June/001014.html.
To make sure this is what happens today I tested running
On both cases I can see on the response messages all interfaces addresses being returned by the kernel (strace output edited for clarity):
Sure we could still filter try improving the way we filter the
Again I might be wrong as I have very little experience with interacting directly with netlink. It would be great if some of you folks with more kernel/netlink expertise could take a look at this and see if this makes sense.