SVR_FAIL_ACTION

SVR_FAIL_ACTION is used when an Adaptive Server does not respond in a timely manner, or when the Adaptive Server host cannot be pinged by either OpenSwitch server in a cluster.

SVR_FAIL_ACTION can be used if a CM is connected to the OpenSwitch.

For example, you have two OpenSwitch servers, OSW1 and OSW2. OSW1 detects a failure first, but if it does not have a CM connection, OSW1 cannot handle the failure. If OSW2 has a CM connection, it handles the failure. If OSW1 is a primary server, and OSW2 is a secondary server, and both detect the failure, OSW2 handles the failure only if it has a CM and OSW1 does not.

With OpenSwitch 15.1 and later, if you are using a CM or RCM, you can set SVR_FAIL_ACTION to CUSTOM, MANUAL, CUSTOM_MANUAL, or DEFAULT.

With OpenSwitch 15.0 and earlier, you cannot run custom or manual scripts for a server failure because the failover procedures for CMs and RCMs differ from each other, and may contradict the actions invoked by a custom or manual script.

When you specify DEFAULT for SVR_FAIL_ACTION, OpenSwitch checks whether any CMs or RCMs are connected. When there are CM or RCM connections, and:

When there are no CM or RCM connections, OpenSwitch:

  1. Marks the failed primary Adaptive Server as locked.

  2. Stops all clients on the failed Adaptive Server.

  3. Marks the primary Adaptive Server as DOWN.

  4. Marks the secondary Adaptive Server as UP.

  5. Switches clients from the primary Adaptive Server to the secondary Adaptive Server.

  6. Restarts all clients.

  7. Directs all new connections to the secondary Adaptive Server.

Actions and reason codes

Use:

See “User-specified actions” for additional details about these actions.

Exit codes for custom scripts

Valid exit codes are:

Exit codes for manual scripts

Valid exit codes are: