Skip to content

Commit 0c0a1b5

Browse files
fix(ci): bootstrap virtualization print nodes for debug
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
1 parent 356a1ba commit 0c0a1b5

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

.github/workflows/e2e-reusable-pipeline.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -836,9 +836,9 @@ jobs:
836836
837837
echo "[ERROR] Blockdevices is not 3"
838838
echo "[DEBUG] Show cluster nodes"
839-
kubectl get nodes
839+
kubectl get nodes || true
840840
echo "[DEBUG] Show blockdevices"
841-
kubectl get blockdevice
841+
kubectl get blockdevice || true
842842
echo "[DEBUG] Show sds namespaces"
843843
kubectl get ns | grep sds || echo "ns sds is not found"
844844
echo "[DEBUG] Show pods in sds-replicated-volume"
@@ -847,7 +847,7 @@ jobs:
847847
echo "::endgroup::"
848848
echo "[DEBUG] Show deckhouse logs"
849849
echo "::group::📝 deckhouse logs"
850-
d8 s logs | tail -n 100
850+
d8 s logs | tail -n 100 || true
851851
echo "::endgroup::"
852852
exit 1
853853
}
@@ -1070,7 +1070,7 @@ jobs:
10701070
echo "[DEBUG] Show cluster StorageClasses"
10711071
kubectl get storageclasses || true
10721072
echo "[DEBUG] Show cluster nodes"
1073-
kubectl get node
1073+
kubectl get node || true
10741074
10751075
echo "[DEBUG] Show cluster node yaml and describe"
10761076
NODES=$(kubectl get no -o jsonpath='{range .items[?(@.metadata.name)]}{.metadata.name}{"\n"}{end}')
@@ -1158,27 +1158,33 @@ jobs:
11581158
local workers
11591159
local time_wait=10
11601160
1161-
workers=$(kubectl get nodes -o name | grep worker | wc -l || true)
1162-
workers=$((workers))
1163-
11641161
for i in $(seq 1 $count); do
1162+
workers=$(kubectl get nodes -o name | grep worker | wc -l || true)
1163+
workers=$((workers))
1164+
if [[ $workers -eq 0 ]]; then
1165+
echo "[WARNING] No worker nodes found, keep waiting"
1166+
echo "[INFO] Wait ${time_wait}s virt-handler pods are ready (attempt $i/$count)"
1167+
sleep ${time_wait}
1168+
continue
1169+
fi
1170+
11651171
virt_handler_ready=$(kubectl -n d8-virtualization get pods | grep "virt-handler.*Running" | wc -l || true)
11661172
11671173
if [[ $virt_handler_ready -ge $workers ]]; then
1168-
echo "[SUCCESS] virt-handlers pods are ready"
1174+
echo "[SUCCESS] virt-handlers pods are ready $virt_handler_ready/$workers"
11691175
return 0
11701176
fi
11711177
1172-
echo "[INFO] virt-handler pods $virt_handler_ready/$workers "
1178+
echo "[INFO] virt-handler pods $virt_handler_ready/$workers"
11731179
echo "[INFO] Wait ${time_wait}s virt-handler pods are ready (attempt $i/$count)"
11741180
if (( i % 5 == 0 )); then
11751181
echo "[DEBUG] Show pods in namespace d8-virtualization"
11761182
echo "::group::📦 virtualization pods"
1177-
kubectl -n d8-virtualization get pods || echo "No pods in virtualization namespace found"
1183+
kubectl -n d8-virtualization get pods || echo "[WARNING] No pods in virtualization namespace found"
11781184
echo "::endgroup::"
11791185
echo "[DEBUG] Show cluster nodes"
11801186
echo "::group::📦 cluster nodes"
1181-
kubectl get node
1187+
kubectl get node || echo "[WARNING] Failed to get cluster nodes"
11821188
echo "::endgroup::"
11831189
fi
11841190
sleep ${time_wait}

0 commit comments

Comments
 (0)