]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: update collect-logs.yml playbook
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 30 Sep 2021 06:23:42 +0000 (08:23 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 30 Sep 2021 15:48:21 +0000 (17:48 +0200)
- change `ceph -s` output to json-pretty.
- gather rgw logs
- add `health detail` command

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit b2ccc7234a8413a8bbd5d471da9ff2cf8f3ccde2)

tests/functional/collect-logs.yml

index 389482a55482758a96dfdfb6afdb18d1465e9ef9..68648b6c2d77c4fb8e79affb742ee532d0037ccb 100644 (file)
       failed_when: false
       changed_when: false
       with_items:
-        - "-s -f json"
+        - "-s -f json-pretty"
         - "osd tree"
         - "osd dump"
         - "pg dump"
         - "versions"
+        - "health detail -f json-pretty"
 
     - name: save ceph status to file
       copy:
           or
           (groups.get(mgr_group_name, []) | length == 0 and inventory_hostname in groups.get(mon_group_name, []))
 
+    - name: get rgw log
+      shell: journalctl -l -u ceph-radosgw@rgw.{{ ansible_facts['hostname'] }}.{{ item.instance_name }} > /var/log/ceph/ceph-radosgw.{{ ansible_facts['hostname'] }}.{{ item.instance_name }}.log
+      changed_when: false
+      with_items: "{{ rgw_instances | default([]) }}"
+      when: inventory_hostname in groups.get(rgw_group_name, [])
+
     - name: find ceph config file and logs
       find:
         paths: