Bug 1718227

Summary: SELinux context labels are missing for newly added bricks using add-brick command
Product: [Community] GlusterFS Reporter: Anoop C S <anoopcs>
Component: scriptsAssignee: Anoop C S <anoopcs>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: atumball, bugs, pasik
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1717953 Environment:
Last Closed: 2019-07-16 05:03:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1717953    
Bug Blocks: 1686800    

Description Anoop C S 2019-06-07 10:34:53 UTC
+++ This bug was initially created as a clone of Bug #1717953 +++

Description of problem:
When we add new bricks to an existing volume using add-brick command "glusterd_brick_t" SELinux context label is not assigned on those new brick paths.

Version-Release number of selected component (if applicable):
master

How reproducible:
Always

Steps to Reproduce:
1. Create and start a basic distribute-replicate volume
2. Verify that brick paths have "glusted_brick_t" SELinux labels by running `ls -lZ <brick-path>`
3. Add new bricks to the existing volume
4. Check SELinux labels on newly added brick paths

Actual results:
"glusterd_brick_t" SELinux label is missing on newly added bricks

Expected results:
Following SELinux label is expected:
system_u:object_r:glusterd_brick_t:s0

--- Additional comment from Worker Ant on 2019-06-06 19:46:18 IST ---

REVIEW: https://review.gluster.org/22834 (extras/hooks: Add SELinux label on new bricks during add-brick) posted (#1) for review on master by Anoop C S

Comment 1 Worker Ant 2019-06-21 04:28:10 UTC
REVIEW: https://review.gluster.org/22913 (extras/hooks: Add SELinux label on new bricks during add-brick) posted (#1) for review on release-6 by Anoop C S

Comment 2 Worker Ant 2019-07-04 05:52:38 UTC
REVIEW: https://review.gluster.org/22913 (extras/hooks: Add SELinux label on new bricks during add-brick) merged (#4) on release-6 by hari gowtham

Comment 3 Anoop C S 2019-07-04 06:22:13 UTC
Re-opening as previous patch failed to install and package new hook script.

Comment 4 Worker Ant 2019-07-04 06:27:33 UTC
REVIEW: https://review.gluster.org/22991 (extras/hooks: Install and package newly added post add-brick hook script) posted (#1) for review on release-6 by Anoop C S

Comment 5 Worker Ant 2019-07-16 05:03:22 UTC
REVIEW: https://review.gluster.org/22991 (extras/hooks: Install and package newly added post add-brick hook script) merged (#3) on release-6 by hari gowtham