Bug 1701818 - Syntactical errors in hook scripts for managing SELinux context on bricks #2 (S10selinux-label-brick.sh + S10selinux-del-fcontext.sh)
Summary: Syntactical errors in hook scripts for managing SELinux context on bricks #2 ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: scripts
Version: 6
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On: 1542072
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-22 05:29 UTC by Anoop C S
Modified: 2019-05-08 13:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1542072
Environment:
Last Closed: 2019-05-08 13:56:51 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 22594 0 None Merged extras/hooks: syntactical errors in SELinux hooks, scipt logic improved 2019-05-08 13:56:50 UTC

Description Anoop C S 2019-04-22 05:29:11 UTC
+++ This bug was initially created as a clone of Bug #1542072 +++

Description of problem:
* Syntax errors similar as in Bug 1533342 - post/S10selinux-label-brick.sh
* Fix globbing problem when using grep for brick info files in both scripts 

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


How reproducible:
Run scripts from commandline

Steps to Reproduce:
1. /var/lib/glusterd/hooks/1/delete/pre/S10selinux-del-fcontext.sh --volname vol050-vg10

2. /var/lib/glusterd/hooks/1/create/post/S10selinux-label-brick.sh --volname vol050-vg10


Actual results:
1. ValueError: File context for /rhgs/vol050-vg10/brick01/fs(/.*)? is not defined

2. grep: /var/lib/glusterd/vols/vol050-vg10/bricks/*: No such file or directory


Expected results:

#  /var/lib/glusterd/hooks/1/create/post/S10selinux-label-brick.sh --volname vol050-vg10

# semanage fcontext --list | grep rhgs
/rhgs(/.*)?                                        all files          system_u:object_r:glusterd_brick_t:s0 
/rhgs/vol050-vg10/brick01/fs\(/.*\)?               all files          system_u:object_r:glusterd_brick_t:s0 

# /var/lib/glusterd/hooks/1/delete/pre/S10selinux-del-fcontext.sh --volname vol050-vg10

# semanage fcontext --list | grep rhgs
/rhgs(/.*)?                                        all files          system_u:object_r:glusterd_brick_t:s0

--- Additional comment from Worker Ant on 2018-02-05 19:36:36 IST ---

REVIEW: https://review.gluster.org/19502 (Bug 1542072 - syntactical errors in SELinux hooks) posted (#1) for review on master by

--- Additional comment from Worker Ant on 2018-08-23 15:01:40 IST ---

REVIEW: https://review.gluster.org/19502 (extras/hooks: syntactical errors in SELinux hooks, scipt logic improved) posted (#6) for review on master by Anoop C S

--- Additional comment from Worker Ant on 2019-04-18 18:20:29 IST ---

REVIEW: https://review.gluster.org/19502 (extras/hooks: syntactical errors in SELinux hooks, scipt logic improved) merged (#13) on master by Amar Tumballi

Comment 1 Worker Ant 2019-04-22 05:32:11 UTC
REVIEW: https://review.gluster.org/22594 (extras/hooks: syntactical errors in SELinux hooks, scipt logic improved) posted (#1) for review on release-6 by Anoop C S

Comment 2 Worker Ant 2019-05-08 13:56:51 UTC
REVIEW: https://review.gluster.org/22594 (extras/hooks: syntactical errors in SELinux hooks, scipt logic improved) merged (#2) on release-6 by Shyamsundar Ranganathan


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