Skip to content

Commit

Permalink
[containerd] Collect image and container list
Browse files Browse the repository at this point in the history
Resolves: SET-680

Signed-off-by: Arif Ali <[email protected]>
  • Loading branch information
arif-ali authored and TurboTurtle committed Oct 23, 2024
1 parent d87efc5 commit 92393e4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions sos/report/plugins/containerd.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#
# See the LICENSE file in the source distribution for further information.

from sos.report.plugins import (Plugin, RedHatPlugin, UbuntuPlugin, CosPlugin)
from sos.report.plugins import Plugin, IndependentPlugin


class Containerd(Plugin, RedHatPlugin, UbuntuPlugin, CosPlugin):
class Containerd(Plugin, IndependentPlugin):

short_desc = 'Containerd containers'
plugin_name = 'containerd'
Expand All @@ -25,6 +25,13 @@ def setup(self):
self.add_cmd_output('containerd config dump')
self.add_cmd_output('ctr deprecations list')

pre_cmd = 'ctr -n k8s.io'

self.add_cmd_output([
f'{pre_cmd} image ls',
f'{pre_cmd} container ls',
])

# collect the containerd logs.
self.add_journal(units='containerd')

Expand Down

0 comments on commit 92393e4

Please sign in to comment.