cni-server: fix ovn0 gateway check#6098
Conversation
Summary of ChangesHello @zhangzujian, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue with the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Signed-off-by: zhangzujian <zhangzujian.7@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a fix for the ovn0 gateway check by adding a preferARP flag to the waitNetworkReady function. This allows for more granular control over gateway checking, specifically disabling ARP checks for the ovn0 interface where it might not be reliable. Additionally, the PR refactors hardcoded instances of the string "ovn0" to use the util.NodeNic constant, improving code maintainability. The changes are logical and well-implemented, though I've pointed out a couple of minor issues with log message formatting in fatal error paths that should be addressed for better debuggability.
96f497c to
9897a50
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request addresses an issue with the ovn0 gateway check by introducing a preferARP flag to the waitNetworkReady function. This allows forcing a ping-based check instead of an ARP-based one for the ovn0 interface, which seems to be the intended fix. Additionally, the PR refactors the code to replace the hardcoded string "ovn0" with the util.NodeNic constant, which improves code maintainability and readability. The changes are consistent across all modified files and the logic appears sound. Overall, this is a good improvement.
Signed-off-by: zhangzujian <zhangzujian.7@gmail.com>
Pull Request
What type of this PR
Examples of user facing changes:
Which issue(s) this PR fixes
kube-ovn-cni should restart if ovn0 ipv4 address is missing.