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

support ovn ic ecmp #3348

Merged
merged 14 commits into from
Nov 13, 2023
Merged

support ovn ic ecmp #3348

merged 14 commits into from
Nov 13, 2023

Conversation

changluyi
Copy link
Collaborator

@changluyi changluyi commented Oct 30, 2023

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes:

Fixes #(issue-number)

WHAT

🤖 Generated by Copilot at 0efe216

This pull request implements and tests the new design of the interconnection feature for kind clusters, which uses multiple logical switches and ports instead of one shared switch and port. It also fixes a dependency issue with the k8s.io/endpointslice module and adds some comments and external IDs to improve the code readability and reliability. The changes affect the Makefile, mocks/pkg/ovs/interface.go, pkg/controller/ovn-ic.go, test/e2e/ovn-ic/e2e_test.go, go.mod, pkg/ovs/interface.go, pkg/ovs/ovn-nb-logical_router_policy.go, and yamls/kind.yaml.j2 files.

🤖 Generated by Copilot at 0efe216

We're the crew of the ovn-ic, we sail the k8s sea
We interconnect the clusters with switches and policies
We heave and haul the LogicalRouterPolicy on the count of three
We fix the go.mod and the kind.yaml with glee

HOW

🤖 Generated by Copilot at 0efe216

  • Add a replace directive to fix a dependency issue with k8s.io/endpointslice (link)
  • Modify the Makefile to create two worker nodes and a control plane node for each kind cluster, and to remove the taint from the control plane node (link, link, link, link)
  • Modify the establishInterConnection function to create one logical switch and one logical patch port for each gateway node, and to simplify the logic (link, link)
  • Remove the waitTsReady function, which is no longer needed (link)
  • Replace the waitTsReady function with the createTS function, which creates a logical switch with the external ID of the subnet (link)
  • Modify the syncOneRouteToPolicy function to use the GetLogicalRouterPoliciesByExtID method, which gets the logical router policies by the external ID of the cluster, and to improve the performance and readability of the code (link, link)
  • Modify the test cases to check for the existence of the logical switch ts0 and the logical switch ports ts0-az in each cluster (link, link, link)
  • Add the GetLogicalRouterPoliciesByExtID method to the LogicalRouterPolicy and NbClient interfaces, and implement the method in the ovn-nb-logical_router_policy.go file (link, link, link, link)
  • Modify the removeInterConnection function to comment out some lines that delete the logical router ports and the logical switches, and to add a TODO comment to use external ID to delete ports (link)
  • Rename the startOvnIC and stopOvnIC functions to startOVNIC and stopOVNIC, and remove some redundant error logs (link, link, link)
  • Modify the acquireLrpAddress function to fix some typos in the error messages, and to remove the line that checks the protocol of the logical switch port address (link)
  • Add an import statement for the github.com/kubeovn/kube-ovn/pkg/ovs package to the pkg/controller/ovn-ic.go file (link)
  • Add some lines to the yamls/kind.yaml.j2 file to specify that the node is a worker node, and to set the image to the kindest/node with the k8s version variable (link)

@changluyi changluyi force-pushed the ovn-ic-ecmp-master branch 2 times, most recently from a3b44a0 to 88a9581 Compare November 2, 2023 02:15
@zhangzujian
Copy link
Member

E2E test should be added.

@changluyi
Copy link
Collaborator Author

E2E test should be added.

1

@changluyi changluyi requested a review from zhangzujian November 6, 2023 01:16
@zhangzujian zhangzujian added the feature New network feature label Nov 6, 2023
@oilbeater
Copy link
Collaborator

Need update the docs to describe new usage

@zhangzujian
Copy link
Member

  STEP: Waiting for ecmp gateway to be applied @ 11/08/23 11:08:02.839
  [FAILED] in [It] - /home/runner/work/kube-ovn/kube-ovn/test/e2e/ovn-ic/e2e_test.go:260 @ 11/08/23 11:08:18.27
  STEP: Destroying namespace "ovn-ic-6110" for this suite. @ 11/08/23 11:08:18.271
  STEP: Destroying namespace "ovn-ic-1050" for this suite. @ 11/08/23 11:08:18.274
  << Timeline

  [FAILED] Expected
      <int>: 6
  to equal
      <int>: 3
  In [It] at: /home/runner/work/kube-ovn/kube-ovn/test/e2e/ovn-ic/e2e_test.go:260 @ 11/08/23 11:08:18.27

yamls/kind.yaml.j2 Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@oilbeater
Copy link
Collaborator

need rebase

Signed-off-by: changluyi <[email protected]>
Signed-off-by: changluyi <[email protected]>
Signed-off-by: Changlu Yi <[email protected]>
Signed-off-by: changluyi <[email protected]>
Signed-off-by: changluyi <[email protected]>
Signed-off-by: Changlu Yi <[email protected]>
Signed-off-by: Changlu Yi <[email protected]>
Signed-off-by: Changlu Yi <[email protected]>
Signed-off-by: Changlu Yi <[email protected]>
Signed-off-by: Changlu Yi <[email protected]>
Signed-off-by: changluyi <[email protected]>
Signed-off-by: changluyi <[email protected]>
@changluyi
Copy link
Collaborator Author

need rebase

1

@changluyi changluyi merged commit bbdf6c6 into master Nov 13, 2023
@changluyi changluyi deleted the ovn-ic-ecmp-master branch November 13, 2023 11:54
changluyi added a commit that referenced this pull request Nov 14, 2023
* support ovn ic ecmp

Signed-off-by: changluyi <[email protected]>
changluyi added a commit that referenced this pull request Nov 14, 2023
* support ovn ic ecmp

Signed-off-by: changluyi <[email protected]>
zbb88888 pushed a commit that referenced this pull request Nov 14, 2023
* support ovn ic ecmp

Signed-off-by: changluyi <[email protected]>
zbb88888 pushed a commit that referenced this pull request Nov 17, 2023
* support ovn ic ecmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New network feature need backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants