@@ -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
0 commit comments