From ba7382529c67b7da92c368b2b0697e78ba9b17b3 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Sat, 13 May 2023 20:14:03 +0100 Subject: [lxd] Add logs and config from the snap Signed-off-by: Arif Ali --- sos/report/plugins/lxd.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sos/report/plugins/lxd.py b/sos/report/plugins/lxd.py index dad34acc..fe284151 100644 --- a/sos/report/plugins/lxd.py +++ b/sos/report/plugins/lxd.py @@ -44,6 +44,23 @@ class LXD(Plugin, UbuntuPlugin): snap_list = self.exec_cmd('snap list lxd') if snap_list["status"] == 0: self.add_cmd_output("lxd.buginfo", pred=lxd_pred) + + self.add_copy_spec([ + '/var/snap/lxd/common/config', + '/var/snap/lxd/common/global-conf', + '/var/snap/lxd/common/lxc/local.conf', + '/var/snap/lxd/common/lxd/logs/*/*.conf', + ]) + + if not self.get_option("all_logs"): + self.add_copy_spec([ + '/var/snap/lxd/common/lxd/logs/*.log', + '/var/snap/lxd/common/lxd/logs/*/*.log', + ]) + else: + self.add_copy_spec([ + '/var/snap/lxd/common/lxd/logs/**', + ]) else: self.add_copy_spec([ "/etc/default/lxd-bridge", -- cgit