Skip to content

Commit 626e16c

Browse files
authored
ci: add node and CNS restart test case for v4overlay cluster (#2152)
* add node restart test case for v4overlay cluster
1 parent 0062d04 commit 626e16c

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-step-template.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,53 @@ steps:
8484
displayName: "Get logs"
8585
condition: always()
8686
87+
- task: AzureCLI@1
88+
inputs:
89+
azureSubscription: $(AZURE_TEST_AGENT_SERVICE_CONNECTION)
90+
scriptLocation: "inlineScript"
91+
scriptType: "bash"
92+
addSpnToEnvironment: true
93+
inlineScript: |
94+
set -e
95+
clusterName=${{ parameters.clusterName }}
96+
echo "Restarting nodes"
97+
for val in $(az vmss list -g MC_${clusterName}_${clusterName}_$(REGION_AKS_CLUSTER_TEST) --query "[].name" -o tsv); do
98+
make -C ./hack/aks restart-vmss AZCLI=az CLUSTER=${clusterName} REGION=$(REGION_AKS_CLUSTER_TEST) VMSS_NAME=${val}
99+
done
100+
displayName: "Restart Nodes"
101+
102+
- task: AzureCLI@1
103+
inputs:
104+
azureSubscription: $(AZURE_TEST_AGENT_SERVICE_CONNECTION)
105+
scriptLocation: "inlineScript"
106+
scriptType: "bash"
107+
addSpnToEnvironment: true
108+
inlineScript: |
109+
cd test/integration/load
110+
clusterName=${{ parameters.clusterName }}
111+
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${clusterName}
112+
make -C ./hack/aks azcfg AZCLI=az REGION=$(REGION_AKS_CLUSTER_TEST)
113+
kubectl get pods -owide -A
114+
echo "Validating Node Restart"
115+
sudo go test -timeout 30m -tags load -cni cniv2 -run ^TestValidateState$ -tags=load -restart-case=true
116+
displayName: "Validate Node Restart"
117+
retryCountOnTaskFailure: 3
118+
119+
- script: |
120+
echo "validate pod IP assignment before CNS restart"
121+
kubectl get pod -owide -A
122+
echo "validate pod state before CNS restarts"
123+
cd test/integration/load
124+
sudo go test -timeout 30m -tags load -cni cniv2 -run ^TestValidateState$ -tags=load
125+
kubectl rollout restart ds azure-cns -n kube-system
126+
kubectl rollout status ds azure-cns -n kube-system
127+
kubectl get pod -owide -A
128+
echo "validate pods after CNS restart"
129+
sudo go test -timeout 30m -tags load -cni cniv2 -run ^TestValidateState$ -tags=load
130+
name: "restartCNS_ValidatePodState"
131+
displayName: "Restart CNS and validate pod state"
132+
retryCountOnTaskFailure: 3
133+
87134
- task: PublishBuildArtifacts@1
88135
inputs:
89136
artifactName: test-output

.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-step-template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,6 @@ steps:
6464
sudo go test -count=1 datapath_linux_test.go -timeout 1m -tags connection -run ^TestDatapathLinux$ -tags=connection,integration -isDualStack=true
6565
echo "Dualstack Overlay Linux datapath IPv4 test"
6666
sudo go test -count=1 datapath_linux_test.go -timeout 1m -tags connection -run ^TestDatapathLinux$ -tags=connection,integration
67+
retryCountOnTaskFailure: 3
6768
name: "DualStack_Overlay_Linux_Tests"
6869
displayName: "DualStack Overlay Linux Tests"

0 commit comments

Comments
 (0)