]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible: try to get cluster status in teardown 1288/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 23 Apr 2019 07:04:22 +0000 (09:04 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 23 Apr 2019 07:04:22 +0000 (09:04 +0200)
sometimes it can be useful to get the full ceph cluster status
when troubleshooting CI failures.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
scripts/build_utils.sh

index d91b1035833f2ea2bd5673b412c09c852988b77c..d0441dd41eb7f90df57acaa3be089050f3a3169a 100644 (file)
@@ -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
 }