temporarily comment out test profiles until one works

This commit is contained in:
Hunter Gregory 2023-01-09 15:05:35 -08:00
Родитель ac98468680
Коммит db623d3833
3 изменённых файлов: 34 добавлений и 21 удалений

8
.gitignore поставляемый
Просмотреть файл

@ -1,4 +1,12 @@
# Binaries
*.txt
debug/windows/npm/win-debug.sh
test/mystuff2/*
e2e-results/*
debug/windows/npm/old-examples-of-logs/
npm/pkg/controlplane/controllers/v2/results-for-empty-ip-final-commit/
npm/pkg/controlplane/controllers/v2/test.sh
out/*
output/*

Просмотреть файл

@ -111,22 +111,22 @@ jobs:
displayName: "Run Kubernetes Network Policy Test Suite"
strategy:
matrix:
v1-default:
AZURE_CLUSTER: "conformance-v1-default"
PROFILE: "v1-default"
IS_STRESS_TEST: "false"
# v1-default:
# AZURE_CLUSTER: "conformance-v1-default"
# PROFILE: "v1-default"
# IS_STRESS_TEST: "false"
v2-default:
AZURE_CLUSTER: "conformance-v2-default"
PROFILE: "v2-default"
IS_STRESS_TEST: "false"
v2-default-ws22:
AZURE_CLUSTER: "conformance-v2-default-ws22"
PROFILE: "v2-default-ws22"
IS_STRESS_TEST: "false"
v2-default-stress:
AZURE_CLUSTER: "conformance-v2-default-stress"
PROFILE: "v2-default"
IS_STRESS_TEST: "true"
# v2-default-ws22:
# AZURE_CLUSTER: "conformance-v2-default-ws22"
# PROFILE: "v2-default-ws22"
# IS_STRESS_TEST: "false"
# v2-default-stress:
# AZURE_CLUSTER: "conformance-v2-default-stress"
# PROFILE: "v2-default"
# IS_STRESS_TEST: "true"
pool:
name: $(BUILD_POOL_NAME_DEFAULT)
demands:

Просмотреть файл

@ -1,3 +1,8 @@
kubeconfig=$1
if [[ -z $1 ]]; then
echo "need arg" && exit 1
fi
# NOTE: you may not be able to unzip logs.zip in Linux since it was compressed in Windows
set -e
dateString=`date -I` # like 2022-09-24
@ -6,13 +11,13 @@ mkdir $filepath
echo "gathering logs and writing to $filepath/"
kubectl get pod -A -o wide --show-labels > $filepath/allpods.out
kubectl get netpol -A -o yaml > $filepath/all-netpol-yamls.out
kubectl describe netpol -A > $filepath/all-netpol-descriptions.out
kubectl --kubeconfig $kubeconfig get pod -A -o wide --show-labels > $filepath/allpods.out
kubectl --kubeconfig $kubeconfig get netpol -A -o yaml > $filepath/all-netpol-yamls.out
kubectl --kubeconfig $kubeconfig describe netpol -A > $filepath/all-netpol-descriptions.out
npmPods=()
nodes=()
for npmPodOrNode in `kubectl get pod -n kube-system -owide --output=custom-columns='Name:.metadata.name,Node:spec.nodeName' | grep "npm-win"`; do
for npmPodOrNode in `kubectl --kubeconfig $kubeconfig get pod -n kube-system -owide --output=custom-columns='Name:.metadata.name,Node:spec.nodeName' | grep "npm-win"`; do
# for loop will go over each item (npm pod, then its node, then the next npm pod, then its node, ...)
set +e
echo $npmPodOrNode | grep -q azure-npm-win-
@ -33,22 +38,22 @@ for i in $(seq 1 ${#npmPods[*]}); do
node=${nodes[$j]}
echo "gathering logs. npm pod: $npmPod. node: $node"
kubectl logs -n kube-system $npmPod > $filepath/logs_$npmPod.out
kubectl --kubeconfig $kubeconfig logs -n kube-system $npmPod > $filepath/logs_$npmPod.out
ips=()
for ip in `kubectl get pod -A -owide --output=custom-columns='IP:.status.podIP,Node:spec.nodeName' | grep $node | grep -oP "\d+\.\d+\.\d+\.\d+"`; do
for ip in `kubectl --kubeconfig $kubeconfig get pod -A -owide --output=custom-columns='IP:.status.podIP,Node:spec.nodeName' | grep $node | grep -oP "\d+\.\d+\.\d+\.\d+"`; do
ips+=($ip)
done
echo "node $node has IPs: ${ips[@]}"
echo "copying ps1 file into $npmPod"
kubectl cp ./pod_exec.ps1 kube-system/"$npmPod":execw.ps1
kubectl --kubeconfig $kubeconfig cp ~/dev/azure-container-networking/debug/windows/npm/pod_exec.ps1 kube-system/"$npmPod":execw.ps1
echo "executing ps1 file on $npmPod"
kubectl exec -it -n kube-system $npmPod -- powershell.exe -Command .\\execw.ps1 "'${ips[@]}'"
kubectl --kubeconfig $kubeconfig exec -it -n kube-system $npmPod -- powershell.exe -Command .\\execw.ps1 "'${ips[@]}'"
echo "copying logs.zip from $npmPod. NOTE: this will be a windows-based compressed archive (probably need windows to expand it)"
kubectl cp kube-system/"$npmPod":npm-exec-logs.zip $filepath/npm-exec-logs_$node.zip
kubectl --kubeconfig $kubeconfig cp kube-system/"$npmPod":npm-exec-logs.zip $filepath/npm-exec-logs_$node.zip
done
echo "finished gathering all logs. written to $filepath/"