This chapter describes how to add configuration information about a new service to the IRIS FailSafe configuration file /var/ha/ha.conf. It assumes that you are familiar with creating a configuration file, which is described in Chapter 4 of the IRIS FailSafe Administrator's Guide .
This chapter begins by showing an example: configuration file information for the application named, the Internet domain name server. It then describes the process of developing this configuration file text. Other sections provide information about adding new block, section, and parameter names to the configuration file and about checking the syntax of the configuration file.
The sections in this chapter are as follows:
Like all highly available services supported by IRIS FailSafe software options (interfaces, volumes, filesystems, nfs, and so on), the configuration of the application you are making highly available must be described in the IRIS FailSafe configuration file /var/ha/ha.conf.
For example, if you are adding named as a highly available application, the blocks and parameters for named in the configuration file might be as follows (shown with line numbers):
1 application-class named
2 {
3 server-node = ha1 # active node's hostname
4 }
5
6 action named
7 {
8 local-monitor = /var/ha/actions/ha_named_lmon
9 }
10
11 action-timer named
12 {
13 start-monitor-time = 60
14 lmon-probe-time = 120
15 lmon-timeout = 30
16 }
17
18 named named_block
19 {
20 server-node = ha1 # primary node's hostname
21 backup-node = ha2 # backup node's hostname
22 process-name = named
23 }
|
named is an application that needs one instance running in an IRIS FailSafe cluster. Thus, it is run in an active/backup configuration and just one server-node parameter is needed in the application-class block (line 3). The node ha1 is the active (or primary) node, the node that runs named when the nodes are in normal state.
Each application class needs one action block (lines 6 to 9) and one action-timer block (lines 11 to 16). These blocks have standard parameters, which are described in Chapter 4 of the IRIS FailSafe Administrator's Guide .
Because there is just one instance of named running in the cluster, there is just one named block (lines 18 to 23). The block's label is named_block (line 18). The block specifies the active node as ha1 (the server-node parameter on line 20) and the backup node as ha1 (the backup-node parameter on line 21). The process-name parameter (line 22) will be used by the local monitoring script /var/ha/actions/ha_named_lmon. (See Example 3-1.)
You must develop the configuration file contents for a new highly available service in several phases as you proceed with developing and testing the scripts for the new highly available services. The phases are:
Put the framework in place in /var/ha/ha.conf. This phase can be done before writing the scripts described in Chapter 3, “Writing a Monitoring Script,” and Chapter 4, “Writing a Failover Script.” This framework has these components:
Begin with a copy of the /var/ha/ha.conf that you are using on your IRIS FailSafe cluster.
Add a copy of the template for new highly available applications, the file /var/ha/templates/ha.conf.template.
If you know how many instances of the application will be running on the cluster, create that many copies of the <application_name> block. Using filesystems as an example, the <application_name> is “filesystem,” and there is one filesystem block for each filesystem on the shared disks in a cluster.
Edit the template to fill in as much information as you can. For example, choose a name for your highly available service and substitute it for <application_name> throughout the file. Choose a label for each <application_name> block. Enter the default values for the monitoring frequency parameters in the action-timer block.
Determine if your new highly available service requires the use of system resources such as IP addresses, filesystems, and XLV logical volumes that are not already in the configuration file. If they are required, add them to the configuration file. Follow the instructions in Chapter 2 and Chapter 4 of the IRIS FailSafe Administrator's Guide .
Customize the configuration file information for the new highly available application as you develop the monitoring and failover scripts. For example, you can enter the pathname of your local monitoring script. In addition, during script development you may find that you want to add parameters to the configuration file that are specific to your application. The section “Choosing Parameters for a New Highly Available Service” in this chapter describes the type of information specified in parameters, the syntax you must use, and how to name them.
After you complete the development of the monitoring and failover scripts, but before you install your new configuration file, check the syntax of the new configuration file as described in the section “Checking the Configuration File” in this chapter.
As you test the IRIS FailSafe system with the new monitoring and failover scripts, refine the values of the start-monitor-time, lmon-probe-time, and lmon-timeout parameters. Remember that the value of start-monitor-time must be greater than or equal to the value of the long-timeout parameter. The values for lmon-probe-time and lmon-timeout depend on the time it takes to execute the local monitoring script for the application.
The parameters in the IRIS FailSafe configuration file specify many details for each highly available service, including the number of instances and which node is their primary node, which monitoring script is to be used, and various monitoring frequency values. These parameters are used by monitoring scripts and failover scripts. Placing parameters in the configuration file, rather than simply hardcoding values in the scripts, simplifies maintenance when values are used in more than one script and simplifies tuning by putting all values that are likely to change into just one file.
For each parameter you add, you must choose a name. You have two choices:
Use a parameter name already in use.
Tables in Appendix A, “Names Used in Template Configuration Files,” list the names already in use. To simplify maintenance, you should use these names for the purposes listed.
Choose a new name.
See the section “Defining Variables for New Block, Section, and Parameter Names” in Chapter 3 for more information.
Consider the structure of your blocks when adding parameters. Simple parameter specification is structured like this:
block-name {
parameter-name = value
...
}
|
Parameters can take several values, known as a list:
block-name {
parameter-name = ( value1 value2 ... )
...
}
|
If necessary, you can include sections as follows:
block-name {
section-name label {
parameter-name = value
}
...
}
|
The formal syntax definition of the configuration file is given in Chapter 4 of the IRIS FailSafe Administrator's Guide .
You can check the syntax and to some extent the content of the configuration file that you create by entering this ha_cfgverify command:
# /usr/etc/ha_cfgverify configuration_file |
configuration_file is the pathname of your configuration file under development. The messages produced by ha_cfgverify are described in Appendix A of the IRIS FailSafe Administrator's Guide .