Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2209946

Summary: pmlogger_daily not discarding older files at expected times
Product: Red Hat Enterprise Linux 7 Reporter: Pradeep Jagtap <prjagtap>
Component: pcpAssignee: Nathan Scott <nathans>
Status: CLOSED WONTFIX QA Contact: Jan Kurik <jkurik>
Severity: low Docs Contact:
Priority: low    
Version: 7.9CC: jkurik, nathans, scox
Target Milestone: rcKeywords: Bugfix, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-15 23:58:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.