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.
Description of problem:
This is a follow-up of BZ 1833647.
I believe there are other changes to be perform in pmlogger service startup sequence:
1. Upon startup, systemd complains with this message
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
systemd[1]: pmlogger.service: Supervising process 6741 which is not our child. We'll most likely not notice when it exits.
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
This is due to /usr/share/pcp/lib/pmlogger forking the main pid but not detaching immediately.
Once initialization is complete, the main pid will have PID 1 as parent, so systemd will effectively monitor the process appropriately.
2. "pmlogger.service" has no "Required" dependency on "pmcd.service", causing AVCs and weird messages to be logged when "pmcd.service" is not enabled
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
systemd[1]: Starting Performance Metrics Archive Logger...
pmlogger[1725]: /usr/share/pcp/lib/pmlogger: Warning: Performance Co-Pilot archive logger(s) not permanently enabled.
pmlogger[1725]: To enable pmlogger, run the following as root:
pmlogger[1725]: # /usr/bin/systemctl enable pmlogger.service
pmlogger[1725]: Starting pmlogger ...
systemd[1]: pmlogger.service: Can't open PID file /run/pcp/pmlogger.pid (yet?) after start: No such file or directory
root[2109]: pmlogger_check failed - see /var/log/pcp/pmlogger/pmlogger_check.log
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Additionally it waits for 120 seconds to report failure.
Looking at the pmlogger.service unit file, I see weird After/BindsTo dependencies on timers and no Requires on pmcd.service at all:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
After=pmlogger_check.timer pmlogger_daily.timer pmlogger_daily-poll.timer
BindsTo=pmlogger_check.timer pmlogger_daily.timer pmlogger_daily-poll.timer
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
I would expect this instead:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Requires=pmcd.service
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
This would trigger automatic startup of "pmcd.service". Additionally having a BindsTo or After dependency on timers looks weird to me.
Version-Release number of selected component (if applicable):
pcp-5.0.2-5.el8.x86_64
How reproducible:
Always
@Renaud: thanks for your report.
As I am unable to reproduce the AVC issue, can you please be more specific about it ?
Output of "ausearch -m AVC" or "audit2allow -a" would be helpful.