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 1808187 - container_use_cephfs regressed to disabled?
Summary: container_use_cephfs regressed to disabled?
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: container-selinux
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Daniel Walsh
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-28 03:11 UTC by Micah Abbott
Modified: 2020-03-03 20:44 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-03 20:44:47 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1692369 0 unspecified CLOSED SELinux denies containers access to cephfs volume 2023-09-14 05:25:54 UTC

Description Micah Abbott 2020-02-28 03:11:37 UTC
In BZ#1692369 it was requested that the `container_use_cephfs` boolean be enabled by default in the `container-selinux` policy file.

The BZ was verified with version 2.94 (https://bugzilla.redhat.com/show_bug.cgi?id=1692369#c12)

While unwinding some SELinux policy changes being made on RHCOS, it was observed that version 2.124 has the boolean disabled.

```
$ rpm -q container-selinux
container-selinux-2.124.0-1.module+el8.1.1+5259+bcdd613a.noarch
$ getsebool container_use_cephfs
container_use_cephfs --> off
```

Comment 1 Micah Abbott 2020-02-28 03:13:25 UTC
@Jan Will CSI do any modification of the SELinux policy of OCP hosts to enable the use of Ceph?  Or should the boolean be on for RHCOS/OCP nodes?

Comment 2 Daniel Walsh 2020-03-02 14:36:53 UTC
container_use_cephs is not defined in container-selinux.

$ sesearch -A --bool container_use_cephfs
allow container_domain fs_t:dir { add_name create getattr ioctl link lock open read remove_name rename reparent rmdir search setattr unlink write }; [ container_use_cephfs ]:True
allow container_domain fs_t:dir { add_name getattr ioctl lock open read remove_name search write }; [ container_use_cephfs ]:True
allow container_domain fs_t:dir { add_name getattr ioctl lock open read remove_name search write }; [ container_use_cephfs ]:True
allow container_domain fs_t:dir { add_name getattr ioctl lock open read remove_name search write }; [ container_use_cephfs ]:True
allow container_domain fs_t:dir { getattr open search }; [ container_use_cephfs ]:True
allow container_domain fs_t:file { append create getattr ioctl link lock open read rename setattr unlink write }; [ container_use_cephfs ]:True
allow container_domain fs_t:file { execute execute_no_trans getattr ioctl map open read }; [ container_use_cephfs ]:True
allow container_domain fs_t:lnk_file { append create getattr ioctl link lock read rename setattr unlink write }; [ container_use_cephfs ]:True

This looks like we don't have proper labels on cephfs_t?

Comment 3 Zdenek Pytela 2020-03-02 15:15:54 UTC
Dan,

I see container_use_cephfs defined in container-selinux:

## <desc>
##  <p>
##  Determine whether container can
##  use ceph file system
##  </p>
## </desc>
gen_tunable(container_use_cephfs, false)

It was added to Fedora a year ago:

commit bf9e3528d1c7ade2fa01b90a3474ee304308cfe5
Author: Daniel J Walsh <dwalsh>
Date:   Wed Mar 27 06:37:58 2019 -0400

    Add boolean to allow containers to use ceph file systems

and it seems to be present in RHEL 8.1.

What did you mean with "we don't have proper labels on cephfs_t?"

Comment 4 Daniel Walsh 2020-03-02 21:51:50 UTC
I spelled it wrong.  You are right.  

Micah , you think this was enabled by default at one time?

Comment 5 Zdenek Pytela 2020-03-03 07:44:03 UTC
OK, switching the component back to container-selinux.

Comment 6 Micah Abbott 2020-03-03 20:44:47 UTC
@Dan, you are right; the boolean was never enabled by default. 

I misunderstood what was changed in BZ#1692369.  The boolean was *added* to the policy in that BZ, but was off by default.  However, RHCOS introduced a change to turn that boolean on by default.

Closing as NOTABUG.


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