A Generic Application resource is created by specifying the appropriate restore, remove, quickCheck and recover scripts. Refer to the actual scripts for more information.
Examples of command line related file names and paths are described in the following explanation. Refer to the actual scripts for more details.
Bringing a Resource In Service (restore)
The following steps are performed by the restore script to start the Load Balancer Health Check resource.
- The tag name and resource ID of the Load Balancer Health Check resource are obtained from the -t and -i command line options, respectively.
- The port number and reply message are obtained from the info field for the Load Balancer Health Check resource. If the resource information cannot be obtained, the restore script exits with exit code 1.
- The restore script uses the given resource ID to determine whether the associated daemon process has already been started. If it has already been started, the restore script will exit with exit code 1.
- The restore script generates the Socket object and waits for the connection from the Load Balancer. When no connection occurs within $HC_TIMEOUT sec (described in Script Parameter List), the restore script exits with exit code 1.
- The health probe listening process described in step 4 runs as a daemon in the background. When no connection occurs for $HC_TIMEOUT sec (described in Script Parameter List), the $id-hc-ng flag is created. When the next connection attempt is detected, the flag will be deleted and the timeout will be reset. Note: The $id-hc-ng flag is used for failure detection by quickCheck.
- The restore parent process exits with exit code 0.
Taking a Resource Out of Service (remove)
The following steps are performed by the remove script to stop the Load Balancer Health Check resource.
- The tag name and resource ID of the Load Balancer Health Check resource are obtained from the -t and -i command line options, respectively.
- The PID of the running Load Balancer Health Check daemon process corresponding to the given resource ID is obtained.
- The remove script verifies that the daemon process with the PID found in step 2 is still running. If it is already stopped, the remove script exits with exit code 0.
- If the daemon process is still running, the remove script terminates it with a TERM signal.
- The remove script exits with exit code 0.
Monitoring (quickCheck)
The following steps are performed by the quickCheck script to monitor the Load Balancer Health Check resource.
- The tag name and resource ID of the Load Balancer Health Check resource are obtained from the -t and -i command line options, respectively.
- The resource status of the Load Balancer Health Check resource is obtained. When the status is not ISP (i.e., the resource has already been taken out of service), the quickCheck script exits with exit code 0.
- The quickCheck script checks for the existence of the $id-hc-ng flag, which is generated by step 5 of the restore process if no connection attempt has been received within the past $HC_TIMEOUT seconds. If the flag exists, the quickCheck script exits with exit code 1.
- Terminating the process with exit code 0.
Execution Time of the Scripts
restore
The process will timeout if there is no connection for $HC_TIMEOUT sec from Load Balancer when executing the restore. The absence of connection requests from a load balancer on the specified port for an extended period of time generally indicates a configuration error or a network issue that may be preventing the load balancer from communicating with the server.
remove, quickCheck
No time required for the scripts.
このトピックへフィードバック