diff options
author | Arif Ali <arif.ali@canonical.com> | 2023-05-13 20:14:03 +0100 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2023-05-15 10:32:38 -0400 |
commit | ba7382529c67b7da92c368b2b0697e78ba9b17b3 (patch) | |
tree | 41b188a46f8afa6ca984b7375a589c9d59af0fcb | |
parent | 4eba7ec6f4758c20f5f130bb8598345229608120 (diff) | |
download | sos-ba7382529c67b7da92c368b2b0697e78ba9b17b3.tar.gz |
[lxd] Add logs and config from the snap
Signed-off-by: Arif Ali <arif.ali@canonical.com>
-rw-r--r-- | sos/report/plugins/lxd.py | 17 |
1 files changed, 17 insertions, 0 deletions
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", |