From: Guillaume Abrioux Date: Tue, 23 Apr 2019 07:04:22 +0000 (+0200) Subject: ceph-ansible: try to get cluster status in teardown X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=890712f77c6f5ba179140abeb0aa7ad1c52d8a61;p=ceph-build.git ceph-ansible: try to get cluster status in teardown sometimes it can be useful to get the full ceph cluster status when troubleshooting CI failures. Signed-off-by: Guillaume Abrioux --- diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index d91b1035..d0441dd4 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -874,6 +874,24 @@ write_collect_logs_playbook() { - "/etc/ceph/ceph.conf" - "/etc/ceph/test.conf" - "/etc/ceph/mycluster.conf" + +- hosts: mon0 + become: True + tasks: + - name: get cluster status + command: "ceph --cluster {{ item }} -s -f json" + register: ceph_status + changed_when: False + with_items: + - ceph + - test + - mycluster + + - name: show ceph status + debug: + msg: "{{ item.stdout }}" + with_items: "{{ ceph_status.results }}" + when: item.rc == 0 EOF }