Bug 2209946 - pmlogger_daily not discarding older files at expected times
Summary: pmlogger_daily not discarding older files at expected times
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcp
Version: 7.9
Hardware: x86_64
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Nathan Scott
QA Contact: Jan Kurik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-25 10:00 UTC by Pradeep Jagtap
Modified: 2023-07-10 07:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-15 23:58:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-158168 0 None None None 2023-05-25 10:02:06 UTC

Description Pradeep Jagtap 2023-05-25 10:00:43 UTC
Description of problem:

Version-Release number of selected component (if applicable):
pcp-4.3.2-13.el7_9.x86_64

How reproducible:

Steps to Reproduce:
1. Install pcp packages 
2. No major configuration changes apart from below parameter
3. Make sure the PMLOGGER_DAILY_PARAMS
        # grep -v "#" /etc/sysconfig/pmlogger_timers 
        PMLOGGER_DAILY_PARAMS=" --discard 2"

Actual results:
Files older than 2 days not getting discarded 

Expected results:
Files older than 2 days should be discarded

Comment 4 Nathan Scott 2023-05-29 03:06:46 UTC
Hmm, strange - we've not seen this before AFAIK.  Did that pmlogger_daily.log error message occur before your configuration change also or only afterwards?

Can you try removing the configuration change and directly edit the shell script /usr/libexec/pcp/bin/pmlogger_daily CULLAFTER=14 line (set it to CULLAFTER=2 instead) and see if this resolves the problem?  This will tell us if its a configuration issue or a code issue.  Thanks.

[ Resetting prio/sev to 'low' because, either way, there's a workaround available via provisioning a little more disk space.  The fact that no one else reported this over the years suggests something unusual is going no here too.  ]

Comment 5 Pradeep Jagtap 2023-05-29 08:02:37 UTC
[Q] Did that pmlogger_daily.log error message occur before your configuration change also or only afterwards?
[A] These error messages occur after the configuration changes were done.

I made those recommended changes, will monitor for 2 days and share the results.

Comment 6 Nathan Scott 2023-05-29 23:06:57 UTC
Thanks Pradeep.  Very interesting that those errors crept in with the config change - makes me wonder if its something to do with the way the arguments are being passed to pmlogger_daily.  One other thing to try (after the current experiment) would be to remove the whitespace in the string - and perhaps even the quotes too - so, something like:
PMLOGGER_DAILY_PARAMS=-k2

Oh, actually, just noticed something thats changed - in recent versions of PCP we have:
src/pmlogger/pmlogger_daily.service.in:Environment="PMLOGGER_DAILY_PARAMS=-E"
src/pmlogger/pmlogger_daily.service.in:ExecStart=@PCP_BINADM_DIR@/pmlogger_daily $PMLOGGER_DAILY_PARAM

but I see in el7 PCP there's no use of the Environment keyword.  This may have been a systemd change in recent years, not sure, but it may also be worthwhile trying to set the value in the service file rather than the sysconfig file, perhaps.


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