diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2019-03-25 15:01:05 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-03-25 15:01:05 +0000 |
commit | 1383510510456c50dfa6133105c9f95e13551d83 (patch) | |
tree | c7e6716f0bfa67dd63923a7e02969fc477be0fe9 | |
parent | f31f7c3fb23a322f26ebfc8758be8a6b4ed1e7a6 (diff) | |
download | sos-1383510510456c50dfa6133105c9f95e13551d83.tar.gz |
[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 <bmr@redhat.com>
-rw-r--r-- | sos/plugins/docker.py | 7 |
1 files changed, 1 insertions, 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', |