Bug 1402248 - Gluster Brick Creation fails while running restorecon on the brick mount point
Summary: Gluster Brick Creation fails while running restorecon on the brick mount point
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Gluster
Version: 4.18.18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: ovirt-4.0.6
: 4.18.20
Assignee: Ramesh N
QA Contact: SATHEESARAN
URL:
Whiteboard:
Depends On:
Blocks: Gluster-HC-2
TreeView+ depends on / blocked
 
Reported: 2016-12-07 06:43 UTC by Ramesh N
Modified: 2017-01-18 07:25 UTC (History)
1 user (show)

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


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 67912 master MERGED gluster: encode mount point to utf-8 string 2016-12-08 10:59:07 UTC
oVirt gerrit 67989 ovirt-4.0 MERGED gluster: encode mount point to utf-8 string 2016-12-09 11:33:10 UTC
Red Hat Bugzilla 1368474 None None None Never

Internal Links: 1368474

Description Ramesh N 2016-12-07 06:43:52 UTC
Description of problem:


 Gluster brick creation fails while running restorecon on the brick mount point


How reproducible:

Always.

Steps to Reproduce:
1. Go to 'Storage Devices' tab under Hosts
2. Create brick by selecting a storage device.
3. Brick Creation fails.

Actual results:

 Brick Creation fails while running restorecon on the brick mount point

Expected results:

Brick creation should succeed with proper selinux context set on the brick mount point.

Additional info:

This is a side effect of bz#1368474. String values encoded as unicode strings in jsonrpc, but selinux python bindings expects a char * as input. mount point should be converted to utf-8 while passing to restorecon.

Comment 1 SATHEESARAN 2016-12-20 11:02:42 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.

Looks like the fix is not available with this build. I am waiting for inputs from Ramesh on BZ 1368474 - which also doesn't have the fix in this build

Comment 2 SATHEESARAN 2016-12-26 10:03:21 UTC
Tested with vdsm-4.18.21-1.el7.centos.x86_64 with oVirt-4.0.6

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

[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.