Bug 2217209

Summary: PMIE logs created by root caused pmie_daily.service failed
Product: [Fedora] Fedora Reporter: LinShen <fedora>
Component: pcpAssignee: Nathan Scott <nathans>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: agerstmayr, jkurik, mgoodwin, nathans
Target Milestone: ---Keywords: Upgrades
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: pcp-6.0.5-1.fc38 pcp-6.0.5-1.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-29 01:25:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description LinShen 2023-06-25 03:47:49 UTC
After upgrade packages to `cockpit-pcp-294.1-1.fc38.x86_64 pcp-6.0.4-1.fc38.x86_64 pcp-conf-6.0.4-1.fc38.x86_64 pcp-libs-6.0.4-1.fc38.x86_64 pcp-selinux-6.0.4-1.fc38.x86_64`, files at `/var/log/pcp/pmie/$hostname/` named like `pmie.log.20230624`, creator changed to root, instead of pcp. It caused pmie_daily.service failed.

Reproducible: Always

Steps to Reproduce:
1. dnf update -y --refresh
2. reboot
Actual Results:  
-rw-r--r--  1 root root  185 Jun 24 22:59 pmie.log.20230624
-----------------------------------------------------------
  UNIT               LOAD   ACTIVE SUB    DESCRIPTION      
● pmie_daily.service loaded failed failed Process PMIE logs
-----------------------------------------------------------
/usr/libexec/pcp/bin/pmie_daily: line 532: /var/log/pcp/pmie/fedora/pmie.log.20230624: Permission denied
/usr/libexec/pcp/bin/pmie_daily: line 533: /var/log/pcp/pmie/fedora/pmie.log.20230624: Permission denied
pmie_daily: Error: problems moving logfile "/var/log/pcp/pmie/fedora/pmie.log" for host "local:"
[/etc/pcp/pmie/control.d/local:5] ... inference engine for host "local:" unchanged


Expected Results:  
-rw-r--r--  1 pcp pcp  185 Jun 24 22:59 pmie.log.20230624

Comment 1 Nathan Scott 2023-06-25 23:13:31 UTC
Thanks for reporting LinShen.  This is fixed upstream and will be part of todays pcp-6.0.5 release.

Comment 2 Fedora Update System 2023-06-26 02:24:46 UTC
FEDORA-2023-8c3b058ebd has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-8c3b058ebd

Comment 3 Fedora Update System 2023-06-26 02:24:49 UTC
FEDORA-2023-1f0937ef5b has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-1f0937ef5b

Comment 4 Fedora Update System 2023-06-27 10:44:49 UTC
FEDORA-2023-8c3b058ebd has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-8c3b058ebd`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-8c3b058ebd

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2023-06-27 10:55:03 UTC
FEDORA-2023-1f0937ef5b has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-1f0937ef5b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-1f0937ef5b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2023-06-29 01:25:09 UTC
FEDORA-2023-1f0937ef5b has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2023-06-29 01:46:42 UTC
FEDORA-2023-8c3b058ebd has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.