HP Serviceguard Linux Contributed Toolkit Suite A.04.02.01 User Guide (696979-001, June 2012)

ExampleDescriptionAttribute
mysql_monitorThe service name must be unique in
the cluster.
service_name
${SGCONF}/pkg/MySQL/
toolkit.sh monitor
This is an interface to hamysql.sh.service_cmd
function customer_defined_run_cmds
{
${SGCONF}/pkg/MySQL/toolkit.sh start
test_return 51
}
function customer_defined_halt_cmds
{
${SGCONF}/pkg/MySQL/toolkit.sh stop
test_return 52
}
6. Edit the MySQL toolkit configuration file hamysql.conf.
7. Copy the package directory to the other nodes in the cluster.
For example, change to the parent directory of the package directory and enter the following
command:
# rcp -r p /usr/local/pkg/cmcluster/pkg/MySQL photon4:$PWD/
8. Validate the configuration using the cmcheckconf command:
# cmcheckconf -P pkg_MySQL.conf
9. Add the package to the Serviceguard environment using the cmapplyconf command, if the
cmcheckconf command does not report any errors:
# cmapplyconf -P pkg_MySQL.conf
10. Enable package switching for the MySQL toolkit package using:
# cmmodpkg -e -n node1 -n node2 <package_name>
# cmmodpkg -e <package_name>
11. Start the package using the cmrunpkg command.
# cmrunpkg <package_name>
Configuring modular MySQL toolkit packages
To configure modular MySQL toolkit packages:
1. Create a directory for the package on all the cluster nodes using the following command:
# mkdir ${SGCONF}/pkg/mysql
2. cd to the package directory.
3. Create the package configuration and control templates using the cmmakepkg command:
# cmmakepkg m tkit/mysql/mysql pkg_MySQL.conf
4. Edit the following attributes manually in the package configuration file:
DescriptionAttribute
This directory holds the toolkit configuration file. This
parameter directs cmapplyconf to generate the
TKIT_DIR
hamysql.conf file under this directory. To put the
toolkit into maintenance mode, create pgsql.debug
Using MySQL toolkit 23