At RMS startup, the Check script is executed regardless of the setting of the AutoStartUp attribute.
In addition, during a state transition, the Stop and Start scripts are called.
In each script, you need to determine whether to perform the Online processing or Offline processing after referring to HV_LAST_DET_REPORT and HV_INTENDED_STATE.
The values of HV_LAST_DET_REPORT and HV_INTENDED_STATE set for each script during its execution are as follows.
State transition | Script for execution | Value of environment variable | |||
---|---|---|---|---|---|
Classification | State of the Cmdline resource | HV_LAST_DET_REPORT | HV_INTENDED_STATE | ||
At RMS startup | Operational system | Offline->Online | Start script | Offline | Online |
Standby system | Offline->Offline | - | - | - | |
At RMS stop | Operational system | Online->Offline | Stop script | Online | Offline |
Standby system | Offline->Offline | Stop script | Offline | Offline | |
At switchover | Operational system | Online->Offline | Stop script | Online | Offline |
Standby system | Offline->Online | Start script | Offline | Online | |
At switchover | Operational system | Online->Faulted | - | - | - |
Faulted->Offline | Stop script | Offline | Offline | ||
Standby system | Offline->Online | Start script | Offline | Online | |
At cutting of | Operational system | Offline | - | - | - |
Standby system | Offline->Offline | Stop script | Offline | Offline | |
At exit of | Operational system | Online->Online | Start script | Online | Online |
Standby system | Offline->Offline | - | - | - |
*1: The value of HV_LAST_DET_REPORT is the current resource status just before the "Script for execution" is executed.
*2: This script is executed only when the following conditions exist:
NULLDETECTOR attribute of the resource is "Yes"; and
Offline processing is executed when userApplication is in any state other than Offline state.
*3: When a failure of Hot-standby resources that exist under the same userApplication.
*4: This script is executed only when NULLDETECTOR attribute of the resource is "Yes".
State transition | Script for execution | Value of environment variable | |||
---|---|---|---|---|---|
Classification | State of the Cmdline resource | HV_LAST_DET_REPORT | HV_INTENDED_STATE | ||
At RMS startup | Operational system | Offline->Online | Start script | Offline | Online |
Standby system | Offline->Standby *2 | Start script | Offline | Standby | |
At RMS stop | Operational system | Online->Offline | Stop script | Online | Offline |
Standby system | Standby->Offline | Stop script | Standby | Offline | |
At switchover | Operational system | Online->Offline | Stop script | Online | Offline |
Standby system | Standby->Online | Start script | Standby | Online | |
At switchover | Operational system | Online->Faulted | - | - | - |
Faulted->Offline | Stop script | Offline or Faulted *3 | Offline | ||
Standby system | Standby->Online | Start script | Standby | Online | |
At cutting of | Operational system | Online | - | - | - |
Standby system | Standby->Faulted | - | - | - | |
Faulted->Offline | Stop script | Offline or Faulted *3 | Offline | ||
At exit of | Operational system | Online->Online | - | - | - |
Standby system | Standby->Standby | - | - | - |
*1: The value of HV_LAST_DET_REPORT is the current resource status just before the "Script for execution" is executed.
*2: When the StandbyTransitions attribute is "Startup."
*3: When the Check script is returned to 1 (Offline) during a failure detection, the value of HV_LAST_DET_REPORT is "Offline." When the Check script is returned to 2 (Faulted) during a failure detection, the value of HV_LAST_DET_REPORT is "Faulted."
See
For the environment variable that can be referred to within a script, see "6.11.2.1.2 Environment Variables can be referred to within the Start and Stop Scripts."
Scripts to be executed in each state for the Cmdline resource during a state transition are as follows.
For the execution order for each script when the state is transited, see "6.11.1.5 Flow of the Cmdline Resource Operation."
When the Cmdline resource is Online, the Start script is executed only one time.
The Check script is executed in 10-second intervals. It is also executed immediately after completing the Start script.
For details, see "6.11.1.5 Flow of the Cmdline Resource Operation."
The Start script and Check script are switched based on the exit code. The states are as follows.
For details on the exit codes, see "6.11.2.2.3 Check Script Exit Code."
(*) For a timeout, see "6.11.2.1.5 Timeout of Scripts."
Only the Cmdline resource of Hot-standby operation becomes Standby.
When the Cmdline resource is Standby, the Start script is executed only one time.
The Check script is executed in 10-second interval. It is also executed immediately after completing the Start script.
For details, see "6.11.1.5 Flow of the Cmdline Resource Operation."
The Start script and Check script are switched based on the exit code. The states are as follows.
For details on the exit codes, see "6.11.2.2.3 Check Script Exit Code."
(*) For a timeout, see "6.11.2.1.5 Timeout of Scripts."
When the Cmdline resource is Offline, the Stop script is executed only one time.
The Check script is executed in 10-second intervals. It is also executed immediately after completing the Stop script.
For details, see "6.11.1.5 Flow of the Cmdline Resource Operation."
The Stop script and Check script are based on the exit code. The states are as follows.
For details on the exit codes, see "6.11.2.2.3 Check Script Exit Code."
(*) For a timeout, see "6.11.2.1.5 Timeout of Scripts."
(**) It is when ALLEXITCODES is set. For details, see the Outline of the ALLEXITCODES attribute in Table 3.1.
The Operation of the Cmdline resource is classified as follows:
At RMS startup
At RMS stop
At switchover
In addition to the Cmdline resource, the Gls resource is also described in the following figures as an example.
At RMS startup Operational system (Offline->Online)
The Cmdline resource operation
The Check script is executed in a given interval (about 10 seconds) after starting RMS. After that, the Start script is executed. Then, the Check script is executed without waiting for the given time after returning the Start script. After the Start script is normally returned and the Check script is returned to Online, the Cmdline resource becomes Online.
Note
The Check script is operated before the Start script. If the Check script is returned to Online before executing the Start script, the Start script is not executed.
Gls resource operation
At the same time a resource become Online after starting RMS, GLS activates a virtual IP address. In addition, to notify the location of the activated IP address, GLS sends a system down notification.
At RMS startup Standby system (Offline->Offline)
The Cmdline resource operation
The Check script is executed in a given interval (about 10 seconds) after starting RMS.
Gls resource operation
No processing.
At RMS startup Standby system (Offline->Standby)
The Cmdline resource operation
The Check script is executed in a given interval (about 10 seconds) after starting RMS. After that, the Start script is executed. Then, the Check script is executed without waiting for the given time after returning the Start script. After the Start script is normally returned and the Check script is returned to Standby, the Cmdline resource becomes Standby.
Note
The Check script is operated before the Start script. If the Check script is returned to Online before executing the Start script, the Start script is not executed.
Gls resource operation
In Standby state, GLS monitors a network route with the host monitoring function (ping monitoring) without activating a virtual IP address.
At RMS stop Operational system (Online->Offline)
The Cmdline resource operation
The Stop script is executed. Without waiting for the given time, the Check script is executed. After the Check script is returned to Offline, the corresponding Cmdline resource becomes Offline.
Gls resource operation
Inactivate the virtual IP address that has been activated when Online state. Moreover, if the user command execution function (RESOURCE_OFFLINE) of GLS is set, execute the script.
At RMS stop Standby system (Offline->Offline)
The Cmdline resource operation
The Cmdline resource has already Offline, the Stop script is not executed.
Gls resource operation
No processing.
At RMS stop Standby system (Standby->Offline)
The Cmdline resource operation
The Stop script is executed. Without waiting for the given time, the Check script is executed. After the Check script is returned to Offline, the corresponding Cmdline resource becomes Offline.
Gls resource operation
Stop the host monitoring function (ping monitoring) for a remote host running with Standby state.
At switchover Operational system (Online->Offline)
The Cmdline resource operation
The Stop script is executed. Without waiting for the given time, the Check script is executed. After the Check script is returned to Offline, the corresponding Cmdline resource becomes Offline.
Gls resource operation
Inactivate the virtual IP address that has been activated when Online state. Moreover, if the user command execution function (RESOURCE_OFFLINE) of GLS is set, execute the script.
At switchover Standby system (Offline->Online)
The Cmdline resource operation
The Start script is executed. Without waiting for the given time, the Check script is executed. After the Check script is returned to Online, the corresponding Cmdline resource becomes Online.
Gls resource operation
At the same time a resource become Online, GLS activates a virtual IP address. In addition, to notify the whereabouts of the activated IP address, GLS sends a system down notification.
At switchover Standby system (Standby->Online)
The Cmdline resource operation
The Start script is executed. Without waiting for the given time, the Check script is executed. After the Check script is returned to Online, the corresponding Cmdline resource becomes Online.
Gls resource operation
At the same time a resource becomes Online, GLS activates a virtual IP address. In addition, to notify the location of the activated IP address, GLS sends a system down notification.
This section describes the operations for each exit code of the Check script. They are classified from (1) to (7) phases from start to end as follows:
(1) Phase from RMS is started to the Cmdline resource is started.
(2) Phase the Cmdline resource is being started (the Start script is being executed.
(3) Phase the status is being checked (the Check script is being executed) after starting the Cmdline resource.
(4) Phase the Cmdline resource is being operated.
(5) Phase the Cmdline resource is being stopped (The Stop script is being executed).
(6) Phase the status is being checked (The Check script is being executed) after stopping the Cmdline resource.
(7) Phase from the Cmdline resource is stopped to RMS is stopped.
For standby systems of the Cmdline resource other than Hot-standby operation, the Start script is not executed at RMS startup. Thus, the phases 2 and 3 do not exist.
For standby systems of the Cmdline resource other than Hot-standby operation, the Stop script is not executed at RMS stop. Thus, the phases 5 and 6 do not exist.
The Cmdline resource with Hot-standby operation
The Cmdline resource other than Hot-standby operation