Bug 1368474 - Creation of gluster bricks should also set the proper selinux labels on them
Summary: Creation of gluster bricks should also set the proper selinux labels on them
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Version: 4.0.2.7
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ovirt-4.0.6
: 4.0.6
Assignee: Ramesh N
QA Contact: SATHEESARAN
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-19 13:48 UTC by SATHEESARAN
Modified: 2017-01-18 07:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-18 07:26:02 UTC
oVirt Team: Gluster
Embargoed:
sabose: ovirt-4.0.z?
sasundar: planning_ack?
rule-engine: devel_ack+
sasundar: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1402248 0 unspecified CLOSED Gluster Brick Creation fails while running restorecon on the brick mount point 2021-02-22 00:41:40 UTC
oVirt gerrit 62773 0 master MERGED gluster: set selinux labels while creating bricks 2016-09-22 13:03:27 UTC
oVirt gerrit 62841 0 master NEW gluster: handle new exceptions in create brick 2016-09-23 13:13:30 UTC
oVirt gerrit 64296 0 ovirt-4.0 MERGED gluster: set selinux labels while creating bricks 2016-10-10 13:43:57 UTC
oVirt gerrit 64490 0 ovirt-engine-4.0 MERGED gluster: handle new exceptions in create brick 2016-11-17 11:56:14 UTC
oVirt gerrit 66991 0 ovirt-engine-4.0.6 MERGED gluster: handle new exceptions in create brick 2016-11-17 12:48:37 UTC

Internal Links: 1402248

Description SATHEESARAN 2016-08-19 13:48:13 UTC
Description of problem:
-----------------------
Currently brick creation on RHGS/Gluster node works good and bricks are getting created properly, but the selinux labels are not set on them properly

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
RHV 4.0.2-7

How reproducible:
-----------------
Always

Steps to Reproduce:
-------------------
1. Add a RHGS/Gluster node to the cluster type 'Gluster'
2. Create bricks for that node from UI with the additional disks available

Actual results:
---------------
Bricks are getting created but selinux labels not set on them

Expected results:
-----------------
Bricks should be set with selinux label

Additional info:
----------------
[root@ ~]# ls -lZd /rhgs/brick1
drwxr-xr-x. root root system_u:object_r:unlabeled_t:s0 /rhgs/brick1

Currently the selinux labels are set on the brick manually,
[root@ ~]# semanage fcontext -a -t glusterd_brick_t /rhgs/brick1

[root@ ~]# restorecon -Rv /rhgs/brick1
restorecon reset /rhgs/brick1 context system_u:object_r:unlabeled_t:s0->system_u:object_r:glusterd_brick_t:s0

[root@ ~]# ls -lZd /rhgs/brick1
drwxr-xr-x. root root system_u:object_r:glusterd_brick_t:s0 /rhgs/brick1

Comment 1 SATHEESARAN 2016-12-20 11:00:48 UTC
Tested with RHV-4.0.6 ( version 4.0.6.3-0.1.el7ev ) and I am not seeing the bricks with selinux context.

Ramesh, is the fix available with this build ( RHV-4.0.6-8 ) ?

Comment 2 Ramesh N 2016-12-20 11:41:41 UTC
(In reply to SATHEESARAN from comment #1)
> Tested with RHV-4.0.6 ( version 4.0.6.3-0.1.el7ev ) and I am not seeing the
> bricks with selinux context.
> 
> Ramesh, is the fix available with this build ( RHV-4.0.6-8 ) ?

Can you check the vdsm version?. It is fixed in vdsm-4.18.20

Comment 3 SATHEESARAN 2016-12-20 17:34:27 UTC
(In reply to Ramesh N from comment #2)
> (In reply to SATHEESARAN from comment #1)
> > Tested with RHV-4.0.6 ( version 4.0.6.3-0.1.el7ev ) and I am not seeing the
> > bricks with selinux context.
> > 
> > Ramesh, is the fix available with this build ( RHV-4.0.6-8 ) ?
> 
> Can you check the vdsm version?. It is fixed in vdsm-4.18.20

Ramesh,

Thanks for that information, I was testing it with vdsm-4.17.33-1 as available in RHGS 3.2.0

I can check the same with the latest vdsm

Comment 4 SATHEESARAN 2016-12-26 09:59:59 UTC
Tested with vdsm-4.18.21-1.el7.centos.x86_64.

Creation of bricks from UI sets the proper selinux label on the bricks

[root@ ~]# ls -lZd /rhgs/brick1
drwxr-xr-x. root root system_u:object_r:glusterd_brick_t:s0 /rhgs/brick1


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