Skip to content

Conversation

@andrewlee1089
Copy link
Contributor

@andrewlee1089 andrewlee1089 commented Oct 28, 2025

OVN-Interconnect: Only set-up LRP/LSP between the transit switches and default router if we want to.

This allows people to create transit switches and only have non-default routers connected to them

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)

default router if we want to.

This allows people to create transit switches and only have non-default
routers connected to them

Signed-off-by: Andrew Lee <[email protected]>
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 28, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @andrewlee1089, 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 enhances the OVN-Interconnect functionality by introducing a new configuration parameter, interconnect-default-router. This parameter provides granular control over the automatic establishment of network connections (LRPs and LSPs) between transit switches and the default cluster router. The primary purpose is to offer greater flexibility, allowing users to configure transit switches to interact solely with non-default routers, thereby supporting more diverse network topologies. The default setting ensures backward compatibility, maintaining current operational behavior.

Highlights

  • New Configuration Option: Introduced a new configuration option, interconnect-default-router, to control whether Logical Router Ports (LRPs) and Logical Switch Ports (LSPs) are set up between transit switches and the default router.
  • Conditional LRP/LSP Setup: The creation of LRPs and LSPs for the default router is now conditional, allowing users to prevent this setup if interconnect-default-router is set to false.
  • Enhanced Flexibility: This change enables more flexible OVN-Interconnect deployments, allowing transit switches to be configured to connect exclusively with non-default routers.
  • Default Behavior Preserved: The default value for interconnect-default-router is true, ensuring that existing OVN-Interconnect deployments maintain their current behavior without requiring configuration changes.
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.

@dosubot dosubot bot added the feature New network feature label Oct 28, 2025
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 a new configuration option interconnect-default-router to conditionally set up the Logical Router Port (LRP) and Logical Switch Port (LSP) between transit switches and the default router. This change allows for more flexible network topologies where transit switches might not need to be connected to the default router. The implementation is straightforward, adding a check for this new configuration flag before creating the ports. My review includes a suggestion to simplify the boolean flag parsing for better code conciseness.

Comment on lines +295 to +299
var interconnectDefaultRouter = true
val, ok := config["interconnect-default-router"]
if ok && val == "false" {
interconnectDefaultRouter = false
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The logic for parsing the interconnect-default-router boolean flag can be simplified. Instead of initializing the variable and then conditionally changing it, you can determine its value in a single, more idiomatic line. This improves readability and conciseness.

Suggested change
var interconnectDefaultRouter = true
val, ok := config["interconnect-default-router"]
if ok && val == "false" {
interconnectDefaultRouter = false
}
interconnectDefaultRouter := config["interconnect-default-router"] != "false"

@andrewlee1089
Copy link
Contributor Author

Hi all - this is small feature change I need for my work prototyping having OVN interconnect with kube-ovn - where I would like to control the interconnect config (I want transit switches per VPC and I don't want the transit switches connected to the ovn-default VPC)

@oilbeater
Copy link
Collaborator

@andrewlee1089 I think if it's for prototyping, we can manually verify this scenario through commands first. This change isn’t a complete solution yet—it still requires many other manual commands to achieve the goal, so it’s not suitable for merging now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New network feature size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants