Skip to content

Conversation

@changluyi
Copy link
Collaborator

  1. fix underlay metallb ipv6 err

Pull Request

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes

Fixes #(issue-number)

2. fix underlay metallb ipv6 err

Signed-off-by: clyi <[email protected]>
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Jan 16, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @changluyi, 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 delivers crucial bug fixes and enhancements to improve the stability and compatibility of MetalLB within an underlay network, especially when integrated with U2O interconnection and handling IPv6 traffic. The changes ensure proper IPv6 address representation in load balancer backends, enable dynamic updates for U2O MAC changes, and expand testing capabilities for diverse IP configurations. These updates collectively contribute to a more robust external load balancing solution.

Highlights

  • MetalLB Underlay Fixes: Resolved issues causing MetalLB underlay errors, particularly when U2O (Underlay-to-Overlay) interconnection is enabled and dealing with IPv6 addresses.
  • IPv6 Address Formatting: Implemented correct formatting for IPv6 addresses in load balancer backend configurations within OVN, ensuring they are enclosed in square brackets (e.g., [::1]:80) to prevent parsing ambiguities.
  • Dynamic U2O Interconnection MAC Handling: Introduced logic to detect and react to changes in a subnet's U2O interconnection MAC address, triggering a re-sync of affected services to ensure correct traffic routing for external load balancers.
  • Enhanced Kind Testing Targets: Added new kind Makefile targets to facilitate testing of MetalLB pools with IPv6 and dual-stack configurations, improving the robustness of the testing environment.
  • Graceful patch-localnet Port Handling: Modified the flow cache update mechanism to gracefully handle scenarios where the patch-localnet port is not found, logging a debug message instead of returning an error, which is common when no pods are present on a node.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/build-x86-image.yaml
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several fixes and improvements related to MetalLB in underlay network configurations, particularly for Underlay-to-Overlay (U2O) and IPv6 scenarios. Key changes include correctly formatting IPv6 backend addresses for OVN load balancers, dynamically handling U2O interconnection MAC address changes to ensure correct traffic routing, and improving the robustness of flow rule creation on nodes without pods. Additionally, new Makefile targets have been added to facilitate testing IPv6 and dual-stack underlay setups. My review identifies a minor redundancy in the logic for handling MAC address changes, which can be simplified for better code clarity.

Comment on lines +239 to +241
if newMAC == "" && oldMAC == "" {
return nil
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This check is redundant. The preceding check if oldMAC == newMAC on line 235 already handles the case where both MAC addresses are empty strings. Removing this block will make the code slightly cleaner and more concise.

@coveralls
Copy link

coveralls commented Jan 16, 2026

Pull Request Test Coverage Report for Build 21055024629

Details

  • 0 of 62 (0.0%) changed or added relevant lines in 3 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.02%) to 21.401%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/daemon/flow_rules_linux.go 0 2 0.0%
pkg/controller/endpoint_slice.go 0 5 0.0%
pkg/daemon/controller_linux.go 0 55 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/daemon/controller_linux.go 1 0.0%
pkg/daemon/flow_rules_linux.go 1 0.0%
Totals Coverage Status
Change from base Build 21054498978: -0.02%
Covered Lines: 10635
Relevant Lines: 49695

💛 - Coveralls

Signed-off-by: clyi <[email protected]>
@changluyi changluyi merged commit 545c01c into release-1.14 Jan 16, 2026
71 of 74 checks passed
@changluyi changluyi deleted the fix_underlay_metallb_ipv6_u2o_issue branch January 16, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants