From 18402b636f5b100b288ab25638b9b452632fb227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Wed, 7 Mar 2018 11:56:30 +0100 Subject: [PATCH] defaults: add useful info if daemon are not restarted properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If OSDs don't restart normally we now also dump info of the crush map, crush rules, crush tree and pools. If the monitors don't restart normally we also print the socket status by calling mon_status and quorum_status. Signed-off-by: Sébastien Han --- roles/ceph-defaults/templates/restart_mon_daemon.sh.j2 | 3 +++ roles/ceph-defaults/templates/restart_osd_daemon.sh.j2 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/roles/ceph-defaults/templates/restart_mon_daemon.sh.j2 b/roles/ceph-defaults/templates/restart_mon_daemon.sh.j2 index cfa7dfa24..d54dc3908 100644 --- a/roles/ceph-defaults/templates/restart_mon_daemon.sh.j2 +++ b/roles/ceph-defaults/templates/restart_mon_daemon.sh.j2 @@ -20,6 +20,9 @@ done echo "Error with quorum." echo "cluster status:" $DOCKER_EXEC ceph --cluster {{ cluster }} -s +echo "quorum status:" +$DOCKER_EXEC ceph --cluster {{ cluster }} daemon mon.${MONITOR_NAME} mon_status +$DOCKER_EXEC ceph --cluster {{ cluster }} daemon mon.${MONITOR_NAME} quorum_status exit 1 } diff --git a/roles/ceph-defaults/templates/restart_osd_daemon.sh.j2 b/roles/ceph-defaults/templates/restart_osd_daemon.sh.j2 index 4ad28c521..b09b2a020 100644 --- a/roles/ceph-defaults/templates/restart_osd_daemon.sh.j2 +++ b/roles/ceph-defaults/templates/restart_osd_daemon.sh.j2 @@ -21,6 +21,9 @@ check_pgs() { echo "It is possible that the cluster has less OSDs than the replica configuration" echo "Will refuse to continue" $docker_exec ceph $CEPH_CLI -s + $docker_exec ceph $CEPH_CLI osd dump + $docker_exec ceph $CEPH_CLI osd tree + $docker_exec ceph $CEPH_CLI osd crush rule dump exit 1 }