From 1ec2b7b6f088e65a9232d063eb6b53d248de476f Mon Sep 17 00:00:00 2001 From: Eric Desrochers Date: Tue, 23 Apr 2019 16:07:03 -0400 Subject: [lxd] adapting the plugin to support lxd 3.0.X series Enable proper collection for LXD 3.0.X, while staying backward compatible with LXD 2.0.X which can still be used with Xenial/16.04 LTS only. Resolves: #1659 Signed-off-by: Eric Desrochers eric.desrochers@canonical.com Signed-off-by: Bryn M. Reeves --- sos/plugins/lxd.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/sos/plugins/lxd.py b/sos/plugins/lxd.py index ce831e00..02ff7073 100644 --- a/sos/plugins/lxd.py +++ b/sos/plugins/lxd.py @@ -18,19 +18,30 @@ class LXD(Plugin, UbuntuPlugin): profiles = ('container',) packages = ('lxd',) + # Version 2.0.X: + # - /etc/default/lxd-bridge + # - /var/lib/lxd/lxd.db + # + # Version 3.0.X: + # - /var/lib/lxd/database/local.db + # - /var/lib/lxd/database/global/* + # - lxd-bridge no longer exist. + # def setup(self): self.add_copy_spec([ + "/etc/default/lxd-bridge", "/var/lib/lxd/lxd.db", - "/etc/default/lxc-bridge", + "/var/lib/lxd/database/local.db", + "/var/lib/lxd/database/global/*", + "/var/log/lxd/*" ]) - self.add_copy_spec("/var/log/lxd*") - - # List of containers available on the machine self.add_cmd_output([ + "lxc image list", "lxc list", + "lxc network list", "lxc profile list", - "lxc image list", + "lxc storage list" ]) self.add_cmd_output([ -- cgit