-
Notifications
You must be signed in to change notification settings - Fork 242
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
ci: [CNI] Add restart node in stage in the load test of cni pipeline #1916
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,8 @@ stages: | |
set -ex | ||
az extension add --name aks-preview | ||
make -C ./hack/swift set-kubeconf AZCLI=az CLUSTER=${RESOURCE_GROUP} | ||
kubectl apply -f hack/manifests/pod.yaml | ||
kubectl apply -f hack/manifests/hostprocess.yaml | ||
bash hack/scripts/scale_deployment.sh | ||
- stage: validate_state | ||
dependsOn: pod_deployment | ||
|
@@ -56,8 +58,37 @@ stages: | |
name: "ValidateState" | ||
displayName: "Validate State" | ||
retryCountOnTaskFailure: 3 | ||
- stage: connectivity_tests | ||
- stage: restart_nodes | ||
dependsOn: validate_state | ||
displayName: "Restart Node" | ||
jobs: | ||
- job: restart_nodes | ||
steps: | ||
- task: AzureCLI@1 | ||
inputs: | ||
azureSubscription: $(TEST_SUB_SERVICE_CONNECTION) | ||
scriptLocation: "inlineScript" | ||
scriptType: "bash" | ||
addSpnToEnvironment: true | ||
inlineScript: | | ||
echo "Scale up the pods and immediated restart the nodes" | ||
make -C ./hack/swift set-kubeconf AZCLI=az CLUSTER=${RESOURCE_GROUP} | ||
make -C ./hack/swift azcfg AZCLI=az REGION=$(LOCATION) | ||
echo "Scaling the pods down to 100 per node" | ||
bash ./hack/scripts/scale_deployment.sh -n 0 -u 1000 -s | ||
echo "Restarting the nodes" | ||
vmss_name=$(az vmss list -g MC_${RESOURCE_GROUP}_${RESOURCE_GROUP}_$(LOCATION) --query "[].name" -o tsv) | ||
make -C ./hack/swift restart-vmss AZCLI=az CLUSTER=${RESOURCE_GROUP} REGION=$(LOCATION) VMSS_NAME=$vmss_name | ||
bash ./hack/scripts/scale_deployment.sh -n 0 -u 1000 -c | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why are we calling scale script again? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly |
||
name: "RestartNodes" | ||
displayName: "Restart Nodes" | ||
- script: | | ||
bash hack/scripts/validate_state.sh | ||
name: "ValidateState" | ||
displayName: "Validate State" | ||
retryCountOnTaskFailure: 3 | ||
- stage: connectivity_tests | ||
dependsOn: restart_nodes | ||
displayName: "Connectivity Tests" | ||
jobs: | ||
- job: cni_tests | ||
|
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.
is it scaling down to 1000 or 100? also number of times is 0?
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.
The script scale up and down as a by default run. So by specifying
-n
as 0 we are telling it not to do that.The flag
-s
is used to define scale up operation. We are scaling down to 1000 pods (i.e 100 pods per node) from 240 pods per node.