From 779a13eb31db10cff0ca315b9907ed68a6f480a1 Mon Sep 17 00:00:00 2001 From: Seena Fallah Date: Fri, 17 May 2024 00:11:48 +0200 Subject: [PATCH] tests: collect mons and mgrs logs Signed-off-by: Seena Fallah --- tests/functional/collect-logs.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/functional/collect-logs.yml b/tests/functional/collect-logs.yml index 362ce7be8..72591bee4 100644 --- a/tests/functional/collect-logs.yml +++ b/tests/functional/collect-logs.yml @@ -49,6 +49,16 @@ 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