diff --git a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml index 2323b6c689..5779eee65a 100644 --- a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml +++ b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml @@ -146,8 +146,8 @@ stages: retryCountOnTaskFailure: 6 name: "CiliumConnectivityTests" displayName: "Run Cilium Connectivity Tests" - - job: logs - displayName: "Log Failure" + - job: failedE2ELogs + displayName: "Failure Logs" dependsOn: - deploy_cilium_components - deploy_pods diff --git a/.pipelines/cni/cilium/nightly-release-test.yml b/.pipelines/cni/cilium/nightly-release-test.yml index da5c668c93..ee43ece998 100644 --- a/.pipelines/cni/cilium/nightly-release-test.yml +++ b/.pipelines/cni/cilium/nightly-release-test.yml @@ -89,7 +89,7 @@ stages: testDropgz: "" clusterName: ciliumnightly-$(commitID) - job: logs - displayName: "Log Failure" + displayName: "Failure Logs" dependsOn: - cilium_nightly condition: failed() diff --git a/.pipelines/cni/load-test-templates/pod-deployment-template.yaml b/.pipelines/cni/load-test-templates/pod-deployment-template.yaml index 33d2fd60a0..6a0c1f2387 100644 --- a/.pipelines/cni/load-test-templates/pod-deployment-template.yaml +++ b/.pipelines/cni/load-test-templates/pod-deployment-template.yaml @@ -5,6 +5,7 @@ parameters: iterations: 4 nodeCount: 10 cni: "" + jobName: "deploy_pods" steps: - task: AzureCLI@1 @@ -28,3 +29,4 @@ steps: logType: scaleTest os: ${{ parameters.os }} cni: ${{ parameters.cni }} + jobName: ${{ parameters.jobName }} diff --git a/.pipelines/cni/load-test-templates/restart-cns-template.yaml b/.pipelines/cni/load-test-templates/restart-cns-template.yaml index a976b29cea..0cb7c5c73d 100644 --- a/.pipelines/cni/load-test-templates/restart-cns-template.yaml +++ b/.pipelines/cni/load-test-templates/restart-cns-template.yaml @@ -4,6 +4,7 @@ parameters: scaleup: 100 nodeCount: 10 os: "" + jobName: "restart_cns" steps: - task: AzureCLI@1 @@ -40,3 +41,4 @@ steps: logType: restartCNS os: ${{ parameters.os }} cni: ${{ parameters.cni }} + jobName: ${{ parameters.jobName }} diff --git a/.pipelines/cni/load-test-templates/restart-node-template.yaml b/.pipelines/cni/load-test-templates/restart-node-template.yaml index 2e8c050f9d..eebf7fbffb 100644 --- a/.pipelines/cni/load-test-templates/restart-node-template.yaml +++ b/.pipelines/cni/load-test-templates/restart-node-template.yaml @@ -4,6 +4,7 @@ parameters: scaleup: 100 os: "linux" cni: "" + jobName: "restart_nodes" steps: - task: AzureCLI@1 @@ -38,3 +39,4 @@ steps: logType: restartNode os: ${{ parameters.os }} cni: ${{ parameters.cni }} + jobName: ${{ parameters.jobName }} diff --git a/.pipelines/cni/singletenancy/cniv1-template.yaml b/.pipelines/cni/singletenancy/cniv1-template.yaml index d6ca60de9e..e489d364ea 100644 --- a/.pipelines/cni/singletenancy/cniv1-template.yaml +++ b/.pipelines/cni/singletenancy/cniv1-template.yaml @@ -141,7 +141,9 @@ stages: inlineScript: | echo "Delete load-test Namespace" make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(commitID) - kubectl delete ns load-test + kubectl get ns --no-headers | grep -v 'kube\|default' | awk '{print $1}' + delete=`kubectl get ns --no-headers | grep -v 'kube\|default' | awk '{print $1}'` + kubectl delete ns $delete kubectl cluster-info kubectl get po -owide -A name: "recover" @@ -158,8 +160,8 @@ stages: hybridWin: true service: true hostport: true - - job: logs - displayName: "Log Failure" + - job: failedE2ELogs + displayName: "Failure Logs" dependsOn: - update_cni - npm_k8se2e @@ -195,7 +197,7 @@ stages: parameters: clusterName: ${{ parameters.clusterName }}-$(commitID) cni: cniv1 - - job: deploy_pods + - job: deploy_podsHNS displayName: "Scale Test" dependsOn: restart_hns steps: @@ -206,14 +208,15 @@ stages: os: ${{ parameters.os }} iterations: ${{ parameters.iterations }} nodeCount: ${{ parameters.nodeCount }} + jobName: deploy_podsHNS - template: ../load-test-templates/validate-state-template.yaml parameters: clusterName: ${{ parameters.clusterName }}-$(commitID) os: ${{ parameters.os }} cni: cniv1 - - job: restart_nodes + - job: restart_nodesHNS displayName: "Restart Test" - dependsOn: deploy_pods + dependsOn: deploy_podsHNS steps: - template: ../load-test-templates/restart-node-template.yaml parameters: @@ -221,6 +224,7 @@ stages: os: ${{ parameters.os }} nodeCount: ${{ parameters.nodeCount }} scaleup: ${{ parameters.scaleup }} + jobName: restart_nodesHNS - template: ../load-test-templates/validate-state-template.yaml parameters: clusterName: ${{ parameters.clusterName }}-$(commitID) @@ -229,7 +233,7 @@ stages: restartCase: "true" - job: recover displayName: "Recover Resources" - dependsOn: restart_nodes + dependsOn: restart_nodesHNS steps: - task: AzureCLI@1 inputs: @@ -240,7 +244,9 @@ stages: inlineScript: | echo "Delete load-test Namespace" make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(commitID) - kubectl delete ns load-test + kubectl get ns --no-headers | grep -v 'kube\|default' | awk '{print $1}' + delete=`kubectl get ns --no-headers | grep -v 'kube\|default' | awk '{print $1}'` + kubectl delete ns $delete kubectl cluster-info kubectl get po -owide -A name: "recover" @@ -257,12 +263,12 @@ stages: hybridWin: true service: true hostport: true - - job: logs - displayName: "Log Failure" + - job: failedE2ELogsHNS + displayName: "Failure Logs" dependsOn: - restart_hns - - restart_nodes - - deploy_pods + - restart_nodesHNS + - deploy_podsHNS - recover - cni_${{ parameters.os }} condition: failed() @@ -271,3 +277,4 @@ stages: parameters: clusterName: ${{ parameters.clusterName }}-$(commitID) os: ${{ parameters.os }} + jobName: failedE2ELogsHNS diff --git a/.pipelines/cni/singletenancy/linux-cniv2-template.yaml b/.pipelines/cni/singletenancy/linux-cniv2-template.yaml index b8945076d8..bc0ad0d01c 100644 --- a/.pipelines/cni/singletenancy/linux-cniv2-template.yaml +++ b/.pipelines/cni/singletenancy/linux-cniv2-template.yaml @@ -150,7 +150,9 @@ stages: inlineScript: | echo "Delete load-test Namespace" make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(commitID) - kubectl delete ns load-test + kubectl get ns --no-headers | grep -v 'kube\|default' | awk '{print $1}' + delete=`kubectl get ns --no-headers | grep -v 'kube\|default' | awk '{print $1}'` + kubectl delete ns $delete kubectl cluster-info kubectl get po -owide -A name: "recover" @@ -166,8 +168,8 @@ stages: portforward: true service: true hostport: true - - job: logs - displayName: "Log Failure" + - job: failedE2ELogs + displayName: "Failure Logs" dependsOn: - integration - npm_k8se2e diff --git a/.pipelines/singletenancy/aks-swift/e2e-job-template.yaml b/.pipelines/singletenancy/aks-swift/e2e-job-template.yaml index f4521d1347..e0f447b6c4 100644 --- a/.pipelines/singletenancy/aks-swift/e2e-job-template.yaml +++ b/.pipelines/singletenancy/aks-swift/e2e-job-template.yaml @@ -63,8 +63,8 @@ stages: testDropgz: ${{ parameters.testDropgz }} clusterName: ${{ parameters.clusterName }}-$(commitID) - - job: logs - displayName: "Log Failure" + - job: failedE2ELogs + displayName: "Failure Logs" dependsOn: - ${{ parameters.name }} condition: failed() diff --git a/.pipelines/singletenancy/aks/e2e-job-template.yaml b/.pipelines/singletenancy/aks/e2e-job-template.yaml index 1b67b9949f..3d270facf1 100644 --- a/.pipelines/singletenancy/aks/e2e-job-template.yaml +++ b/.pipelines/singletenancy/aks/e2e-job-template.yaml @@ -82,8 +82,8 @@ stages: hostport: true dependsOn: ${{ parameters.name }} - - job: logs - displayName: "Log Failure" + - job: failedE2ELogs + displayName: "Failure Logs" dependsOn: - ${{ parameters.name }} - cni_${{ parameters.os }} diff --git a/.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-job-template.yaml b/.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-job-template.yaml index c0893ceb83..b54844967d 100644 --- a/.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-job-template.yaml +++ b/.pipelines/singletenancy/azure-cni-overlay/azure-cni-overlay-e2e-job-template.yaml @@ -84,8 +84,8 @@ stages: hybridWin: true datapath: true - - job: logs - displayName: "Log Failure" + - job: failedE2ELogs + displayName: "Failure Logs" dependsOn: - ${{ parameters.name }} - cni_${{ parameters.os }} diff --git a/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-job-template.yaml b/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-job-template.yaml index 960dbfdf92..2c80a759c4 100644 --- a/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-job-template.yaml +++ b/.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-job-template.yaml @@ -59,8 +59,8 @@ stages: testDropgz: ${{ parameters.testDropgz }} clusterName: ${{ parameters.clusterName }}-$(commitID) - - job: logs - displayName: "Log Failure" + - job: failedE2ELogs + displayName: "Failure Logs" dependsOn: - ${{ parameters.name }} condition: failed() diff --git a/.pipelines/singletenancy/cilium/cilium-e2e-job-template.yaml b/.pipelines/singletenancy/cilium/cilium-e2e-job-template.yaml index 8530f9c933..a7971c420b 100644 --- a/.pipelines/singletenancy/cilium/cilium-e2e-job-template.yaml +++ b/.pipelines/singletenancy/cilium/cilium-e2e-job-template.yaml @@ -63,8 +63,8 @@ stages: testDropgz: ${{ parameters.testDropgz }} clusterName: ${{ parameters.clusterName }}-$(commitID) - - job: logs - displayName: "Log Failure" + - job: failedE2ELogs + displayName: "Failure Logs" dependsOn: - ${{ parameters.name }} condition: failed() diff --git a/.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-job-template.yaml b/.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-job-template.yaml index 0969c09f2b..b6322e46d2 100644 --- a/.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-job-template.yaml +++ b/.pipelines/singletenancy/dualstack-overlay/dualstackoverlay-e2e-job-template.yaml @@ -83,8 +83,8 @@ stages: service: true hybridWin: true - - job: logs - displayName: "Log Failure" + - job: failedE2ELogs + displayName: "Failure Logs" dependsOn: - ${{ parameters.name }} - cni_${{ parameters.os }} diff --git a/.pipelines/templates/log-template.yaml b/.pipelines/templates/log-template.yaml index ce9541eb43..a1eb71ebf0 100644 --- a/.pipelines/templates/log-template.yaml +++ b/.pipelines/templates/log-template.yaml @@ -10,7 +10,7 @@ # CNS ConfigMap | "ManageEndpointState" # -- Generates -- # Logs on a per-node basis -# Outputs a singluar unique artifact per template call | ${{ parameters.clusterName }}_${{ parameters.logType }}_Attempt_#$(System.StageAttempt) +# Outputs a singluar unique artifact per template call | ${{ parameters.clusterName }}_${{ parameters.jobName }}_Attempt_#$(System.StageAttempt) # Each artifact is divided into sub-directories # -- Intent -- # Provide through debugging information to understand why CNI test scenarios are failing without having to blindly reproduce @@ -20,6 +20,7 @@ parameters: logType: "failure" os: "" cni: "" + jobName: "failedE2ELogs" steps: - task: AzureCLI@1 @@ -269,6 +270,6 @@ steps: - publish: $(System.DefaultWorkingDirectory)/${{ parameters.clusterName }}_${{ parameters.logType }}_Attempt_#$(System.StageAttempt) condition: always() - artifact: ${{ parameters.clusterName }}_${{ parameters.logType }}_Attempt_#$(System.StageAttempt) + artifact: ${{ parameters.clusterName }}_${{ parameters.jobName }}_Attempt_#$(System.StageAttempt) name: acnLogs_${{ parameters.logType }} displayName: Publish Cluster logs