Bug 1851491 - Limit collected log size
Summary: Limit collected log size
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Insights Operator
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.6.0
Assignee: Alexandre Vicenzi
QA Contact: Angelina Vasileva
Radek Vokál
URL:
Whiteboard:
Depends On:
Blocks: 1851492
TreeView+ depends on / blocked
 
Reported: 2020-06-26 17:29 UTC by Vadim Rutkovsky
Modified: 2020-10-27 16:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1851492 (view as bug list)
Environment:
Last Closed: 2020-10-27 16:09:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift insights-operator pull 126 0 None closed clusterconfig.go: limit the size of collected logs 2020-09-21 12:29:26 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:10:13 UTC

Description Vadim Rutkovsky 2020-06-26 17:29:19 UTC
Instead of limiting a number of lines we fetch from container Insights operator should estimate how many bytes would be written (based on available log budget and number of unhealthy containers). This would ensure large log lines don't affect bundle size

Comment 1 Angelina Vasileva 2020-07-02 06:53:26 UTC
Fixed and verified in 4.6.0-0.nightly-2020-06-30-020342

1. Degrade operator so the logs will be collected (https://bugzilla.redhat.com/show_bug.cgi?id=1838973#c3)
2. Enter some pod
oc rsh prometheus-k8s-0

3. Write there something like
$ yes "Some text" | head -n 100000 > /proc/1/fd/1

4. Verify the log (in that case prometheus_current.log) doesn't exceed 100 lines or https://github.com/openshift/insights-operator/pull/128/files#diff-397c7d21d587358413d334b87528a7cbR215

Comment 4 errata-xmlrpc 2020-10-27 16:09:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4196


Note You need to log in before you can comment on or make changes to this bug.