From 410db8121507502b2bc69b9dee518d67e03fbf4d Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Wed, 12 May 2021 14:11:10 +0200 Subject: [PATCH] ci: include status of the Rook deployment on failure More details of the Rook (and Ceph) deployment should be useful when troubleshooting CI failures. This now includes the status of the most important Kubernetes objects, and all the logs Ceph stores on the host. Updates: #1969 Signed-off-by: Niels de Vos --- system-status.sh | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/system-status.sh b/system-status.sh index 6dfe6a82a..4cb074e5c 100755 --- a/system-status.sh +++ b/system-status.sh @@ -13,13 +13,13 @@ function minikube_ssh() { } function log() { - echo "###" - echo "### going to execute: ${*}" - echo "###" + echo "###" >/dev/stderr + echo "### going to execute: ${*}" >/dev/stderr + echo "###" >/dev/stderr "${@}" - echo "###" - echo "### execution finished: ${*}" - echo "###" + echo "###" >/dev/stderr + echo "### execution finished: ${*}" >/dev/stderr + echo "###" >/dev/stderr } # get the status of the VM in libvirt @@ -38,3 +38,18 @@ log minikube_ssh journalctl --boot # filesystem status for host and VM log df -hT log minikube_ssh df -hT + +# fetch all logs from /var/lib/rook in the VM and write them to stdout +log minikube_ssh sudo tar c /var/lib/rook | tar xvO + +# gets status of the Rook deployment +log kubectl -n rook-ceph get pods +log kubectl -n rook-ceph describe pods +log kubectl -n rook-ceph describe CephCluster +log kubectl -n rook-ceph describe CephBlockPool +log kubectl -n rook-ceph describe CephFilesystem + +# run "ceph -s" in the toolbox +log kubectl -n rook-ceph exec \ + "$(kubectl -n rook-ceph get pod -l app=rook-ceph-tools -o jsonpath='{.items[0].metadata.name}')" \ + ceph -s