Skip to content

Commit

Permalink
Merge pull request #616 from zeeke/e2e-fix-multus-log
Browse files Browse the repository at this point in the history
e2e: dump multus namespace
  • Loading branch information
e0ne authored Feb 6, 2024
2 parents 252c959 + a67817f commit 49dde87
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions hack/run-e2e-conformance-virtual-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ if [ "$NUM_OF_WORKERS" -lt 2 ]; then
exit 1
fi

export MULTUS_NAMESPACE="kube-system"

source $here/run-e2e-conformance-common

check_requirements() {
Expand Down Expand Up @@ -199,7 +201,7 @@ done

# remove the patch after multus bug is fixed
# https://github.com/k8snetworkplumbingwg/multus-cni/issues/1221
kubectl patch -n kube-system ds/kube-multus-ds --type=json -p='[{"op": "replace", "path": "/spec/template/spec/initContainers/0/command", "value":["cp", "-f","/usr/src/multus-cni/bin/multus-shim", "/host/opt/cni/bin/multus-shim"]}]'
kubectl patch -n ${MULTUS_NAMESPACE} ds/kube-multus-ds --type=json -p='[{"op": "replace", "path": "/spec/template/spec/initContainers/0/command", "value":["cp", "-f","/usr/src/multus-cni/bin/multus-shim", "/host/opt/cni/bin/multus-shim"]}]'

kubectl create namespace container-registry

Expand Down Expand Up @@ -324,14 +326,14 @@ if [ $(ip a | grep 10.85.0 | wc -l) -eq 0 ]; then ip link del cni0; fi
EOF


kubectl -n kube-system get po | grep multus | awk '{print "kubectl -n kube-system delete po",$1}' | sh
kubectl -n ${MULTUS_NAMESPACE} get po | grep multus | awk '{print "kubectl -n kube-system delete po",$1}' | sh
kubectl -n kube-system get po | grep coredns | awk '{print "kubectl -n kube-system delete po",$1}' | sh

TIMEOUT=400
echo "## wait for coredns"
kubectl -n kube-system wait --for=condition=available deploy/coredns --timeout=${TIMEOUT}s
echo "## wait for multus"
kubectl -n kube-system wait --for=condition=ready -l name=multus pod --timeout=${TIMEOUT}s
kubectl -n ${MULTUS_NAMESPACE} wait --for=condition=ready -l name=multus pod --timeout=${TIMEOUT}s

echo "## deploy cert manager"
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.0/cert-manager.yaml
Expand Down Expand Up @@ -437,7 +439,7 @@ if [ -z $SKIP_TEST ]; then
set -e

if [[ -v TEST_REPORT_PATH ]]; then
kubectl cluster-info dump --namespaces ${NAMESPACE} --output-directory "${root}/${TEST_REPORT_PATH}/cluster-info"
kubectl cluster-info dump --namespaces ${NAMESPACE},${MULTUS_NAMESPACE} --output-directory "${root}/${TEST_REPORT_PATH}/cluster-info"
fi

if [[ $TEST_EXITE_CODE -ne 0 ]]; then
Expand Down
3 changes: 2 additions & 1 deletion hack/run-e2e-conformance-virtual-ocp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ export ADMISSION_CONTROLLERS_ENABLED=true
export SKIP_VAR_SET=""
export NAMESPACE="openshift-sriov-network-operator"
export OPERATOR_NAMESPACE=$NAMESPACE
export MULTUS_NAMESPACE="openshift-multus"
export OPERATOR_EXEC=kubectl
export CLUSTER_TYPE=openshift
export DEV_MODE=TRUE
Expand Down Expand Up @@ -300,7 +301,7 @@ if [ -z $SKIP_TEST ]; then
set -e

if [[ -v TEST_REPORT_PATH ]]; then
kubectl cluster-info dump --namespaces ${NAMESPACE} --output-directory "${root}/${TEST_REPORT_PATH}/cluster-info"
kubectl cluster-info dump --namespaces ${NAMESPACE},${MULTUS_NAMESPACE} --output-directory "${root}/${TEST_REPORT_PATH}/cluster-info"
fi

if [[ $TEST_EXITE_CODE -ne 0 ]]; then
Expand Down

0 comments on commit 49dde87

Please sign in to comment.