diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2019-10-25 12:10:21 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2019-10-25 12:14:58 -0400 |
commit | 909120ef29c0731a06328d1826a08ce7edb58cb3 (patch) | |
tree | f769398020fd2569b3e9a4a3c8c167af6d065a0f | |
parent | aeb654ec1034fd1c3f3781bcb9ad26b46dc769de (diff) | |
download | sos-909120ef29c0731a06328d1826a08ce7edb58cb3.tar.gz |
[podman] Collect network information and cert/hooks list
First, adds collection of a recursive listing of /etc/containers to show
which certs and oci hooks may be present.
Second, adds collection of podman networking information. Both the
output of 'podman network ls' and a subsequent inspect on each network
reported are captured. The inspect outputs are saved to the 'networks'
subdir.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | sos/plugins/podman.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sos/plugins/podman.py b/sos/plugins/podman.py index edf68b7f..c00a63ee 100644 --- a/sos/plugins/podman.py +++ b/sos/plugins/podman.py @@ -62,7 +62,17 @@ class Podman(Plugin, RedHatPlugin, UbuntuPlugin): if self.get_option('size'): self.add_cmd_output('podman ps -as') - self.add_cmd_output("ls -alhR /etc/cni") + self.add_cmd_output([ + "ls -alhR /etc/cni", + "ls -alhR /etc/containers" + ]) + + pnets = self.collect_cmd_output('podman network ls') + if pnets['status'] == 0: + nets = [pn.split()[0] for pn in pnets['output'].splitlines()[1:]] + self.add_cmd_output([ + "podman network inspect %s" % net for net in nets + ], subdir='networks') ps_cmd = 'podman ps -q' if self.get_option('all'): |