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 1208458 - SELinux denial on sanlock prevents hosted-engine to deploy on iSCSI on rhel 7.1 and centos 7.1
Summary: SELinux denial on sanlock prevents hosted-engine to deploy on iSCSI on rhel 7...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.1
Hardware: x86_64
OS: Linux
urgent
high
Target Milestone: pre-dev-freeze
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
: 1213878 (view as bug list)
Depends On:
Blocks: 1024686 1035038 1036731 1150073 1150087 oVirt_Hosted_Engine_GlusterFS 1178535 1213878 1227466
TreeView+ depends on / blocked
 
Reported: 2015-04-02 10:33 UTC by Simone Tiraboschi
Modified: 2019-04-28 13:18 UTC (History)
17 users (show)

Fixed In Version: selinux-policy-3.13.1-25.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1227466 (view as bug list)
Environment:
Last Closed: 2015-11-19 10:30:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
logs (219.76 KB, application/x-gzip)
2015-04-02 10:34 UTC, Simone Tiraboschi
no flags Details
log rhel 71 (126.10 KB, application/x-gzip)
2015-04-02 12:22 UTC, Simone Tiraboschi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2300 0 normal SHIPPED_LIVE selinux-policy bug fix update 2015-11-19 09:55:26 UTC

Description Simone Tiraboschi 2015-04-02 10:33:24 UTC
Description of problem:
SELinux denial on sanlock prevents hosted-engine to deploy on centos 7.1

hosted-engine setup fails with:
[ INFO  ] Verifying sanlock lockspace initialization
[ ERROR ] Failed to execute stage 'Misc configuration': (19, 'Sanlock lockspace write failure', 'No such device')
[ INFO  ] Stage: Clean up
[ INFO  ] Generating answer file '/var/lib/ovirt-hosted-engine-setup/answers/answers-20150402121956.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination

And I found:
[root@c7t1 ~]# ausearch -m avc
----
time->Thu Apr  2 12:19:51 2015
type=SYSCALL msg=audit(1427969991.216:1177): arch=c000003e syscall=2 success=no exit=-13 a0=7f48942c2410 a1=105002 a2=0 a3=1 items=0 ppid=1 pid=792 auid=4294967295 uid=179 gid=179 euid=179 suid=179 fsuid=179 egid=179 sgid=179 fsgid=179 tty=(none) ses=4294967295 comm="sanlock" exe="/usr/sbin/sanlock" subj=system_u:system_r:sanlock_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1427969991.216:1177): avc:  denied  { read } for  pid=792 comm="sanlock" name="37cb6430-1a68-40b4-857b-25bfcca6cec5" dev="tmpfs" ino=46631 scontext=system_u:system_r:sanlock_t:s0-s0:c0.c1023 tcontext=system_u:object_r:virt_var_run_t:s0 tclass=lnk_file


Version-Release number of selected component (if applicable):
CentOS Linux release 7.1.1503 (Core)
libvirt-lock-sanlock.x86_64       1.2.8-16.el7_1.2                     @updates 
sanlock.x86_64                    3.2.2-2.el7                          @base 
selinux-policy.noarch             3.13.1-23.el7                        @anaconda
selinux-policy-targeted.noarch    3.13.1-23.el7                        @anaconda


How reproducible:
100%

Steps to Reproduce:
1. deploy hosted-engine over iSCSI
2.
3.

Actual results:
it fails with:
[ ERROR ] Failed to execute stage 'Misc configuration': (19, 'Sanlock lockspace write failure', 'No such device')
cause I got an SELinux denial on sanlock
type=AVC msg=audit(1427969991.216:1177): avc:  denied  { read } for  pid=792 comm="sanlock" name="37cb6430-1a68-40b4-857b-25bfcca6cec5" dev="tmpfs" ino=46631 scontext=system_u:system_r:sanlock_t:s0-s0:c0.c1023 tcontext=system_u:object_r:virt_var_run_t:s0 tclass=lnk_file

Expected results:
it works

Additional info:

Comment 1 Simone Tiraboschi 2015-04-02 10:34:35 UTC
Created attachment 1010099 [details]
logs

Comment 2 Simone Tiraboschi 2015-04-02 12:13:36 UTC
It happens also on RHEL 7.1 with 
selinux-policy.noarch                 3.13.1-23.el7             @anaconda/7.1   
selinux-policy-targeted.noarch        3.13.1-23.el7             @anaconda/7.1 

[root@rhel71t1 ~]# ausearch -m avc
----
time->Thu Apr  2 14:08:53 2015
type=SYSCALL msg=audit(1427976533.526:1222): arch=c000003e syscall=2 success=no exit=-13 a0=7effb2a71410 a1=105002 a2=0 a3=1 items=0 ppid=1 pid=13309 auid=4294967295 uid=179 gid=179 euid=179 suid=179 fsuid=179 egid=179 sgid=179 fsgid=179 tty=(none) ses=4294967295 comm="sanlock" exe="/usr/sbin/sanlock" subj=system_u:system_r:sanlock_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1427976533.526:1222): avc:  denied  { read } for  pid=13309 comm="sanlock" name="b8cd0cbb-5954-4cff-96c6-7229933d8ca4" dev="tmpfs" ino=61643 scontext=system_u:system_r:sanlock_t:s0-s0:c0.c1023 tcontext=system_u:object_r:virt_var_run_t:s0 tclass=lnk_file

Comment 3 Simone Tiraboschi 2015-04-02 12:22:08 UTC
Created attachment 1010133 [details]
log rhel 71

Comment 5 Milos Malik 2015-04-02 13:29:13 UTC
# sesearch -s sanlock_t -t virt_var_run_t -A -C
Found 2 semantic av rules:
   allow sanlock_t virt_var_run_t : file { ioctl read getattr lock open } ; 
   allow sanlock_t virt_var_run_t : dir { getattr search open } ; 

#

Current selinux-policy does not contain an allow rule for symbolic link.

Comment 6 Allon Mureinik 2015-04-26 12:11:35 UTC
Simone, IIUC, this is a regression, isn't it?

Comment 7 Artyom 2015-04-26 14:23:37 UTC
*** Bug 1213878 has been marked as a duplicate of this bug. ***

Comment 8 Simone Tiraboschi 2015-04-27 13:31:45 UTC
(In reply to Allon Mureinik from comment #6)
> Simone, IIUC, this is a regression, isn't it?

Yes, it is.
Not sure on which product.

Comment 15 errata-xmlrpc 2015-11-19 10:30:12 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://rhn.redhat.com/errata/RHBA-2015-2300.html


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