Top
PRIMECLUSTER  Installation and Administration Guide 4.5
FUJITSU Software

6.11.1 Scripts and State Transition

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.


Table 6.3 The Cmdline resource in other than Hot-standby operation

State transition

Script for execution

Value of environment variable

Classification

State of the Cmdline resource

HV_LAST_DET_REPORT
*1

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
*2

Offline

Offline

At switchover
(operation)

Operational system

Online->Offline

Stop script

Online

Offline

Standby system

Offline->Online

Start script

Offline

Online

At switchover
(resource failure)

Operational system

Online->Faulted

-

-

-

Faulted->Offline

Stop script

Offline

Offline

Standby system

Offline->Online

Start script

Offline

Online

At cutting of
(resource failure in standby system)
*3

Operational system

Offline

-

-

-

Standby system

Offline->Offline

Stop script
*2

Offline

Offline

At exit of
maintenance mode

Operational system

Online->Online

Start script
*4

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:

*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".


Table 6.4 The Cmdline resource in Hot-standby operation

State transition

Script for execution

Value of environment variable

Classification

State of the Cmdline resource

HV_LAST_DET_REPORT
*1

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
(operation)

Operational system

Online->Offline

Stop script

Online

Offline

Standby system

Standby->Online

Start script

Standby

Online

At switchover
(resource failure in operation system)

Operational system

Online->Faulted

-

-

-

Faulted->Offline

Stop script

Offline or Faulted *3

Offline

Standby system

Standby->Online

Start script

Standby

Online

At cutting of
(resource failure in standby system)

Operational system

Online

-

-

-

Standby system

Standby->Faulted

-

-

-

Faulted->Offline

Stop script

Offline or Faulted *3

Offline

At exit of
maintenance mode

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."

6.11.1.1 Scripts to be Executed in Each Resource State

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."


Figure 6.1 Scripts to be executed during a state transition

6.11.1.2 Script States When Online

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."


Figure 6.2 Scripts states when Online

(*) For a timeout, see "6.11.2.1.5 Timeout of Scripts."

6.11.1.3 Script States When Standby

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."


Figure 6.3 Script states when Standby

(*) For a timeout, see "6.11.2.1.5 Timeout of Scripts."

6.11.1.4 Script States When Offline

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."


Figure 6.4 Script states when Offline

(*) 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.

6.11.1.5 Flow of the Cmdline Resource Operation

The Operation of the Cmdline resource is classified as follows:

In addition to the Cmdline resource, the Gls resource is also described in the following figures as an example.

6.11.1.6 Operation for Each Exit Code of the Check Script

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.