Bug 1734283 - Client keeping 4 logs too few when payload uploads used
Summary: Client keeping 4 logs too few when payload uploads used
Alias: None
Product: Cloud Software Services (cloud.redhat.com)
Classification: Red Hat
Component: Client
Version: unspecified
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Stephen Adams
QA Contact: Pavol Kotvan
Kevin Blake
Depends On:
Blocks: 1122832
TreeView+ depends on / blocked
Reported: 2019-07-30 07:17 UTC by Peter Vreman
Modified: 2020-03-24 15:26 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-03-24 15:26:46 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Peter Vreman 2019-07-30 07:17:20 UTC
Description of problem:
I have a daily regular-run and a payload-upload for compliance.
the log directory has only 4 logs, that means 2 days of logs

vrempet@li-lc-2237 /var/log/insights-client
$ grep payload *
insights-client.log:    payload: None
insights-client.log.1:2019-07-30 01:03:20,453    DEBUG insights.client.phase.v1 Uploading a payload. Bypassing rules update.
insights-client.log.1:    payload: /var/lib/insights/compliance-report-standard.xml
insights-client.log.2:    payload: None
insights-client.log.3:2019-07-29 01:03:23,159    DEBUG insights.client.phase.v1 Uploading a payload. Bypassing rules update.
insights-client.log.3:    payload: /var/lib/insights/compliance-report-standard.xml

vrempet@li-lc-2237 /var/log/insights-client
$ ls -l
total 496
-rw-rw-r--+ 1 root root 238597 Jul 30 02:45 insights-client.log
-rw-rw-r--+ 1 root root  10988 Jul 30 01:03 insights-client.log.1
-rw-rw-r--+ 1 root root 238597 Jul 29 02:38 insights-client.log.2
-rw-rw-r--+ 1 root root  10988 Jul 29 01:03 insights-client.log.3

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Daily regular-run
2. Daily payload uplaod of 3 complaince reports
3. Wait 2 days

Actual results:
Only 1 day of logs

Expected results:
At least 4 days of logs to overcome a weekend, but prefered 1 week of logs to cover also long-weekends thu-sun

Maybe also create different log files for different actions

Additional info:

Comment 3 Dave Johnson 2020-01-20 15:07:02 UTC
Pavol, has this been released yet?  JIRA is in done state.   If not released, can you please give an idea as to when?  TY

Comment 4 Pavol Kotvan 2020-03-02 15:29:28 UTC
Fix should be available in core 3.0.150. 

With the fix there should be two separate logs, one for classic and one when --payload option is used. 
This allows us to keep a separate log file for each type of upload and retain that 4 day rotation that had.

Comment 5 Peter Vreman 2020-03-03 07:58:33 UTC
Confirming that with egg 3.0.150 i have now 4 days of logs for both standard and a payload uploads:

$ sudo ls -l /var/log/insights-client/
total 800
-rw-r--r--. 1 root root 196339 Mar  3 03:40 insights-client.log
-rw-r--r--. 1 root root 196339 Mar  2 03:08 insights-client.log.1
-rw-r--r--. 1 root root 196339 Mar  1 03:12 insights-client.log.2
-rw-r--r--. 1 root root 196339 Feb 29 03:42 insights-client.log.3
-rw-r--r--. 1 root root   7362 Mar  3 01:33 insights-client-payload.log
-rw-r--r--. 1 root root   7362 Mar  2 01:32 insights-client-payload.log.1
-rw-r--r--. 1 root root   7362 Mar  1 01:32 insights-client-payload.log.2
-rw-r--r--. 1 root root   7362 Feb 29 01:33 insights-client-payload.log.3

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