-
Notifications
You must be signed in to change notification settings - Fork 364
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
Add containerd runtime support for antrea agent on windows #4279
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4279 +/- ##
==========================================
+ Coverage 64.01% 66.81% +2.80%
==========================================
Files 400 403 +3
Lines 56888 57690 +802
==========================================
+ Hits 36418 38547 +2129
+ Misses 17783 16401 -1382
- Partials 2687 2742 +55
|
6adf201
to
4eb3c2c
Compare
4eb3c2c
to
d834c78
Compare
/test-windows-containerd-e2e |
1 similar comment
/test-windows-containerd-e2e |
365645b
to
e7bddbe
Compare
/test-windows-containerd-e2e |
2 similar comments
/test-windows-containerd-e2e |
/test-windows-containerd-e2e |
e7bddbe
to
1d1cb7d
Compare
/test-windows-containerd-e2e |
80bc54b
to
30330bb
Compare
/test-windows-containerd-e2e |
30330bb
to
6eb00d6
Compare
/test-windows-containerd-e2e |
1 similar comment
/test-windows-containerd-e2e |
6eb00d6
to
39516d3
Compare
/test-windows-containerd-e2e |
39516d3
to
bb42577
Compare
/test-windows-containerd-e2e |
e8813f6
to
2e8b776
Compare
/test-windows-containerd-e2e |
6a6fbd2
to
b949f0d
Compare
/test-windows-containerd-e2e |
Yes, it is better if we can include it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
34e8716
to
cdf7952
Compare
/test-windows-containerd-e2e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, some minor comments
build/yamls/windows/base/conf/Install-WindowsCNI-Containerd.ps1
Outdated
Show resolved
Hide resolved
ci/jenkins/test.sh
Outdated
govc snapshot.revert -vm ${WORKER_NAME} win-initial | ||
# If Windows VM fails to power on correctly in time, retry several times. | ||
winVMIPs="" | ||
for i in `seq 10`; do | ||
winVMIPs=$(govc vm.ip -wait=2m -a ${WORKER_NAME}) | ||
if [[ $winVMIPs != "" ]]; then | ||
echo "Windows VM ${WORKER_NAME} powered on" | ||
break | ||
fi | ||
echo "Windows VM ${WORKER_NAME} failed to power on" | ||
govc vm.power -on ${WORKER_NAME} || true | ||
done | ||
if [[ $winVMIPs == "" ]]; then | ||
echo "Windows VM ${WORKER_NAME} didn't power on after 3 tries, exiting" | ||
exit 1 | ||
fi | ||
IP=$(kubectl get node "${WORKER_NAME}" -o jsonpath='{.status.addresses[0].address}') | ||
# Windows VM is reverted to an old snapshot so computer date needs updating. | ||
for i in `seq 24`; do | ||
sleep 5 | ||
ssh -o StrictHostKeyChecking=no -n Administrator@${IP} "W32tm /resync /force" | grep successfully && break | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems same as the code for jumper VM, perhaps extract a function to reduce redundancy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exacted a function revert_snapshot_windows
ci/jenkins/test.sh
Outdated
# Compress antrea repo and copy it to a Windows node | ||
mkdir -p jenkins | ||
tar --exclude='./jenkins' -czf jenkins/antrea_repo.tar.gz -C "$(pwd)" . | ||
for i in `seq 2`; do | ||
timeout 2m scp -o StrictHostKeyChecking=no -T jenkins/antrea_repo.tar.gz Administrator@${IP}: && break | ||
done | ||
echo "=== Build Windows on Windows Node===" | ||
ssh -o StrictHostKeyChecking=no -n Administrator@${IP} "docker pull ${DOCKER_REGISTRY}/antrea/golang:${GO_VERSION}-nanoserver && docker tag ${DOCKER_REGISTRY}/antrea/golang:${GO_VERSION}-nanoserver golang:${GO_VERSION}-nanoserver" | ||
ssh -o StrictHostKeyChecking=no -n Administrator@${IP} "rm -rf antrea && mkdir antrea && cd antrea && tar -xzf ../antrea_repo.tar.gz > /dev/null && NO_PULL=${NO_PULL}; DOCKER_NETWORK=host make build-windows && docker save -o antrea-windows.tar antrea/antrea-windows:latest" || true | ||
for i in `seq 2`; do | ||
timeout 2m scp -o StrictHostKeyChecking=no -T Administrator@${IP}:antrea/antrea-windows.tar.gz . && break | ||
done | ||
else | ||
for i in `seq 2`; do | ||
timeout 2m scp -o StrictHostKeyChecking=no -T antrea-windows.tar.gz Administrator@${IP}: && break | ||
done | ||
ssh -o StrictHostKeyChecking=no -n Administrator@${IP} "gzip -d antrea-windows.tar.gz && ctr -n k8s.io images import antrea-windows.tar" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't it been executed once after L522?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed. If building fails on jumper node, the test will exit.
ginkgo -timeout=2h --no-color $E2ETEST_PATH -- --provider=skeleton --ginkgo.focus="$WINDOWS_NETWORKPOLICY_FOCUS" --ginkgo.skip="$WINDOWS_NETWORKPOLICY_CONTAINERD_SKIP" > windows_conformance_result_no_color.txt || true | ||
else | ||
ginkgo --no-color $E2ETEST_PATH -- --provider=skeleton --node-os-distro=windows --ginkgo.focus="$WINDOWS_CONFORMANCE_FOCUS" --ginkgo.skip="$WINDOWS_CONFORMANCE_SKIP" > windows_conformance_result_no_color.txt || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't windows-containerd-networkpolicy need to specify --node-os-distro=windows
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can not specify --node-os-distro=windows
in windows-containerd-networkpolicy or windows-networkpolicy, it is because most of the network policy test cases we expect to run in kubernetes test suite have the mark "[LinuxOnly]", and the parameter will lead the cases are passed. Although kubernetes mark these case to run on Linux only, they are supposed to work on Windows since Antrea Windows supports NP functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to add a comment for above explanation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments.
cdf7952
to
7fd3868
Compare
/test-windows-containerd-e2e |
/test-windows-e2e |
/test-windows-proxyall-e2e |
/test-all |
/test-windows-conformance |
ginkgo -timeout=2h --no-color $E2ETEST_PATH -- --provider=skeleton --ginkgo.focus="$WINDOWS_NETWORKPOLICY_FOCUS" --ginkgo.skip="$WINDOWS_NETWORKPOLICY_CONTAINERD_SKIP" > windows_conformance_result_no_color.txt || true | ||
else | ||
ginkgo --no-color $E2ETEST_PATH -- --provider=skeleton --node-os-distro=windows --ginkgo.focus="$WINDOWS_CONFORMANCE_FOCUS" --ginkgo.skip="$WINDOWS_CONFORMANCE_SKIP" > windows_conformance_result_no_color.txt || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to add a comment for above explanation.
7fd3868
to
3dc6b87
Compare
/test-windows-containerd-e2e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
3dc6b87
to
7208658
Compare
/test-windows-containerd-e2e |
Add e2e,conformance and networkpolicy tests for windows containerd testbed. ginkgo:v2.1.6 kubernetes:v1.25 containerd:v1.6.6 Signed-off-by: Shuyang Xin <[email protected]>
7208658
to
3d08fa2
Compare
/test-windows-containerd-e2e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…#4279) Add new containerd yaml file for windows agent because of the different cni workflow. Add e2e,conformance and networkpolicy tests for windows containerd testbed. Signed-off-by: Shuyang Xin <[email protected]>
Add new containerd yaml file for windows agent because of the different cni workflow.
Signed-off-by: Shuyang Xin [email protected]