Script execution types
- Last UpdatedAug 12, 2024
- 3 minute read
This section describes the script execution types supported by Application Server and OMI.
Scripting Redundant AppEngines
There are certain considerations that you must take into account when writing a script that will run on redundant AppEngines. This section outlines whether or not a script will run under various scenarios, including deploy, forced failover, system failure, system startup, and undeploy operations. Redundant engines can be set to run in either Legacy Mode or Run Warm Mode. The selected mode may change the circumstances under which a script will execute.
Run Warm Mode provides much faster failover performance, but there are internal differences between the redundancy modes in how the engines start and stop. Therefore, Startup and Shutdown scripts for redundant engines may operate differently, depending on which redundancy mode is selected.
Note: New redundant engines default to Run Warm Mode. Redundant engines in migrated galaxies default to Legacy Mode.
The following table summarize the circumstances under which each script execution type runs when redundancy is set to Legacy Mode (differences between the two modes are highlighted). The abbreviations used to denote the script execution types are as follows:
Abbreviations used below for Script execution types:
U - StartUp
N - OnScan
X - Execute
F - OffScan
D - ShutDown
Note that there are no differences for script execution between redundancy modes on the primary engine. There are differences in how scripts execute on the backup engine.
|
Legacy mode |
Primary engine |
Executes on |
Backup engine |
Executes on |
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Action |
Initial state |
End state |
U |
N |
X |
F |
D |
Initial state |
End state |
U |
N |
X |
F |
D |
|
Deploy |
Down |
Active OnScan |
Y |
Y |
Y |
N |
N |
Down |
Standby |
N |
N |
N |
N |
N |
|
Forced Failover |
Active OnScan |
Standby |
N |
N |
N |
Y |
Y |
Standby |
Active OnScan |
Y |
Y |
Y |
N |
N |
|
Server 1 Failure |
Active OnScan |
Down |
N |
N |
N |
N |
N |
Standby |
Active OnScan |
Y |
Y |
Y |
N |
N |
|
Server 2 Failure |
Active OnScan |
Active OnScan |
N |
N |
Y |
N |
N |
Standby |
Down |
N |
N |
N |
N |
N |
|
Graceful shutdown of Server 1 |
Active OnScan |
Down |
N |
N |
N |
Y |
Y |
Standby |
Active OffScan |
Y |
N |
N |
N |
N |
|
Graceful shutdown of Server 2 |
Active OnScan |
Active OnScan |
N |
N |
Y |
N |
N |
Standby |
Down |
N |
N |
N |
N |
N |
|
Start Server 1 |
Down (was OnScan) |
Active OnScan |
Y |
Y |
Y |
N |
N |
Down |
Down |
N |
N |
N |
N |
N |
|
Start Server 2 |
Active OnScan |
Active OnScan |
N |
N |
Y |
N |
N |
Down |
Standby |
N |
N |
N |
N |
N |
|
Undeploy |
Active OnScan |
Down |
N |
N |
N |
Y |
Y |
Standby |
Down |
N |
N |
N |
N |
N |
The following table summarizes the circumstances under which each script execution type runs when redundancy is set to Run Warm Mode (differences between the two modes are highlighted):
|
Run warm mode |
Primary engine |
Executes on server 1 |
Backup engine |
Executes on server 2 |
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Action |
Initial state |
End state |
U |
N |
X |
F |
D |
Initial state |
End state |
U |
N |
X |
F |
D |
|
Deploy |
Down |
Active OnScan |
Y |
Y |
Y |
N |
N |
Down |
Standby |
Y |
N |
N |
N |
N |
|
Forced Failover |
Active OnScan |
Standby |
N |
N |
N |
Y |
Y |
Standby |
Active OnScan |
N |
Y |
Y |
N |
N |
|
Server 1 Failure |
Active OnScan |
Down |
N |
N |
N |
N |
N |
Standby |
Active OnScan |
N |
Y |
Y |
N |
N |
|
Server 2 Failure (hard shutdown) |
Active OnScan |
Active OnScan |
N |
N |
Y |
N |
N |
Standby |
Down |
N |
N |
N |
N |
N |
|
Graceful shutdown of Server 1 |
Active OnScan |
Down |
N |
N |
N |
Y |
Y |
Standby |
Active OffScan |
N |
N |
N |
N |
N |
|
Graceful shutdown of Server 2 |
Active OnScan |
Active OnScan |
N |
N |
Y |
N |
N |
Standby |
Down |
N |
N |
N |
N |
Y |
|
Start Server 1 |
Down (previously OnScan) |
Active OnScan |
Y |
Y |
Y |
N |
N |
Down |
Down |
N |
N |
N |
N |
N |
|
Start Server 2 |
Active OnScan |
Active OnScan |
N |
N |
Y |
N |
N |
Down |
Standby |
Y |
N |
N |
N |
N |
|
Undeploy |
Active OnScan |
Down |
N |
N |
N |
Y |
Y |
Standby |
Down |
N |
N |
N |
N |
Y |