Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix missing main route table for the default vpc #2785

Merged
merged 1 commit into from May 11, 2023

Conversation

zhangzujian
Copy link
Member

@zhangzujian zhangzujian commented May 11, 2023

What type of this PR

  • Bug fixes

Which issue(s) this PR fixes:

Fixes #(issue-number)

WHAT

馃 Generated by Copilot at 1959a1e

Fix route table sync for VPCs with implicit main route table. Include the main route table of the VPC in the rtbs map in pkg/controller/vpc.go.

馃 Generated by Copilot at 1959a1e

rtbs map expands
to include main route table
cutting sync errors

HOW

馃 Generated by Copilot at 1959a1e

  • Ensure main route table is always in rtbs map (link)

@github-actions
Copy link
Contributor

  • The addition of rtbs[util.MainRouteTable] = nil in line 277 might cause unexpected behavior. It is recommended to add a comment explaining the reason for this change and how it affects the code logic.
  • The error handling in lines 284-287 could be improved. Instead of checking if the error is not found, it would be better to check if the error is found and handle it accordingly. This will prevent unexpected errors from being ignored.
  • The function c.getRouteTablesByVpc(vpc) in line 275 should have a comment explaining what it does and how it affects the code logic. This will make it easier for other developers to understand the code.
  • The variable name joinSubnet in line 280 is not descriptive enough. It is recommended to use a more descriptive name that reflects its purpose in the code.
  • The function handleAddOrUpdateVpc(key string) error in line 269 should have a comment explaining what it does and how it affects the code logic. This will make it easier for other developers to understand the code.

@zhangzujian zhangzujian merged commit b9542ad into kubeovn:master May 11, 2023
58 checks passed
@zhangzujian zhangzujian deleted the fix-route-table branch May 11, 2023 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants