From 1383510510456c50dfa6133105c9f95e13551d83 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 25 Mar 2019 15:01:05 +0000 Subject: [docker] fix command predicate usage Move the Docker service command predicate later in the file (so as not to gate journal and ls collection), and ensure that the 'owner' argument of the SoSPredicate initialiser is set. Resolves: #1617 Signed-off-by: Bryn M. Reeves --- sos/plugins/docker.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sos/plugins/docker.py b/sos/plugins/docker.py index c57a603a..bbc18145 100644 --- a/sos/plugins/docker.py +++ b/sos/plugins/docker.py @@ -28,8 +28,6 @@ class Docker(Plugin): ] def setup(self): - self.set_cmd_predicate(SoSPredicate(services=["docker"])) - self.add_copy_spec([ "/etc/docker/daemon.json", "/var/lib/docker/repositories-*" @@ -38,10 +36,7 @@ class Docker(Plugin): self.add_journal(units="docker") self.add_cmd_output("ls -alhR /etc/docker") - if not self.service_is_running('docker'): - # if docker is not running none of the below commands will provide - # any useful output - return + self.set_cmd_predicate(SoSPredicate(self, services=["docker"])) subcmds = [ 'events --since 24h --until 1s', -- cgit