]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: collect mons and mgrs logs
authorSeena Fallah <seenafallah@gmail.com>
Thu, 16 May 2024 22:11:48 +0000 (00:11 +0200)
committerGuillaume Abrioux <gabrioux@ibm.com>
Fri, 17 May 2024 06:32:08 +0000 (08:32 +0200)
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
tests/functional/collect-logs.yml

index 362ce7be8aef87fc0b1682589235a77aec0f5c5b..72591bee478e3df52f41203221474c8006628d11 100644 (file)
       changed_when: false
       ignore_errors: true
 
+    - name: Get mon log
+      ansible.builtin.shell: journalctl -l -u ceph-mon@{{ ansible_facts['hostname'] }} > /var/log/ceph/ceph-mon.{{ ansible_facts['hostname'] }}.log
+      changed_when: false
+      when: inventory_hostname in groups.get(mon_group_name, [])
+
+    - name: Get mds log
+      ansible.builtin.shell: journalctl -l -u ceph-mds@{{ ansible_facts['hostname'] }} > /var/log/ceph/ceph-mon.{{ ansible_facts['hostname'] }}.log
+      changed_when: false
+      when: inventory_hostname in groups.get(mds_group_name, [])
+
     - name: Get mgr log
       ansible.builtin.shell: journalctl -l -u ceph-mgr@{{ ansible_facts['hostname'] }} > /var/log/ceph/ceph-mgr.{{ ansible_facts['hostname'] }}.log
       changed_when: false