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 2043023

Summary: pmproxy fails to start, selinux dropped "lockdown"
Product: Red Hat Enterprise Linux 9 Reporter: Matej Marušák <mmarusak>
Component: pcpAssignee: pcp-maint <pcp-maint>
Status: CLOSED DUPLICATE QA Contact: Jan Kurik <jkurik>
Severity: unspecified Docs Contact: Jacob Taylor Valdez <jvaldez>
Priority: high    
Version: 9.0CC: agerstmayr, jkurik, lvrabec, mgoodwin, mmalik, mpitt, nathans, ssekidde
Target Milestone: rcKeywords: Regression
Target Release: ---Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-21 14:29:29 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 Matej Marušák 2022-01-20 13:57:33 UTC
Description of problem:
"systemctl start pmproxy" fails, most probably because of SELinux.

Version-Release number of selected component (if applicable):
selinux-policy-34.1.22-1.el9.noarch
pcp-5.3.5-3.el9.x86_64

How reproducible:
Always

Steps to Reproduce:
1. systemctl start pmproxy

Actual results:
pmproxy.service fails to start and journal contains:
```
Jan 20 08:53:52 grafana-client systemd[1]: Starting Proxy for Performance Metrics Collector Daemon...
Jan 20 08:53:52 grafana-client kernel: kauditd_printk_skb: 20 callbacks suppressed
Jan 20 08:53:52 grafana-client kernel: audit: type=1400 audit(1642686832.202:34): avc:  denied  { dac_override } for  pid=5641 comm="pmproxy" capability=1  scontext=system_u:system_r:pcp_pmproxy_t:s0 tcontext=system_u:system_r:pcp_pmproxy_t:s0 tclass=capability permissive=0
Jan 20 08:53:52 grafana-client pmproxy[5641]: pmproxy: cannot open log "pmproxy.log" for writing : Permission denied
Jan 20 08:53:52 grafana-client pmproxy[5641]: Log for pmproxy on grafana-client started Thu Jan 20 08:53:52 2022
Jan 20 08:53:52 grafana-client kernel: audit: type=1400 audit(1642686832.213:35): avc:  denied  { read } for  pid=5641 comm="pmproxy" name="disable_ipv6" dev="proc" ino=25776 scontext=system_u:system_r:pcp_pmproxy_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=file permissive=0
Jan 20 08:53:52 grafana-client pmproxy[5641]: [Thu Jan 20 08:53:52] pmproxy(5641) Error: pmWebTimerSetMetricRegistry: server instrumentation disabled
Jan 20 08:53:52 grafana-client kernel: audit: type=1400 audit(1642686832.216:36): avc:  denied  { dac_override } for  pid=5641 comm="pmproxy" capability=1  scontext=system_u:system_r:pcp_pmproxy_t:s0 tcontext=system_u:system_r:pcp_pmproxy_t:s0 tclass=capability permissive=0
Jan 20 08:53:52 grafana-client pmproxy[5641]: pmproxy: local listen error invalid argument
Jan 20 08:53:52 grafana-client systemd[1]: Started Proxy for Performance Metrics Collector Daemon.
Jan 20 08:53:52 grafana-client pmproxy[5641]: Error: cannot open PID file /run/pcp/pmproxy.pid
Jan 20 08:53:52 grafana-client pmproxy[5641]: [Thu Jan 20 08:53:52] pmproxy(5641) Error: pmproxy not started due to errors!
Jan 20 08:53:52 grafana-client pmproxy[5641]: Log finished Thu Jan 20 08:53:52 2022
Jan 20 08:53:52 grafana-client kernel: audit: type=1400 audit(1642686832.218:37): avc:  denied  { dac_override } for  pid=5641 comm="pmproxy" capability=1  scontext=system_u:system_r:pcp_pmproxy_t:s0 tcontext=system_u:system_r:pcp_pmproxy_t:s0 tclass=capability permissive=0
Jan 20 08:53:52 grafana-client kernel: audit: type=1400 audit(1642686832.221:38): avc:  denied  { dac_override } for  pid=5641 comm="pmproxy" capability=1  scontext=system_u:system_r:pcp_pmproxy_t:s0 tcontext=system_u:system_r:pcp_pmproxy_t:s0 tclass=capability permissive=0
Jan 20 08:53:52 grafana-client systemd[1]: pmproxy.service: Main process exited, code=exited, status=1/FAILURE
Jan 20 08:53:52 grafana-client systemd[1]: pmproxy.service: Failed with result 'exit-code'.
Jan 20 08:53:52 grafana-client systemd[1]: pmproxy.service: Scheduled restart job, restart counter is at 1.
Jan 20 08:53:52 grafana-client systemd[1]: Stopped Proxy for Performance Metrics Collector Daemon.
```

Expected results:
pmproxy.service starts

Additional info:
After "setenforce 0", pmproxy.service starts and works as expected.

NOTE: This happened a couple of months ago on rhel-8-5 and now we see it on rhel-9-0. I am not sure if it was broken again or if only related changes reached 9-0 only now.
Related reports:
https://bugzilla.redhat.com/show_bug.cgi?id=2000106
https://bugzilla.redhat.com/show_bug.cgi?id=1998491

Comment 1 Zdenek Pytela 2022-01-20 18:35:44 UTC
Can you check if the additional modules are installed?

  # semodule -lfull | grep pcp

Comment 2 Matej Marušák 2022-01-20 18:45:32 UTC
# semodule -lfull | grep pcp
400 pcpupstream-container pp          
100 pcp                   pp

Comment 4 Milos Malik 2022-01-21 14:11:01 UTC
The lockdown class was removed from the SELinux policy. More information available at:
 * https://bugzilla.redhat.com/show_bug.cgi?id=2017848

Comment 5 Milos Malik 2022-01-21 14:14:43 UTC
This issue needs to be fixed in the pcp component or in the pcp upstream.

Comment 6 Martin Pitt 2022-01-21 14:17:43 UTC
Thanks, reassigning to pcp then.

Comment 7 Jan Kurik 2022-01-21 14:29:29 UTC

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

Comment 8 Jan Kurik 2022-01-21 14:32:11 UTC
The issue is already fixed in the latest pcp-5.3.5-5.el9 build. The fixed build should arrive into RHEL-9 compose within few days.