Migrating packages from legacy to modular style
16
Migrating a package with non-Serviceguard parameters in
the control script
If the package includes non-Serviceguard control-script parameters that are not defined in the
Customer-defined functions section, or you want to convert these non-Serviceguard parameters to PEVs, use the
following steps:
1. Run the cmmigratepkg command with the options for external script and generate PEV.
$cmmigratepkg -p pkgA -x /etc/cmcluster/pkg/pkgA/myexternal.sh -e -o pkgA.conf
2. Make sure that the location of the external script is correct in the output modular package configuration file.
(The -x option needs the full pathname of the external script.) Note that the new variable is added with the prefix
“PEV_”.
3. Edit the external script.
a. Make sure that the script is using the PEV names in the code. Change the variable names to include the
prefix “PEV_”.
4. Copy the external script file to each node where the package can run and make sure that the script is owned by root
and permissions are set to 744.
2
5. Halt the package.
6. Run cmcheckconf with the new modular package configuration file.
7. Run cmapplyconf with the new modular package configuration file.
8. Run the package.
Manual steps for migrating legacy packages
1. Get a copy of the legacy package ASCII file by using the cmgetconf -p command. Modify the following in the
ASCII file:
a. Remove the RUN_SCRIPT, HALT_SCRIPT and STORAGE_GROUP attributes.
b. Add the script_log_file attribute
c. Add to the list of modules and versions after PACKAGE_NAME:
1. module_name sg/all
2. module_version 1
d. Add the operation_sequence information after Service information
1. operation_sequence $SGCONF/scripts/sg/external_pre.sh
2. operation_sequence $SGCONF/scripts/sg/volume_group.sh
3. operation_sequence $SGCONF/scripts/sg/filesystem.sh
4. operation_sequence $SGCONF/scripts/sg/package_ip.sh
5. operation_sequence $SGCONF/scripts/sg/external.sh
6. operation_sequence $SGCONF/scripts/sg/service.sh
If the package uses EMS resources, add:
operation_sequence $SGCONF/scripts/sg/resource.sh
Legacy Package ASCII file
package_name pkg-nu-2
package_type FAILOVER
run_script_timeout 340
halt_script_timeout 340
successor_halt_timeout NO_TIMEOUT
priority 663
run_script /etc/cmcluster/pkg-nu-2/control.sh
2
cmmigratepkg wrongly sets permissions to 555; you need to reset them manually to 744.