(Click to open topic with navigation)
Three methods exist for attaching a trigger to an object:
<attr>=<val> pair delimiters, quotation marks, and other elements of the syntax may differ slightly from one method/object combination to another, but creating any trigger follows the same basic format:
<attr>=<val>[[{&,}<attr>=<val>]...]
The beginning of the trigger is set off by the keyword trigger. It is followed by a delimited list (typically by commas) of <attr>=<val> pairs.
Each method of trigger creation can only be used for certain Moab objects. The following table displays which objects can receive triggers via each method. The links contain examples.
Method | Objects |
---|---|
Command line | job, reservation; a trigger can be attached to any existing object using mschedctl -c |
Configuration file | node, reservation, RM, scheduler |
Template | job, reservation |
Triggers are composed of attributes. Only three are required for each trigger: an EType (event type), an AType (action type), and an Action.
Image 17-2: Required trigger attributes |
Click to enlarge |
Other attributes exist to further customize triggers. See Trigger components for more information.
To create a Moab trigger
Choose an object to which, and a method by which, you will attach the trigger. Use the format and examples described in its corresponding documentation:
If the trigger is to be attached to a job, you must first enable job triggers (see Enabling job triggers for more information.). Please carefully review the warning before doing so.
Each object has a different lifecycle, so not every event type will occur on every object. For a list of valid ETypes for your selected object, see the corresponding object reference page linked in step 1.
NODECFG[node01] TRIGGER=EType=fail,AType=exec,Action="node.fail.sh node01"