Bug 806996 - [FEAT] Provide pre/post glusterd operation hooks for certain commands
Summary: [FEAT] Provide pre/post glusterd operation hooks for certain commands
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: krishnan parthasarathi
QA Contact: amainkar
URL:
Whiteboard:
Depends On:
Blocks: 817967
TreeView+ depends on / blocked
 
Reported: 2012-03-26 17:51 UTC by krishnan parthasarathi
Modified: 2015-11-03 23:04 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 17:17:47 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions: 3.3.0.qa45
Embargoed:


Attachments (Terms of Use)

Description krishnan parthasarathi 2012-03-26 17:51:19 UTC
Description of problem:
Currently glusterd doesn't have a mechanism by which users can perform 'administrative tasks' before and after the successful completion of a gluster command.
The interface planned would be similar to init scripts, where there would be a collection of scripts present under a 'special' directory that would be executed on an 'event'.

Directories to hold the scripts mentioned above would be created for each gluster command under glusterd's 'working dir' as follows:
(eg.)
<glusterd-working-dir>/create/pre

<glusterd-working-dir>/create/post

The scripts beginning with 'S' under the above directories would be run before (pre) and after (post) the volume created. The scripts would receive a command line argument as below:
--volname=<volname>

This can be optionally used  by the script.

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


How reproducible:
N/A

Steps to Reproduce:
1.
2.
3.
  
Actual results:
N/A

Expected results:
N/A

Additional info:

Comment 1 Anand Avati 2012-03-31 12:15:14 UTC
CHANGE: http://review.gluster.com/3010 (glusterd: Added init scripts like interface for gluster commands) merged in master by Vijay Bellur (vijay)

Comment 2 Anand Avati 2012-04-09 16:23:25 UTC
CHANGE: http://review.gluster.com/3111 (glusterd: Modified algo for creating hooks directories.) merged in master by Vijay Bellur (vijay)

Comment 3 Anand Avati 2012-04-19 07:12:43 UTC
CHANGE: http://review.gluster.com/3086 (extras: Added (hook) scripts to start/stop samba on volume start and stop) merged in master by Vijay Bellur (vijay)

Comment 4 Anand Avati 2012-04-19 07:36:33 UTC
CHANGE: http://review.gluster.com/3142 (glusterd: Moved 'hooks' interface code to glusterd-hooks.*) merged in master by Vijay Bellur (vijay)

Comment 5 Anand Avati 2012-04-20 12:56:04 UTC
CHANGE: http://review.gluster.com/3193 (glusterd: Enable hooks for volume set.) merged in master by Vijay Bellur (vijay)

Comment 6 Anand Avati 2012-04-23 12:31:10 UTC
CHANGE: http://review.gluster.com/3211 (glusterfs.spec: Added hook-scripts in server rpm) merged in master by Vijay Bellur (vijay)

Comment 7 Anand Avati 2012-05-03 05:56:45 UTC
CHANGE: http://review.gluster.com/3188 (extras: Added hook script to help in CTDB setup) merged in master by Vijay Bellur (vijay)

Comment 8 Anand Avati 2012-05-04 04:26:14 UTC
CHANGE: http://review.gluster.com/3260 (glusterd: Added glusterd command specific optional args for hooks scripts.) merged in master by Vijay Bellur (vijay)

Comment 9 Anand Avati 2012-05-04 06:49:20 UTC
CHANGE: http://review.gluster.com/3271 (extras/hook-scripts: Fixed EXTRA_DIST to explicitly list *.sh files) merged in master by Vijay Bellur (vijay)

Comment 10 Rachana Patel 2012-06-08 10:40:33 UTC
Scripts are there and working as per the expectation.

Not always reproducible but in many case 'S29CTDBsetup.sh' fail to mount replicated volume on 'Gluster/lock', because of that changing status to 'On-dev'


(let me know, If I have to close this defect and log a new for the same as other scripts are working fine)

Comment 11 Amar Tumballi 2012-06-08 12:07:28 UTC
Hi Rachana,

I think you can verify this bug and open another bug. That was we can track the issues specifically.

-Amar

Comment 12 Rachana Patel 2012-06-11 09:40:39 UTC
Scripts are there and working as per the expectation.

Comment 13 Anand Avati 2013-04-24 10:24:36 UTC
REVIEW: http://review.gluster.org/3471 (extras: Restructuring hook-scripts directory) posted (#3) for review on master by Krutika Dhananjay (kdhananj)

Comment 14 Anand Avati 2013-04-24 10:25:14 UTC
REVIEW: http://review.gluster.org/4882 (extras: Move ufo hook-script under the appropriate directory) posted (#1) for review on master by Krutika Dhananjay (kdhananj)

Comment 15 Anand Avati 2013-04-24 12:17:41 UTC
REVIEW: http://review.gluster.org/3471 (extras: Restructuring hook-scripts directory) posted (#4) for review on master by Krutika Dhananjay (kdhananj)

Comment 16 Anand Avati 2013-04-24 15:22:43 UTC
REVIEW: http://review.gluster.org/4882 (extras: Move ufo hook-script under the appropriate directory) posted (#2) for review on master by Krutika Dhananjay (kdhananj)

Comment 17 Anand Avati 2013-04-24 15:23:02 UTC
REVIEW: http://review.gluster.org/3471 (extras: Restructuring hook-scripts directory) posted (#5) for review on master by Krutika Dhananjay (kdhananj)

Comment 18 Anand Avati 2013-05-07 07:42:58 UTC
REVIEW: http://review.gluster.org/4882 (extras: Move ufo hook-script under the appropriate directory) posted (#3) for review on master by Krutika Dhananjay (kdhananj)

Comment 19 Anand Avati 2013-05-07 07:44:18 UTC
REVIEW: http://review.gluster.org/3471 (extras: Restructuring hook-scripts directory) posted (#6) for review on master by Krutika Dhananjay (kdhananj)

Comment 20 Anand Avati 2013-05-08 15:58:58 UTC
REVIEW: http://review.gluster.org/4882 (extras: Move ufo hook-script under the appropriate directory) posted (#4) for review on master by Krutika Dhananjay (kdhananj)

Comment 21 Anand Avati 2013-05-08 15:59:19 UTC
REVIEW: http://review.gluster.org/3471 (extras: Restructuring hook-scripts directory) posted (#7) for review on master by Krutika Dhananjay (kdhananj)


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