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 1715805 - mysql/mariadb fails to start in pacemaker cluster
Summary: mysql/mariadb fails to start in pacemaker cluster
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.7
Hardware: Unspecified
OS: Linux
medium
low
Target Milestone: rc
: 7.8
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-31 10:43 UTC by Patrik Hagara
Modified: 2020-03-31 19:11 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.13.1-253.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1687867
Environment:
Last Closed: 2020-03-31 19:10:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1007 0 None None None 2020-03-31 19:11:18 UTC

Description Patrik Hagara 2019-05-31 10:43:14 UTC
Description of problem:

the mysql cluster resource agent is unable to start with selinux in enforcing mode.

selinux logs with permissive mode:

time->Thu May 30 16:28:02 2019
type=PROCTITLE msg=audit(1559226482.257:436): proctitle=2F7573722F6C6962657865632F6D7973716C64002D2D64656661756C74732D66696C653D2F6574632F6D792E636E66002D2D626173656469723D2F757372002D2D646174616469723D2F7661722F6C69622F6D7973716C002D2D706C7567696E2D6469723D2F7573722F6C696236342F6D7973716C2F706C7567696E002D2D75
type=SYSCALL msg=audit(1559226482.257:436): arch=c000003e syscall=2 success=yes exit=16 a0=563a6e02f620 a1=241 a2=1b4 a3=8 items=0 ppid=7355 pid=7564 auid=4294967295 uid=27 gid=27 euid=27 suid=27 fsuid=27 egid=27 sgid=27 fsgid=27 tty=(none) ses=4294967295 comm="mysqld" exe="/usr/libexec/mysqld" subj=system_u:system_r:mysqld_t:s0 key=(null)
type=AVC msg=audit(1559226482.257:436): avc:  denied  { write } for  pid=7564 comm="mysqld" path="/run/mysql/mysqld.pid" dev="tmpfs" ino=96210 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=file permissive=1
type=AVC msg=audit(1559226482.257:436): avc:  denied  { create } for  pid=7564 comm="mysqld" name="mysqld.pid" scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=file permissive=1
type=AVC msg=audit(1559226482.257:436): avc:  denied  { add_name } for  pid=7564 comm="mysqld" name="mysqld.pid" scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1559226482.257:436): avc:  denied  { write } for  pid=7564 comm="mysqld" name="mysql" dev="tmpfs" ino=95774 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir permissive=1
----
time->Thu May 30 16:28:31 2019
type=PROCTITLE msg=audit(1559226511.449:539): proctitle=2F7573722F6C6962657865632F6D7973716C64002D2D64656661756C74732D66696C653D2F6574632F6D792E636E66002D2D626173656469723D2F757372002D2D646174616469723D2F7661722F6C69622F6D7973716C002D2D706C7567696E2D6469723D2F7573722F6C696236342F6D7973716C2F706C7567696E002D2D75
type=SYSCALL msg=audit(1559226511.449:539): arch=c000003e syscall=87 success=yes exit=0 a0=563a6e02f620 a1=0 a2=563a6e02f620 a3=563a6edffd1c items=0 ppid=7355 pid=7564 auid=4294967295 uid=27 gid=27 euid=27 suid=27 fsuid=27 egid=27 sgid=27 fsgid=27 tty=(none) ses=4294967295 comm="mysqld" exe="/usr/libexec/mysqld" subj=system_u:system_r:mysqld_t:s0 key=(null)
type=AVC msg=audit(1559226511.449:539): avc:  denied  { unlink } for  pid=7564 comm="mysqld" name="mysqld.pid" dev="tmpfs" ino=96210 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=file permissive=1
type=AVC msg=audit(1559226511.449:539): avc:  denied  { remove_name } for  pid=7564 comm="mysqld" name="mysqld.pid" dev="tmpfs" ino=96210 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1559226511.449:539): avc:  denied  { write } for  pid=7564 comm="mysqld" name="mysql" dev="tmpfs" ino=95774 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir permissive=1
----
time->Thu May 30 16:28:42 2019
type=PROCTITLE msg=audit(1559226522.262:577): proctitle=2F7573722F6C6962657865632F6D7973716C64002D2D64656661756C74732D66696C653D2F6574632F6D792E636E66002D2D626173656469723D2F757372002D2D646174616469723D2F7661722F6C69622F6D7973716C002D2D706C7567696E2D6469723D2F7573722F6C696236342F6D7973716C2F706C7567696E002D2D75
type=SYSCALL msg=audit(1559226522.262:577): arch=c000003e syscall=2 success=yes exit=16 a0=562856ddc620 a1=241 a2=1b4 a3=8 items=0 ppid=8539 pid=8755 auid=4294967295 uid=27 gid=27 euid=27 suid=27 fsuid=27 egid=27 sgid=27 fsgid=27 tty=(none) ses=4294967295 comm="mysqld" exe="/usr/libexec/mysqld" subj=system_u:system_r:mysqld_t:s0 key=(null)
type=AVC msg=audit(1559226522.262:577): avc:  denied  { write } for  pid=8755 comm="mysqld" path="/run/mysql/mysqld.pid" dev="tmpfs" ino=105767 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=file permissive=1
type=AVC msg=audit(1559226522.262:577): avc:  denied  { create } for  pid=8755 comm="mysqld" name="mysqld.pid" scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=file permissive=1
type=AVC msg=audit(1559226522.262:577): avc:  denied  { add_name } for  pid=8755 comm="mysqld" name="mysqld.pid" scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1559226522.262:577): avc:  denied  { write } for  pid=8755 comm="mysqld" name="mysql" dev="tmpfs" ino=95774 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir permissive=1
----
time->Thu May 30 16:29:16 2019
type=PROCTITLE msg=audit(1559226556.443:694): proctitle=2F7573722F6C6962657865632F6D7973716C64002D2D64656661756C74732D66696C653D2F6574632F6D792E636E66002D2D626173656469723D2F757372002D2D646174616469723D2F7661722F6C69622F6D7973716C002D2D706C7567696E2D6469723D2F7573722F6C696236342F6D7973716C2F706C7567696E002D2D75
type=SYSCALL msg=audit(1559226556.443:694): arch=c000003e syscall=87 success=yes exit=0 a0=562856ddc620 a1=0 a2=562856ddc620 a3=562858bfbd1c items=0 ppid=8539 pid=8755 auid=4294967295 uid=27 gid=27 euid=27 suid=27 fsuid=27 egid=27 sgid=27 fsgid=27 tty=(none) ses=4294967295 comm="mysqld" exe="/usr/libexec/mysqld" subj=system_u:system_r:mysqld_t:s0 key=(null)
type=AVC msg=audit(1559226556.443:694): avc:  denied  { unlink } for  pid=8755 comm="mysqld" name="mysqld.pid" dev="tmpfs" ino=105767 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=file permissive=1
type=AVC msg=audit(1559226556.443:694): avc:  denied  { remove_name } for  pid=8755 comm="mysqld" name="mysqld.pid" dev="tmpfs" ino=105767 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir permissive=1
type=AVC msg=audit(1559226556.443:694): avc:  denied  { write } for  pid=8755 comm="mysqld" name="mysql" dev="tmpfs" ino=95774 scontext=system_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:cluster_var_run_t:s0 tclass=dir permissive=1

see https://bugzilla.redhat.com/show_bug.cgi?id=1687867 for details on how this was fixed for RHEL-8

Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-249.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. configure and start a pacemaker cluster
2. create a cluster resource using ocf:heartbeat:mysql resource agent
3.

Actual results:
mysql resource is unable to start due to selinux AVC denials

Expected results:
no AVCs, resource starts successfully and works

Additional info:

Comment 5 Milos Malik 2019-08-15 08:57:59 UTC
Can you run the scenario on RHEL-7.7 after enabling the daemons_enable_cluster_mode boolean? It should work IMO.

# setsebool -P daemons_enable_cluster_mode on

Comment 6 Patrik Hagara 2019-08-15 15:43:59 UTC
Yes, it does work.

testrun with daemons_enable_cluster_mode off (fail): https://beaker.cluster-qe.lab.eng.brq.redhat.com/bkr/jobs/99331
testrun with daemons_enable_cluster_mode on (pass): https://beaker.cluster-qe.lab.eng.brq.redhat.com/bkr/jobs/99332

Comment 9 errata-xmlrpc 2020-03-31 19:10:50 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-2020:1007


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