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 <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2021-05-12 14:11:10 +02:00 committed by mergify[bot]
parent 86d5c17ba4
commit 410db81215

View File

@ -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