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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix underlay access to node through ovn0 when u2o enable #2842

Merged
merged 1 commit into from
May 23, 2023

Conversation

changluyi
Copy link
Collaborator

@changluyi changluyi commented May 22, 2023

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes:

Fixes #2807

WHAT

🤖 Generated by Copilot at 7869a3d

Enhance the underlay to overlay interconnection feature by rerouting the traffic from the underlay subnet to the gateway node. Update the test function to check the new logical router policies.

🤖 Generated by Copilot at 7869a3d

Oh we are the OVN crew and we work on the kube
We add and check policies for the underlay and overlay
Heave away, heave away, on the count of three
We reroute the traffic to the gateway IP

HOW

🤖 Generated by Copilot at 7869a3d

  • Reroute traffic from underlay subnet to gateway node for interconnection (link, link)
  • Update test function to check the updated policy2 (link)

@github-actions
Copy link
Contributor

  • Priority 1: In the subnet.go file, line 2370, there is a typo in the "action" field of policy2. It should be "route" instead of "reoute".
  • Priority 2: In the subnet.go file, line 2380, the "nextHop" parameter is not defined before being used in the AddLogicalRouterPolicy function. This could cause an error during runtime.
  • Priority 3: In the subnet.go file, lines 2365-2374, the indentation of the policies is inconsistent, which could make the code harder to read and maintain.
  • Priority 4: In the underlay.go file, lines 613 and 617, the order of the "dst" and "src" fields in the "hitPolicyStr" variables is inconsistent with the order in the "match" field of the corresponding policies in the subnet.go file. This could lead to confusion and errors when debugging or modifying the code.
  • Priority 5: In the underlay.go file, line 611, the "allow" action in the "hitPolicyStr" variable for policy1 should be changed to "deny" to match the policy in the subnet.go file.

@github-actions
Copy link
Contributor

  • In subnet.go, line 2370, the action "reoute" should be corrected to "reroute".
  • In subnet.go, line 2381, the argument for the AddLogicalRouterPolicy function is missing a required parameter. It should have a non-nil slice of strings as the fifth argument.
  • In underlay.go, line 614, there is a typo in the variable name "asName". It should be "agName".
  • In underlay.go, line 618, the policy action "reroute" should have a next hop IP address specified as the last argument.
  • In underlay.go, line 610, the hitPolicyStr string is missing a condition to match the source IP address. This could potentially cause routing issues.

@patriziobassi
Copy link

i "backported" to 1.11.5, it seems working fine! great, great, great job

@changluyi changluyi force-pushed the fix_underlay_visit_node branch from 1b3bb35 to 96a516e Compare May 23, 2023 01:14
@github-actions
Copy link
Contributor

  • Priority 1: In the subnet.go file, line 2368, there is a typo in the "action" field of policy2. It should be "route physical gw" instead of "reoute physical gw".
  • Priority 2: In the subnet.go file, line 2380, the "nextHop" parameter is not defined in the function call to AddLogicalRouterPolicy. This could cause issues with routing.
  • Priority 3: In the underlay.go file, line 612, the hitPolicyStr for policy2 has an incorrect format. The "reroute" action should come before the source IP address.
  • Priority 4: In the subnet.go file, line 2366, there is a missing space between "ip4.dst" and "==". This could cause issues with matching the correct IP addresses.
  • Priority 5: In the subnet.go file, line 2372, there is a missing space between "ip4.src" and "==". This could cause issues with matching the correct IP addresses.

@changluyi changluyi added bug Something isn't working need backport labels May 23, 2023
@changluyi changluyi requested a review from oilbeater May 23, 2023 01:56
@changluyi changluyi changed the title fix underlay access to node through ovn0 when u2o enable fix underlay access to node through ovn0 May 23, 2023
@changluyi changluyi changed the title when u2o enable fix underlay access to node through ovn0 when u2o enable, fix underlay access to node through ovn0 May 23, 2023
@changluyi changluyi changed the title when u2o enable, fix underlay access to node through ovn0 fix underlay access to node through ovn0 when u2o enable May 23, 2023
@changluyi changluyi merged commit 175fb26 into master May 23, 2023
@changluyi changluyi deleted the fix_underlay_visit_node branch May 23, 2023 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants