ci: improve collect-log script

I was debugging helm tests, I noticed, the operator namespace
content is empty and operator is created in same namespace as
other pods. Also, let's collect the 'kube-system' namespace logs
in multus test only as that is the only test where we need to debug
cluster networking and require kube-system logs.

Signed-off-by: subhamkrai <srai@redhat.com>
This commit is contained in:
subhamkrai
2023-12-19 21:08:06 +05:30
parent ea4a3871ed
commit 2d3e561a00
2 changed files with 5 additions and 2 deletions
@@ -58,7 +58,6 @@ jobs:
run: |
export LOG_DIR="/home/runner/work/rook/rook/tests/integration/_output/tests/"
export CLUSTER_NAMESPACE="helm-ns"
export OPERATOR_NAMESPACE="helm-ns-system"
tests/scripts/collect-logs.sh
- name: Artifact
+5 -1
View File
@@ -18,7 +18,6 @@ $CEPH_CMD osd dump >"${LOG_DIR}"/ceph-osd-dump.txt
$CEPH_CMD report >"${LOG_DIR}"/ceph-report.txt
NAMESPACES=("$CLUSTER_NAMESPACE")
NAMESPACES+=("$KUBE_SYSTEM_NAMESPACE")
if [[ "$OPERATOR_NAMESPACE" != "$CLUSTER_NAMESPACE" ]]; then
NAMESPACES+=("$OPERATOR_NAMESPACE")
fi
@@ -27,6 +26,11 @@ if [ "$1" == "multi-cluster-mirroring" ]; then
NAMESPACES+=("rook-ceph-secondary")
fi
# Add kube-system namespace for multus test only as we need to debug network in multus test
if [ "$1" == "canary-multus" ]; then
NAMESPACES+=("$KUBE_SYSTEM_NAMESPACE")
fi
for NAMESPACE in "${NAMESPACES[@]}"; do
# each namespace is a sub-directory for easier debugging
NS_DIR="${LOG_DIR}"/namespace-"${NAMESPACE}"