|
|
e0829c |
From 47e6b3d92c8a13560b248e6f0e2ffb334b547d07 Mon Sep 17 00:00:00 2001
|
|
|
e0829c |
From: Yedidyah Bar David <didi@redhat.com>
|
|
|
e0829c |
Date: Tue, 4 Dec 2018 13:08:44 +0200
|
|
|
e0829c |
Subject: [PATCH] [Plugin] Obey sizelimit=0
|
|
|
e0829c |
|
|
|
e0829c |
If sizelimit is 0, do not limit. Only use the default if it's None.
|
|
|
e0829c |
|
|
|
e0829c |
Bug-Url: https://bugzilla.redhat.com/1654068
|
|
|
e0829c |
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
|
|
|
e0829c |
---
|
|
|
e0829c |
sos/plugins/__init__.py | 6 ++++--
|
|
|
e0829c |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
e0829c |
|
|
|
e0829c |
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
|
|
|
e0829c |
index 7d2a8b2d..97f3cc59 100644
|
|
|
e0829c |
--- a/sos/plugins/__init__.py
|
|
|
e0829c |
+++ b/sos/plugins/__init__.py
|
|
|
e0829c |
@@ -569,7 +569,8 @@ class Plugin(object):
|
|
|
e0829c |
a single file the file will be tailed to meet sizelimit. If the first
|
|
|
e0829c |
file in a glob is too large it will be tailed to meet the sizelimit.
|
|
|
e0829c |
"""
|
|
|
e0829c |
- sizelimit = sizelimit or self.get_option("log_size")
|
|
|
e0829c |
+ if sizelimit is None:
|
|
|
e0829c |
+ sizelimit = self.get_option("log_size")
|
|
|
e0829c |
|
|
|
e0829c |
if self.get_option('all_logs'):
|
|
|
e0829c |
sizelimit = None
|
|
|
e0829c |
@@ -703,7 +704,8 @@ class Plugin(object):
|
|
|
e0829c |
cmds = [cmds]
|
|
|
e0829c |
if len(cmds) > 1 and (suggest_filename or root_symlink):
|
|
|
e0829c |
self._log_warn("ambiguous filename or symlink for command list")
|
|
|
e0829c |
- sizelimit = sizelimit or self.get_option("log_size")
|
|
|
e0829c |
+ if sizelimit is None:
|
|
|
e0829c |
+ sizelimit = self.get_option("log_size")
|
|
|
e0829c |
for cmd in cmds:
|
|
|
e0829c |
self._add_cmd_output(cmd, suggest_filename=suggest_filename,
|
|
|
e0829c |
root_symlink=root_symlink, timeout=timeout,
|
|
|
e0829c |
--
|
|
|
e0829c |
2.17.2
|
|
|
e0829c |
|
|
|
e0829c |
From 254d93499d64acaff5103e15c25649d418004737 Mon Sep 17 00:00:00 2001
|
|
|
e0829c |
From: Yedidyah Bar David <didi@redhat.com>
|
|
|
e0829c |
Date: Tue, 4 Dec 2018 13:10:32 +0200
|
|
|
e0829c |
Subject: [PATCH] [postgresql] Do not limit dump size
|
|
|
e0829c |
|
|
|
e0829c |
In principle, this might be risky - if a database is huge, we might not
|
|
|
e0829c |
want to collect all of it. But there is no sense in collecting only its
|
|
|
e0829c |
tail. If this turns out problematic, a future patch might check db size
|
|
|
e0829c |
and do not collect it at all if it's too large.
|
|
|
e0829c |
|
|
|
e0829c |
Bug-Url: https://bugzilla.redhat.com/1654068
|
|
|
e0829c |
|
|
|
e0829c |
Resolves: #1497
|
|
|
e0829c |
|
|
|
e0829c |
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
|
|
|
e0829c |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
e0829c |
---
|
|
|
e0829c |
sos/plugins/postgresql.py | 2 +-
|
|
|
e0829c |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
e0829c |
|
|
|
e0829c |
diff --git a/sos/plugins/postgresql.py b/sos/plugins/postgresql.py
|
|
|
e0829c |
index d47f7e8b..aef431f8 100644
|
|
|
e0829c |
--- a/sos/plugins/postgresql.py
|
|
|
e0829c |
+++ b/sos/plugins/postgresql.py
|
|
|
e0829c |
@@ -64,7 +64,7 @@ class PostgreSQL(Plugin):
|
|
|
e0829c |
if scl is not None:
|
|
|
e0829c |
cmd = self.convert_cmd_scl(scl, cmd)
|
|
|
e0829c |
self.add_cmd_output(cmd, suggest_filename=filename,
|
|
|
e0829c |
- binary=True)
|
|
|
e0829c |
+ binary=True, sizelimit=0)
|
|
|
e0829c |
|
|
|
e0829c |
else: # no password in env or options
|
|
|
e0829c |
self.soslog.warning(
|
|
|
e0829c |
--
|
|
|
e0829c |
2.17.2
|
|
|
e0829c |
|