Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1450436

Summary: Satellite installation fails on rhel7.4 beta -- Candlepin can't connect to pgsql
Product: Red Hat Satellite Reporter: Peter Ondrejka <pondrejk>
Component: CandlepinAssignee: Kevin Howell <khowell>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.9CC: bbuckingham, bkearney, brubisch, cdonnell, egolov, gkonda, hmore, jbhatia, jcallaha, jswensso, kdixon, ldelouw, lpramuk, mdshaikh, mmccune, mstead, nitthoma, pdwyer, pmoravec, pondrejk, rplevka, sghai, sokeeffe, xdmoon, zhunting
Target Milestone: UnspecifiedKeywords: PrioBumpGSS, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: candlepin-0.9.54.23 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1451020 1451024 1451035 1470724 (view as bug list) Environment:
Last Closed: 2017-08-03 18:27:17 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:
Bug Depends On: 1451024    
Bug Blocks: 1385841, 1451020, 1470724    

Comment 1 Lukas Pramuk 2017-05-15 08:56:49 UTC
I switched to "Permissive" and run installation to produce all AVCs:

#============= tomcat_t ==============
allow tomcat_t amqp_port_t:tcp_socket name_connect;
allow tomcat_t candlepin_etc_certs_rw_t:dir { getattr open read search };
allow tomcat_t candlepin_etc_certs_rw_t:file { getattr open read };
allow tomcat_t candlepin_etc_rw_t:file { getattr open read };

allow tomcat_t postgresql_port_t:tcp_socket name_connect;
allow tomcat_t sysctl_net_t:file { getattr open read };


Tomcat SELinux policy has changed and requires us to add some new rules (rule #1 to #4)

The last two rules should be fixed in RHEL7.4 and not in candlepin-selinux
BZ #1450819

Comment 2 Lukas Pramuk 2017-05-15 09:31:40 UTC
To be precise pasting the AVCs:

avc:  denied  { read } for  pid=13920 comm="java" name="candlepin.conf" dev="dm-0" ino=645937689 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:candlepin_etc_rw_t:s0 tclass=file
avc:  denied  { open } for  pid=13920 comm="java" path="/etc/candlepin/candlepin.conf" dev="dm-0" ino=645937689 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:candlepin_etc_rw_t:s0 tclass=file
avc:  denied  { getattr } for  pid=13920 comm="java" path="/etc/candlepin/candlepin.conf" dev="dm-0" ino=645937689 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:candlepin_etc_rw_t:s0 tclass=file
avc:  denied  { getattr } for  pid=13920 comm="java" path="/etc/candlepin/certs/upstream" dev="dm-0" ino=671090747 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:candlepin_etc_certs_rw_t:s0 tclass=dir
avc:  denied  { read } for  pid=13920 comm="java" name="upstream" dev="dm-0" ino=671090747 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:candlepin_etc_certs_rw_t:s0 tclass=dir
avc:  denied  { open } for  pid=13920 comm="java" path="/etc/candlepin/certs/upstream" dev="dm-0" ino=671090747 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:candlepin_etc_certs_rw_t:s0 tclass=dir
avc:  denied  { read } for  pid=13920 comm="java" name="candlepin-redhat-ca.crt" dev="dm-0" ino=671090748 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:candlepin_etc_certs_rw_t:s0 tclass=file
avc:  denied  { open } for  pid=13920 comm="java" path="/etc/candlepin/certs/upstream/candlepin-redhat-ca.crt" dev="dm-0" ino=671090748 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:candlepin_etc_certs_rw_t:s0 tclass=file
avc:  denied  { getattr } for  pid=13920 comm="java" path="/etc/candlepin/certs/upstream/candlepin-redhat-ca.crt" dev="dm-0" ino=671090748 scontext=system_u:system_r:tomcat_t:s0 tcontext=system_u:object_r:candlepin_etc_certs_rw_t:s0 tclass=file
avc:  denied  { getattr } for  pid=13920 comm="java" path="/etc/candlepin/certs/amqp/candlepin.truststore" dev="dm-0" ino=662704171 scontext=system_u:system_r:tomcat_t:s0 tcontext=unconfined_u:object_r:candlepin_etc_certs_rw_t:s0 tclass=file
avc:  denied  { read } for  pid=13920 comm="java" name="candlepin.truststore" dev="dm-0" ino=662704171 scontext=system_u:system_r:tomcat_t:s0 tcontext=unconfined_u:object_r:candlepin_etc_certs_rw_t:s0 tclass=file
avc:  denied  { open } for  pid=13920 comm="java" path="/etc/candlepin/certs/amqp/candlepin.truststore" dev="dm-0" ino=662704171 scontext=system_u:system_r:tomcat_t:s0 tcontext=unconfined_u:object_r:candlepin_etc_certs_rw_t:s0 tclass=file

Comment 17 Michael Stead 2017-05-29 13:23:55 UTC
Fix available in candlepin-0.9.54.23-1

Comment 25 errata-xmlrpc 2017-08-03 18:27:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2421

Comment 26 Red Hat Bugzilla 2023-09-15 00:02:11 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days