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 1833648 - pmlogger service doesn't start or prints weird message
Summary: pmlogger service doesn't start or prints weird message
Keywords:
Status: CLOSED DUPLICATE of bug 1806428
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcp
Version: 8.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: Mark Goodwin
QA Contact: Jan Kurik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-09 11:32 UTC by Renaud Métrich
Modified: 2021-09-17 12:44 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-11 12:12:40 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5082281 0 None None None 2020-05-18 06:14:31 UTC

Description Renaud Métrich 2020-05-09 11:32:31 UTC
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

Comment 1 Jan Kurik 2020-05-09 16:05:09 UTC
@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.

Comment 4 Renaud Métrich 2020-05-11 12:12:40 UTC
Indeed it's a DUP of BZ#1806428

*** This bug has been marked as a duplicate of bug 1806428 ***


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