Bug 1402248

Summary: Gluster Brick Creation fails while running restorecon on the brick mount point
Product: [oVirt] vdsm Reporter: Ramesh N <rnachimu>
Component: GlusterAssignee: Ramesh N <rnachimu>
Status: CLOSED CURRENTRELEASE QA Contact: SATHEESARAN <sasundar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.18.18CC: bugs
Target Milestone: ovirt-4.0.6Flags: rule-engine: ovirt-4.0.z?
sasundar: planning_ack?
rule-engine: devel_ack+
sasundar: testing_ack+
Target Release: 4.18.20   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-18 07:25:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Gluster RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1277939    

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