| Linux FailSafe™ Programmer's Guide | ||
|---|---|---|
| Prev | Chapter 2. Writing the Action Scripts and Adding Monitoring Agents | Next |
| Caution |
Multiple instances of scripts may be executed at the same time. For more information, see Section 2.2. |
The following set of action scripts can be provided for each resource:
exclusive, which verifies that the resource is not already running
start, which starts the resource
stop, which stops the resource
monitor, which monitors the resource
restart, which restarts the resource on the same node when a monitoring failure occurs
The start, stop, and exclusive scripts are required for every resource type.
Note: The start and stop scripts must be idempotent; that is, an action requested multiple times successively should continue to return success, and should have no side-effects. For example, if the start script is run for a resource that is already started, the script must not return an error.
A monitor script is required, but if you wish it may contain only a return-success function. A restart script is required if the application must have a restart ability on the same node in case of failure. However, the restart script may contain only a return-success function.