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 NodePortLocal on Windows agent and update NPL annotation #3826

Closed
6 tasks done
XinShuYang opened this issue May 25, 2022 · 4 comments · Fixed by #3945
Closed
6 tasks done

Support NodePortLocal on Windows agent and update NPL annotation #3826

XinShuYang opened this issue May 25, 2022 · 4 comments · Fixed by #3945
Labels
area/proxy/nodeportlocal Issues or PRs related to the NodePortLocal feature kind/feature Categorizes issue or PR as related to a new feature.

Comments

@XinShuYang
Copy link
Contributor

XinShuYang commented May 25, 2022

Describe the problem/challenge you have
There's no Windows agent support for NPL so far. We can implement windows npl rules with NetNatStaticMapping.

Describe the solution you'd like

  • Windows NPL rule support. We have NetNatStaticMapping implementation now.
  • E2e framework update. It should support configmap update on Windows Node.
  • NPL e2e test support on windows.
  • A new Windows testbed with updated ovs. Currently NPL e2e test on windows is error prone due to HNScall stuck issue. We should skip npl e2e test on windows CI pipeline until the ovs issue is fixed.
  • Support protocol-independent NPL annotation. Starting from Antrea v1.7, the protocols field is deprecated and only contains a single member which is equal to protocol field.
  • Unified implementation across Linux & Windows. Linux agent should allocate different nodeport value for UDP & TCP when the podPort is the same just like windows implementation.
@XinShuYang XinShuYang added kind/feature Categorizes issue or PR as related to a new feature. area/proxy/nodeportlocal Issues or PRs related to the NodePortLocal feature labels May 25, 2022
@XinShuYang XinShuYang changed the title Support NodePortLocal on Windows agent Support NodePortLocal on Windows agent and update NPL annotation May 25, 2022
XinShuYang added a commit to XinShuYang/antrea that referenced this issue May 25, 2022
* Support NodePortLocal rules on by using NetNatStaticMapping on windows
* Support NPL agent on Windows platform
* Require the same Antrea NPL configuration as Linux

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue May 25, 2022
Currently mutateAntreaConfigMap can only support linux agent configmap.
This patch will support windows configmap processing.

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue May 25, 2022
* Add NPL Netnat rules check on windows
* Replace busybox with agnhost as the client pod
* Still skip windows test by default due to the ovs HNSCall issue

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue May 25, 2022
* Add protocol string to new NPLAnnotation set the protocols map as a deprecated value.
* Support Node port for UDP and TCP using the different number for a single Pod on Windows.

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue May 29, 2022
* Support NodePortLocal rules on by using NetNatStaticMapping on windows
* Support NPL agent on Windows platform
* Require the same Antrea NPL configuration as Linux

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue May 29, 2022
Currently mutateAntreaConfigMap can only support linux agent configmap.
This patch will support windows configmap processing.

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue May 29, 2022
* Add NPL Netnat rules check on windows
* Replace busybox with agnhost as the client pod
* Still skip windows test by default due to the ovs HNSCall issue

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue May 29, 2022
* Add protocol string to new NPLAnnotation set the protocols map as a deprecated value.
* Support Node port for UDP and TCP using the different number for a single Pod on Windows.

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue May 30, 2022
* Support NodePortLocal rules on by using NetNatStaticMapping on windows
* Support NPL agent on Windows platform
* Require the same Antrea NPL configuration as Linux

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue May 30, 2022
Currently mutateAntreaConfigMap can only support linux agent configmap.
This patch will support windows configmap processing.

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue May 30, 2022
* Add NPL Netnat rules check on windows
* Replace busybox with agnhost as the client pod
* Still skip windows test by default due to the ovs HNSCall issue

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue May 30, 2022
* Add protocol string to new NPLAnnotation set the protocols map as a deprecated value.
* Support Node port for UDP and TCP using the different number for a single Pod on Windows.

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
@tnqn tnqn closed this as completed in 87918f6 May 31, 2022
@antoninbas
Copy link
Contributor

Re-opening this issue as some tasks are not completed.

In addition, since #3453, it is no longer possible to run the NPL unit tests on macOS, which is quite annoying when developing locally and troubleshooting. I expect that when the PortTable implementation is unified across Linux & Windows, we will once again be able to run the tests on macOS.

@antoninbas antoninbas reopened this Jun 1, 2022
@XinShuYang
Copy link
Contributor Author

XinShuYang commented Jun 2, 2022

In addition, since #3453, it is no longer possible to run the NPL unit tests on macOS, which is quite annoying when developing locally and troubleshooting.

Do you mean to run "make docker-test-unit" on macOS? I can still run it on my local environment. Is it the same random failure issue in #3847 ?

@antoninbas
Copy link
Contributor

No, I mean go test -v ./pkg/agent/nodeportlocal/. It doesn't work for all Antrea modules because some dependencies cannot be satisfied on macOS, but it works for most packages. There isn't really any reason why it shouldn't work for NPL tests, since we mock the PodPortRules` interface.

XinShuYang added a commit to XinShuYang/antrea that referenced this issue Jun 27, 2022
Rename the portcache file to support go building across different OSs.

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
@XinShuYang
Copy link
Contributor Author

@antoninbas I think I found the root cause of this unit test failure on MacOS. Files with os specific suffixes follow the same constraints of GO ENV. So previous port_table_linux.go can not be built on MacOs during go test building stage. You can successfully run "go test -v ./pkg/agent/nodeportlocal/." with this fix.

XinShuYang added a commit to XinShuYang/antrea that referenced this issue Jun 27, 2022
Rename the portcache file to support go building across different OSs.

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue Jun 27, 2022
Add a portcache file to support go building across different OSs.

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue Aug 10, 2022
Add a portcache file to support go building across different OSs.

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue Aug 11, 2022
Update the portcache file to support go building across different OSs.

issue antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
XinShuYang added a commit to XinShuYang/antrea that referenced this issue Aug 16, 2022
Update the portcache file to support go building across different OSs.

Fixes antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
tnqn pushed a commit that referenced this issue Aug 18, 2022
Update the portcache file to support go building across different OSs.

Fixes #3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
heanlan pushed a commit to heanlan/antrea that referenced this issue Mar 29, 2023
Update the portcache file to support go building across different OSs.

Fixes antrea-io#3826

Signed-off-by: Shuyang Xin <gavinx@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/proxy/nodeportlocal Issues or PRs related to the NodePortLocal feature kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants