implement reverse reader for log reads

in cases where the log file exceeds the available memory of a system, we had a bug that triggered an oom because the entire logfile was being read when the tail parameter was given.  this reads in chunks and is more or less memory safe.

fixes: #5131

Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
Brent Baude
2020-02-18 08:30:56 -06:00
parent 8c0df03deb
commit e3b31a3ab8
4 changed files with 138 additions and 24 deletions

View File

@ -97,7 +97,7 @@ keys=[k for k in env if "ENCRYPTED" not in str(env[k])]
for k,v in env.items():
v=str(v)
if "ENCRYPTED" not in v:
print "{0}=\"{1}\"".format(k, v),
print("{0}=\"{1}\"".format(k, v)),
'
}