Skip to content

Commit

Permalink
[plugins] mark 9 plugins as supported on COS
Browse files Browse the repository at this point in the history
9 exisiting plugins already works on Container-Optimized OS. Marking it
to reflect that.

Signed-off-by: Xuewei Zhang <[email protected]>
  • Loading branch information
Xuewei Zhang committed Sep 19, 2018
1 parent 3d7a43d commit b89174e
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 16 deletions.
5 changes: 3 additions & 2 deletions sos/plugins/cgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
#
# See the LICENSE file in the source distribution for further information.

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


class Cgroups(Plugin, DebianPlugin, UbuntuPlugin):
class Cgroups(Plugin, DebianPlugin, UbuntuPlugin, CosPlugin):
"""Control groups subsystem
"""

Expand Down
5 changes: 3 additions & 2 deletions sos/plugins/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
#
# See the LICENSE file in the source distribution for further information.

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


class Devices(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
class Devices(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin, CosPlugin):
""" devices specific commands
"""

Expand Down
11 changes: 10 additions & 1 deletion sos/plugins/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
# See the LICENSE file in the source distribution for further information.

from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin
from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin, CosPlugin


class Docker(Plugin):
Expand Down Expand Up @@ -110,4 +110,13 @@ def setup(self):
"/var/run/docker/libcontainerd/containerd/events.log"
])


class CosDocker(Docker, CosPlugin):

def setup(self):
super(CosDocker, self).setup()
self.add_copy_spec([
"/etc/docker/daemon.json"
])

# vim: set et ts=4 sw=4 :
5 changes: 3 additions & 2 deletions sos/plugins/filesys.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
#
# See the LICENSE file in the source distribution for further information.

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


class Filesys(Plugin, DebianPlugin, UbuntuPlugin):
class Filesys(Plugin, DebianPlugin, UbuntuPlugin, CosPlugin):
"""Local file systems
"""

Expand Down
5 changes: 3 additions & 2 deletions sos/plugins/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
#
# See the LICENSE file in the source distribution for further information.

from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
from sos.plugins import (Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin,
CosPlugin)
import os
import glob
import json


class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin, CosPlugin):
"""Linux kernel
"""

Expand Down
22 changes: 21 additions & 1 deletion sos/plugins/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import os
import glob
from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
from sos.plugins import (Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin,
CosPlugin)


class Logs(Plugin):
Expand Down Expand Up @@ -121,4 +122,23 @@ def setup(self):
else:
self.add_copy_spec("/var/log/")


class CosLogs(Logs, CosPlugin):

option_list = [
("log_days", "the number of days logs to collect", "", 3)
]

def setup(self):
super(CosLogs, self).setup()
self.add_cmd_output('ls -alRh /var/log/')
if self.get_option("all_logs"):
self.add_cmd_output("journalctl -o export")
else:
try:
days = int(self.get_option("log_days"))
except ValueError:
days = 3
self.add_journal(since="-%ddays" % days)

# vim: set et ts=4 sw=4 :
5 changes: 3 additions & 2 deletions sos/plugins/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
#
# See the LICENSE file in the source distribution for further information.

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


class Memory(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
class Memory(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin, CosPlugin):
"""Memory configuration and use
"""

Expand Down
5 changes: 3 additions & 2 deletions sos/plugins/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
#
# See the LICENSE file in the source distribution for further information.

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


class Process(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
class Process(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin, CosPlugin):
"""process information
"""

Expand Down
5 changes: 3 additions & 2 deletions sos/plugins/systemd.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
#
# See the LICENSE file in the source distribution for further information.

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


class Systemd(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
class Systemd(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin, CosPlugin):
""" System management daemon
"""

Expand Down

0 comments on commit b89174e

Please sign in to comment.