HP StorageWorks XP Cluster Extension Software Administrator Guide (T1656-96035, April 2010)

Executing programs before and after an XP Cluster Extension
takeover
XP Cluster Extension can invoke other programs, such as Perl scripts, before or after an XP Cluster
Extension takeover. These programs can be any executable, and must be able to provide return codes
to XP Cluster Extension. If the programs add significant execution time to the application service
startup, the timeout values for the startup must be adjusted in the cluster software.
XP Cluster Extension transfers information as command-line arguments to the pre-execution and
post-execution programs. Pre-executables and post-executables must be specified by full path in the
PreExecScript and PostExecScript objects. If no executable is specified (empty value for the object),
no preprocessing or postprocessing, is done.
The pre-executable and post-executable path names can include spaces and environment variables.
The environment variables will be expanded to form the full path name for the executable.
To use Perl scripting with MSCS, the Perl script must be called from a Windows batch file; therefore,
two scripts are needed: the calling batch file and the called Perl script.
In the following example, c:\tmp\preExec.bat is the calling batch file, and c:\tmp\preExec.pl
is the called Perl script:
Windows batch file: c:\tmp\preExec.bat
@echo off
c:\perl\bin\perl.exe c:\tmp\preExec.pl %3 %4 %5
exit /B %ERRORLEVEL%
Arguments
The following arguments are transferred to the scripts in this order:
1. Name
2. Vgs (HACMP only)
3. RaidManagerInstances
4. DeviceGroup
5. local device group state (check)
Pre-executable status before failover and post-executable status after failover
6. local device group state (display)
Pre-executable status before failover and post-executable status after failover
IMPORTANT:
An empty string is returned if parameter #5 is not SSWS, PSUE, or PDUB.
7. remote device group state (check)
Pre-executable status before failover and post-executable status after failover
XP Cluster Extension Software Administrator Guide 145