On 08/29/2012 01:21 PM, Deepak C Shetty wrote:
On 08/28/2012 06:02 PM, krish wrote:
On 08/27/2012 01:42 PM, Deepak C Shetty wrote:
On 08/24/2012 11:56 AM, Krishnan Parthasarathi wrote:
Hi list,
The following wiki page provides detailed information on "Volume
life cycle extensions"
or more fondly referred to as Hooks. Hooks are scripts/executables
that would
be run on the trigger of events like volume-start, volume-stop,
etc. This allows admin
to customise her volume 'deployment' work-flow. Of course it is
not arbitrarily expressive/powerful
yet.
http://www.gluster.org/community/documentation/index.php/Features/Hooks
This (conceptually) is similar to hooks provided by oVirt/VDSM. I
have a naive Q tho'
How to enable/disable a hook for a particular volume ? Is it that
if i don't set any key=value for a particular volume, the hook
won't come into action. In other words hooks will use key=value to
determine what they need to do ?
Scripts whose name begin with 'S' are enabled and anything else
would be disabled
I have updated the wiki with the answer to your question. Thanks for
asking!
(See
http://www.gluster.org/community/documentation/index.php/Features/Hooks#Detailed_Description)
Hmm, still not clear. Let me reword my Q.
Scripts that are enabled are not tied to a particular volume, rite ?
Assuming that, if a script is enabled, then it would run/invoke for
all volumes. How do i control the running of a script at the volume
level ?
Say i need to run a script for all volume except one.. how do i
control that ?
The scripts are tied to events (volume commands like set, start, stop
etc) and __not__ to any volume.
The volume on which the script is 'applied' (or called for) is the
volume on which the glusterd command is
executed. The script is supplied volname as a CLI argument, which it
could use to conditionally execute actions
in the script for the given volume.