-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Rework error handling logic in neighbor discovery #35144
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
Rework error handling logic in neighbor discovery #35144
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
cb1041f
to
324355b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
324355b
to
624e2d8
Compare
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🎉
Add AllMatch function that returns true if the predicate evaluates to true for each element in the slice. Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
When a new node is discovered, in case of a multi-devices environment, we loop over each neighbor discovery link to found the next hop IP for the given node. For each link, if a next hop is found, it is inserted in the related neighNextHopByNode4 map. In this setup, it is possible that a node is reachable only by a subset of the neighbor discovery links. This case should not be considered an error, as long as the node is reachable by at least one link. Therefore, the errors handling logic is changed to propagate an error only when it is not possible to find a next hop for any link. This also reduces the amount of memory used for joining all the strings related to the false error condition described above, besides reducing the amount of useless retry runs of the node-neighbor-link-updater controller. Fixes: cilium#34020 Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
624e2d8
to
192a35e
Compare
/test |
Reviews are in and all required tests are green, marking ready to merge |
👋 is this worth backporting? |
@julianwiedmann I think it should be, yes, as evidenced by #35926. I can submit a PR if needed (both commits apply cleanly to |
Yep, being a bug it should be backported.
Np, I'm gonna take care of that, thanks anyway! 🤝 |
When a new node is discovered, in case of a multi-devices environment, we loop over each neighbor discovery link to found the next hop IP for the given node. For each link, if a next hop is found, it is inserted in the related neighNextHopByNode4 map.
In this setup, it is possible that a node is reachable only by a subset of the neighbor discovery links. This case should not be considered an error, as long as the node is reachable by at least one link. Therefore, the errors handling logic is changed to propagate an error only when it is not possible to find a next hop for any link.
This also reduces the amount of memory used for joining all the strings related to the false error condition described above, besides reducing the amount of useless retry runs of the node-neighbor-link-updater controller.
Related: #34020