| Linux FailSafe™ Programmer's Guide | ||
|---|---|---|
| Prev | Chapter 2. Writing the Action Scripts and Adding Monitoring Agents | Next |
| Caution |
Multiple copies of actions scripts can execute at the same time. Therefore, all temporary file names must be unique within the storage space used. Often adding a script.$$ to the name is sufficient. If multiple nodes share a temporary directory, you will also want to incorporate host identifier to ensure uniqueness. Another method is to use the resource name because it must be unique to the cluster. |
For each script, you must do the following:
Get the required variables
Check the variables
Perform the action
Check the action
Note: The start and stop scripts are required to be idempotent; that is, they have the appearance of being run once but can in fact be run multiple times. For example, if the start script is run for a resource that is already started, the script must not return an error.
All action scripts must return the status to the /var/log/failsafe/script_nodename file.