This chapter provides information about configuring the IRIS FailSafe Netscape server option for use on an IRIS FailSafe system. The major sections in this chapter are as follows:
The required software for Netscape server failover is as follows:
Netscape server software
Base IRIS FailSafe software
See the section “Installing the IRIS FailSafe Software” in Chapter 2 of the IRIS FailSafe 2.0 Administrator's Guide for a complete list of required base software.
IRIS FailSafe Netscape server software
The IRIS FailSafe 2.0 Netscape Server Administrator's Guide subsystem is failsafe2_web.books.book_AG.
The man page subsystem is failsafe2_web.man.man.
The release notes subsystem is failsafe2_web.man.relnotes.
The base software subsystem is failsafe2_web.sw.base.
The following subsections discuss choosing the location of key Netscape servers and the need for customizing certain Netscape servers. They also describe example configurations of Netscape servers and the configuration parameters for this configuration.
In configuring one or more Netscape servers on an IRIS FailSafe 2.0 cluster, you need to consider the locations of the following components:
Documents (HTML pages) that are stored in a directory called the document root
Netscape server software
Netscape servers (including all data, log, and control files)
| Note: The accesses made by the IRIS FailSafe 2.0 monitoring scripts are recorded in the log file records. Therefore, you must subtract these accesses from the total number of hits to get an accurate count. An almost-accurate way to do this is to eliminate all accesses made from both nodes in the cluster. Doing so also eliminates accesses made by any users on the nodes in the cluster, but because these nodes are servers, removing these accesses should present no serious problems. |
If the Netscape servers have the chkconfig command set to on, the system will try to start all servers whether or not they are configured as FailSafe servers. If you try to start a FailSafe server, errors will result as the highly-available IP address has not yet been configured. The system administrator should ignore these errors. FailSafe will start the appropriate servers as necessary.
All of the preceding items are specified for each Netscape server. Therefore, you have the flexibility to use different copies of each component, for example Netscape server software, for each server instance (the Netscape server software used by one instance must be identical on both nodes). In addition, the Netscape server configuration files, startup script, and shutdown script for a server instance need not be identical on each node. Check to see if the .conf configuration files have any system-specific data (for example, the Netscape FastTrack configuration files might be in /usr/ns-home/server/config).
When you configure the web server, the web server's IP address (web-ipaddr) and port number (port-number) define the webserver's instance, and you should ensure that these parameters are consistent with the web server's configuration information.
To plan an IRIS FailSafe configuration for Netscape server, you must answer these questions:
Do all server instances use the same Netscape server software?
Is the Netscape server parameter file identical on each node for each server instance?
Are the Netscape server startup and shutdown scripts identical in location and content for each server instance?
For each server instance, is the content of its Netscape server startup script identical on each node?
For each server instance, is the content of its Netscape server shutdown script identical on each node?
After answering all of the preceding questions, follow these guidelines for each server instance to decide whether to use shared or non-shared disks for each of the Netscape server components for that instance:
Netscape servers must be on one or more XFS file systems or XLV logical volumes that are on shared disks.
If the Netscape server configuration file is identical on each node, it can be on a shared disk or replicated on non-shared disks.
If the Netscape server startup and shutdown scripts are identical on each node, they can be on a shared disk or replicated on non-shared disks.
If the Netscape server startup and shutdown scripts are different on each node, they must be on a non-shared disk on each node.
Netscape server software can be on a shared disk or replicated on non-shared disks (it must be identical on each disk).
If the Netscape server configuration file is different on each node, it must be on non-shared disks and linked to the directory in the Netscape server software where the Netscape server expects to find it.
In order for the IRIS FailSafe 2.0 Netscape server option to enable IRIS FailSafe 2.0 to provide failover protection, the following requirements must be met:
The Netscape server software must be available on each node acting as a Netscape server.
Each Netscape server's configuration information must be available on each node.
A document root must be available for each Netscape server on each node.
The IP addresses associated with each Netscape server must fail over.
Most Netscape servers on FailSafe 2.0 clusters should have the following configuration:
The Netscape server software and configuration information are duplicated on local disks on each node.
To have a Netscape server configuration with no shared disks (server software, configuration information, log files, access control lists, and documents are duplicated on local disks on each node), the following requirements must be met:
Each active server must serve identical documents.
The document content must be read-only.
In an IRIS FailSafe 2.0 cluster, one or more nodes can export Netscape servers. If a node that exports Netscape servers fails, another node provides backup service.
The first subsection below describes an active/backup Netscape server configuration; one node is used as a Netscape server and the other node is used as a backup server in case the first node fails. The second subsection explains the aspects of the configuration that must be specified when you configure the IRIS FailSafe 2.0 system.
This example is an active/backup configuration with two Netscape Enterprise servers on the primary node xfs-ha1. The backup node is called xfs-ha2. The two IP aliases for a network interface on xfs-ha1 are 190.0.2.3 and 190.0.2.5. One Netscape server uses port number 80 and the other Netscape server uses port number 90. The script that is used to start and stop the Netscape servers is /usr/ns-home/server/start (this script is part of the Netscape_web resource definition).
| Note: Although this example has two Netscape servers on a single node, listening on ports 80 and 90, a typical configuration is a single Netscape server listening to a single port. This example illustrates how to specify two Netscape servers on a single node for IRIS FailSafe 2.0. |
Table 2-1 shows the various labels, section names, and parameters used when you configure the FailSafe 2.0 system for the active/backup example in the previous section.
Table 2-1. Netscape Configuration Parameters (Active/Backup Configuration)
Resource Parameters | Default Value | Comments |
|---|---|---|
resource-name | webxfs-ha1 | A unique name. |
admin-scripts | /usr/ns-home/ server-name | The startup and shutdown scripts for the server; also defines the server's root directory. |
web-ipaddr (for the first server) | 190.0.2.3 | Any IP alias for the node with the format X.X.X.X. |
monitor-level | 1 | Web monitor level. |
port-number (for the first server) | 80 | The port number used by this server. |
default_page_location | /var/www/htdocs | Server's home page location. |
As described in the section “Planning the Netscape Server Configuration”, the location of the log files, access control lists, and documents depends somewhat on the document content. If it is read-only, the log files, access control lists, and documents can be on local disks on each node or on shared disks. If it is read-write, these files must be on one or more shared disks.
The section “Configuring a Netscape Server”, describes the procedure for configuring Netscape servers.
The first subsection below describes a dual-active Netscape server configuration; each node serves as a Netscape server during normal operation. If one node fails, the other node takes over the server duties of the failed node. The second subsection explains the aspects of the configuration that must be specified when you configure the IRIS FailSafe 2.0 system.
This example is a dual-active configuration with one Netscape server on each of the nodes xfs-ha1 and xfs-ha2. The default startup and shutdown scripts and configuration file are used. The node xfs-ha1 has the IP alias 190.0.2.3, and the node xfs-ha2 has the IP alias 190.0.2.4. Each server uses port 80.
Table 2-2 shows the various labels, section names, and parameters used when you configure the FailSafe 2.0 system for the dual-active Netscape server example in the previous section.
Table 2-2. Netscape Configuration Parameters (Dual-Active Configuration)
Resource Attribute | Value for xfs-ha1 | Value for xfs-ha2 | Comments |
|---|---|---|---|
label | webxfs-ha1 | webxfs-ha2 | A unique name. |
ip-address | 190.0.2.3 | 190.0.2.4 | An IP alias for the primary node. |
port-num | 80 | 80 | The port number. |
As described in the section “Planning the Netscape Server Configuration”, the location of the log files, access control lists, and documents depends somewhat on the document content. If it is read-write or if it is different for the active servers on each node, the log files, access control lists, and documents must be on one or more shared disks. If the document content is identical for active servers on each node and is read-only, these files can be on local disks on each node or on shared disks.
The section “Configuring a Netscape Server”, describes the procedure for configuring Netscape servers.
To configure a Netscape FastTrack Server or Enterprise Server, use the following steps:
On one node, verify that the Netscape Administration Server is installed and running by entering the following command on that node:
# ps -ef | grep ns-admin
root 7457 7461 0 13:45:25 ? 0:00 /usr/ns-home/admserv/ns-admin -d /usr/ns-home/admserv
...
|
If the ns-admin commands are not shown in the ps output, enter the following commands:
# chkconfig ns_admin on # /etc/init.d/ns_admin start |
Configure the interface to the public network by using the ifconfig command, as follows:
# /usr/etc/ifconfig interface alias ip_alias netmask netmask |
interface is the interface to be used to access the node, ip_alias is a high-availability IP address for the interface, and netmask is the netmask of the IP address.
Start a web browser on this node. For example:
# netscape |
Open the Netscape server's configuration page:
http://ip_alias:81 |
ip_alias is the high-availability IP address used in step 3. A dialog box called Netscape: Password appears.
In the dialog box, enter the user ID and password of the Netscape server administrator, for example, root.
Click the OK button. A page called Netscape Server Selector appears.
Click on the Install a new Netscape FastTrack Server button or the Install a new Netscape Enterprise Server button, as appropriate. A page called “Netscape FastTrack Server Installation” appears.
Fill in the fields on this page. These are the fields that have special requirements for IRIS FailSafe 2.0 or are used in the remainder of this procedure:
| Bind address | This is the high availability IP address (from step 3) with the format x.x.x.x. | |
| Server Identifier |
| |
| Server Port | The port_ number you choose is the value that is used when you define your system resources. The default port for the FastTrack Server is 80 and the default port for the Enterprise Server is 443. | |
| Document Root |
|
Click the OK button. A page called “Success!” appears.
The configuration of this server is complete. You can click “Return to the server selector” on this page, go to another web page, or exit the web browser. Do not click “Start your new server” on this page.
Repeat steps 1 through 11 on the other nodes in this cluster on which you want to configure identical servers.
If this cluster will have more than one active Netscape FastTrack or Enterprise Server, repeat steps 1 through 12 for each additional server.
If the log files, access control logs, and document root for the Netscape servers are on local disks, the configuration of the Netscape servers is complete and you can skip the rest of this procedure.
On each node that is to be a Netscape server, create the mount point for the file system on the shared disk that is to contain the log files, access control lists, and document root if necessary, and mount the file system. For example:
# mkdir /shared # mount /dev/dsk/dks0d2s7 /shared |
Move the log files to the shared disk and create a link to their original location. For example:
# mkdir /shared/httpd-server_id # mv /usr/ns-home/httpd-server_id/logs /shared/httpd-server_id # ln -s /shared/httpd-server_id/logs /usr/ns-home/httpd-server_id/logs |
server_id is the server identifier from step 9.
Move the access control lists to the shared disk and create a link to their original location. For example:
# mv /usr/ns-home/httpacl /shared/httpacl # ln -s /shared/httpacl /usr/ns-home/httpacl |
Move the document files to the shared disk and create a link to their original location. For example, if the entire document root is to be placed on the shared disk, enter these commands:
# mv /usr/ns-home/docs /shared # ln -s /shared/docs /usr/ns-home/docs |
Unmount the file system on the shared disk:
# umount /shared |
Mount the file system on the shared disk on the backup nodes by repeating step 15 on those nodes.
On the backup nodes, delete any log files, access control lists, and document files on the node. For example:
# rm -rf /usr/ns-home/httpd-var/logs # rm -rf /usr/ns-home/httpacl # rm -rf /usr/ns-home/docs |
On the backup nodes, create links from the shared disk to the local disk on the backup node:
# ln -s /shared/httpd-var/logs /usr/ns-home/httpd-var/logs # ln -s /shared/httpacl /usr/ns-home/httpacl # ln -s /shared/docs /usr/ns-home/docs |
If there are other Netscape servers on the cluster, repeat steps 15 through 22 for each additional server.
This section describes procedures that show you how to create a Netscape server resource type, resource, resource group, and test the Netscape server resource. These procedures assume that a CDB that does not include the Netscape server has already been created, installed, and tested as described in the IRIS FailSafe 2.0 Administrator's Guide .
To create a Netscape server resource type, this subsection assumes that you are already familiar with the concepts of resource types. The Netscape_web resource type defines the following resource attributes. See Table 2-1 for the definitions of these resource attributes.
resource-name, which defines the name of the web server
admin-scripts, which defines the location of the web server's start and stop commands and defines the server's root directory.
web-ipaddr, which defines the location of the web server's IP address
monitor-level, which defines the type of monitoring action performed by the monitor script: a monitor level of 1 monitors the web server process and a monitor level of 2 monitors the web server by requesting a server response
port-number, which defines the port number of the port on which the web server will listen
default-page-location, which defines the location of the web server's home page directory
You can define a resource by using either the IRIS FailSafe Cluster Manager GUI or the IRIS FailSafe Cluster Manager CLI.
The Netscape server resource type is created at cluster creation time. If this automatic resource creation fails, the administrator must create the resource type before a Netscape_web resource is created. The Netscape_web resource type must be installed if you want to add an NFS resource to a cluster that was created before the NFS software was installed.
Inst> l * View: distribution Status: N=new, U=upgrade, S=same, D=downgrade Stream: maint Selection: i=install, r=remove, k=keep Subsystem Types [bdrpoc]: b=reBoot needed, d=Default, r=Required, p=patch, o=overlay, c=Client only S failsafe2_web.books.book_AG [d] 0 FailSafe Web Plugin 2.0 Administrator's Guide S failsafe2_web.man.man [d] 0 FailSafe Web Plugin 2.0 man pages S failsafe2_web.man.relnotes 0 FailSafe Web Plugin 2.0 release notes S failsafe2_web.sw.base [d] 0 FailSafe Web Plugin 2.0 base software Disk space summary (Kbytes): / /apps /disk3 /disk4 Current free space 236100 4696292 1920632 958964 - Selections net change 0 0 0 0 - Temporary inst overhead 0 0 0 0 = Minimum free during install 236100 4696292 1920632 958964 Final projected free space 236100 4696292 1920632 958964 Inst> g Pre-installation check .. 8% Checking space requirements .. 16% Installing/removing files .. 16% Upgrading selected failsafe2_web.books subsystems Installing/removing files .. 65% Upgrading selected failsafe2_web.man subsystems Installing/removing files .. 72% Upgrading selected failsafe2_web.sw subsystems Installing/removing files .. 94% Running exit-commands .. 99% Checking dependencies .. 100% Done. Installations and removals were successful. You may continue with installations or quit now. Inst> quit |
You can use one of the following methods to create the Netscape_web resource type if it was not automatically installed:
Run cluster manager (cmgr) and manually create the resource type. For more information, see the IRIS FailSafe 2.0 Administrator's Guide .
Run cluster manager (cmgr) and install the resource type, as follows:
cmgr> show resource_types installed |
NFS template Netscape_web statd Oracle_DB MAC_address IP_address INFORMIX_DB filesystem volume cmgr> install resource_type Netscape_web in cluster eagan cmgr> |
Use the template scripts supplied with IRIS FailSafe 2.0 located in /var/cluster/cmgr-template/cmgr-create-resource_type.
Execute /var/cluster/ha/resource_type/ Netscape_web/create_resource_type and include the path of the CDB argument and the cluster name.
Use the Load Resource Type GUI task to load the resource type.
After you have defined the resource type, the administrator must define the Netscape_web resources based on the resource type. Each resource requires a unique resource name (for example, the Netscape_web resource type is the Netscape server instance name). Then, the administrator must supply the resource parameters. To create the resource, either use the cluster manager (cmgr) or the GUI. You can access the cmgr either interactively or by using the template script in /var/cluster/cmgr_templates/cmgr-create-resource-Netscape_web. If you are using the template script, you must first edit the script, add the resource type attributes, and then execute the script. The following command can be used to access the template script:
cm2> /usr/cluster/bin/cluster_mgr -f /var/cluster/cmgr_templates/ cmgr-create-resource-Netscape_web |
cm2> cluster_mgr Welcome to IRIS FailSafe Cluster Manager Command-Line Interface cmgr> create resource nss-enterprise of resource_type Netscape_web in cluster eagan Enter commands, when finished enter either “done” or “cancel” Type specific attributes to create with set command: Type Specific Attributes - 1: monitor-level Type Specific Attributes - 2: default-page-location Type Specific Attributes - 3: port-number Type Specific Attributes - 4: admin-scripts Type Specific Attributes - 5: web-ipaddr Resource type dependencies to add: Resource Dependency Type - 1: IP_address resource nss-enterprise ? set monitor-level to 2 resource nss-enterprise ? set default-page-location to /var/www/htdocs resource nss-enterprise ? set port-number to 85 resource nss-enterprise ? set admin-scripts to /var/netscape/suitespot/https-ha85 resource nss-enterprise ? set web-ipaddr to 128.162.19.54 resource nss-enterprise ? done Successfully created resource nss-enterprise cmgr> modify resource nss-enterprise of resource_type Netscape_web in cluster eagan Enter commands, when finished enter either "done" or "cancel" Type specific attributes to modify with set command: Type Specific Attribute - 1: monitor-level Type Specific Attribute - 2: default-page-location Type Specific Attribute - 3: port-number Type Specific Attribute - 4: admin-scripts Type Specific Attribute - 5: web-ipaddr No resource type dependencies to add resource nss-enterprise ? add dependency 128.162.19.54 of type IP_address resource nss-enterprise ? done Successfully modified resource nss-enterprise cmgr> quit cm2> |
To create a resource group, you must first become familiar with the terms and concepts of FailSafe. A resource group can be created either by the GUI or the cluster manager (cmgr).
To define an effective resource group, you must include all of the resources that the Netscape_web resource is dependent on, such as file systems, volumes, and IP addresses. The following example shows the creation of a typical resource group:
cmgr> create resource_group enterprise in cluster eagan
Enter commands, when finished enter either “done” or “cancel”
resource_group enterprise ? set failover_policy to ordered-in-order
resource_group enterprise ? add resource nss-enterprise of resource_type Netscape_web
resource_group enterprise ? add resource 128.162.19.54 of resource_type IP_address
resource_group enterprise ? done
Successfully created resource group enterprise
cmgr> show resource_group enterprise in cluster eagan
Resource Group: enterprise
Cluster: eagan
Failover Policy: ordered-in-order
Resources:
nss-enterprise (type: Netscape_web)
128.162.19.54 (type: IP_address)
|
To ensure that the Netscape_web resource has been correctly configured, you can test individual actions by executing the scripts. Each script, located at /var/cluster/ha/resource_types/Netscape_web, requires two arguments, an input file and an output file. The contents of these files are the resource names. The scripts will display either a 0 if they are successfully executed or a positive integer that indicates the error type. For more information on error codes, see the IRIS FailSafe 2.0 Programmer's Guide .
In the following example, you can test the start script by starting the Netscape server resource with the resource name www.
$ cd /var/cluster/ha/resource_types/Netscape_web $ echo “www” > /tmp/ipfile $ ./start /tmp/ipfile /tmp/opfile |
This should start the www instance, named by the Netscape server resource www.
To view the individual script actions, you must edit the script and add “set -x” to the action function.
In the following example, to see what the start_webserver() function does, edit the start script and add “set -x” in the start function.
#
# Start the resource on the local machine.
# Return HA_SUCCESS if the resource has been successfully started on # the local machine and HA_CMD_FAILED otherwise.
#
start_webserver()
{
set -x
# for all webserver resources passed as parameter for resource in # ${HA_RES_NAMES}
do
|
...
You are now ready to run the script. In this example, /dev/null is the name of the output file.
# ./start /tmp/ipfile /dev/null + get_webserver_info cm1-ha + [ 0 -ne 0 ] + ha_get_field monitor-level 2 default-page-location /var/www/htdocs port-number 85 admin-scripts /usr/ns-home/failsafe-1 web-ipaddr cm1-ha port-number + [ 0 -ne 0 ] + port=85 + ha_get_field monitor-level 2 default-page-location /var/www/htdocs port-number 85 admin-scripts /usr/ns-home/failsafe-1 web-ipaddr cm1-ha web-ipaddr + [ 0 -ne 0 ] + addr=cm1-ha + HA_CMD=/usr/cluster/bin/ha_http_ping2 -p 85 cm1-ha + ha_execute_cmd pinging webserver on port 85 + [ 1 -ne 0 ] + ha_get_field monitor-level 2 default-page-location /var/www/htdocs port-number 85 admin-scripts /usr/ns-home/failsafe-1 web-ipaddr cm1-ha admin-scripts + [ 0 -ne 0 ] + admin_dir=/usr/ns-home/failsafe-1 + [ ! -x /usr/ns-home/failsafe-1/start ] + STATFILE=/var/cluster/ha/tmp/webstatus.10520 + HA_CMD=/usr/ns-home/failsafe-1/start > /var/cluster/ha/tmp/webstatus.10520 2>&1 + ha_execute_cmd starting the webserver server located at /usr/ns-home/failsafe-1/start + [ 0 -ne 0 ] + ha_write_status_for_resource cm1-ha 0 + rm -f /var/cluster/ha/tmp/webstatus.10520 # |
You can use the following procedure to test the start script.
To test the start script, enter the following command, where cm1-ha is the web resource name:
# echo “cm1-ha” > /tmp/ipfile # /var/cluster/ha/resource_types/Netscape_web/start /tmp/ipfile /dev/null # echo $? 0 |
As with all scripts, the output is logged to the script log file, /var/cluster/ha/log/script_hostname. To check that the script has worked, use the tail(1) command to view the file as in the following example:
# tail /var/cluster/ha/log/script_cm1 Tue Oct 13 08:56:06.053 <ha_cilog script 7163:0> ./start[10520]: ./start called with /tmp/ipfile and /dev/null Tue Oct 13 08:56:06.292 <ha_cilog script 10048:0> ./start[10520]: pinging webserver on port 85 Tue Oct 13 08:56:36.359 <ha_cilog script 9786:0> ./start[10520]: Tue Oct 13 08:56:36.377 <ha_cilog script 10414:0> ./start[10520]: /usr/cluster/bin/ha_http_ping2 -p 85 cm1-ha exited with status 1 Tue Oct 13 08:56:36.405 <ha_cilog script 10798:0> ./start[10520]: starting the webserver server located at /usr/ns-home/failsafe-1/start Tue Oct 13 08:56:36.598 <ha_cilog script 10752:0> ./start[10520]: /usr/ns-home/failsafe-1/start > /var/cluster/ha/tmp/webstatus.10520 2>&1 exited with status 0 |
You can use the following procedure to test the stop script.
To test the stop script, enter the following command:
# echo “cm1-ha” > /tmp/ipfile # /var/cluster/ha/resource_types/Netscape_web/stop /tmp/ipfile /dev/null # echo $? 1 |
As with all scripts, the output is logged to the script log file, /var/cluster/ha/log/script_hostname. To check that the script has executed, use the tail(1) command to view the file as in the following example:
# tail /var/cluster/ha/log/script_cm1 Tue Oct 13 09:20:30.084 <ha_cilog script 10756:0> ./stop[10831]: ./stop called with /tmp/ipfile and /dev/null Tue Oct 13 09:20:30.279 <ha_cilog script 8447:0> ./stop[10831]: pinging webserver on port 85 Tue Oct 13 09:21:00.313 <ha_cilog script 10851:0> ./stop[10831]: Tue Oct 13 09:21:00.331 <ha_cilog script 10937:0> ./stop[10831]: /usr/cluster/bin/ha_http_ping2 -p 85 cm1-ha exited with status 1 |
You can use the following procedure to test the monitor script.
To test the monitor script, enter the following command:
# echo “cm1-ha” > /tmp/ipfile # /var/cluster/ha/resource_types/Netscape_web/monitor /tmp/ipfile /dev/null # echo $? 1 |
As with all scripts, the output is logged to the /var/cluster/ha/log/script_hostname files. To check that the script has worked, use the tail(1) command to view the file as in the following example:
# tail /var/cluster/ha/log/script_cm1 Tue Oct 13 09:26:06.478 <ha_cilog script 10496:0> ./monitor[10340]: ./monitor called with /tmp/ipfile and /dev/null Tue Oct 13 09:26:06.674 <ha_cilog script 10380:0> ./monitor[10340]: pinging webserver on port 85 on host cm1-ha Tue Oct 13 09:26:36.708 <ha_cilog script 7210:0> ./monitor[10340]: Tue Oct 13 09:26:36.726 <ha_cilog script 10742:0> ./monitor[10340]: /usr/cluster/bin/ha_http_ping2 -p 85 cm1-ha exited with status 1 |
You can use the following procedure to test the restart script.
To test the restart script, enter the following command:
# ./start /tmp/ipfile /dev/null # /var/cluster/ha/resource_types/Netscape_web/start /tmp/ipfile /dev/null # echo $? 0 |
As with all scripts, the output is logged to the script log file, /var/cluster/ha/log/script_hostname. To check that the script has worked, use the tail(1) command to view the file as in the following example:
# tail /var/cluster/ha/log/script_cm1 Tue Oct 13 08:56:06.053 <ha_cilog script 7163:0> ./start[10520]: ./start called with /tmp/ipfile and /dev/null Tue Oct 13 08:56:06.292 <ha_cilog script 10048:0> ./start[10520]: pinging webserver on port 85 Tue Oct 13 08:56:36.359 <ha_cilog script 9786:0> ./start[10520]: Tue Oct 13 08:56:36.377 <ha_cilog script 10414:0> ./start[10520]: /usr/cluster/bin/ha_http_ping2 -p 85 cm1-ha exited with status 1 Tue Oct 13 08:56:36.405 <ha_cilog script 10798:0> ./start[10520]: starting the webserver server located at /usr/ns-home/failsafe-1/start Tue Oct 13 08:56:36.598 <ha_cilog script 10752:0> ./start[10520]: /usr/ns-home/failsafe-1/start > /var/cluster/ha/tmp/webstatus.10520 2>&1 exited with status 0 |
You can use the following procedure to test the exclusive and probe scripts.
To test the exclusive script, enter the following command:
# echo “cm1-ha” > tmp/ipfile # /var/cluster/ha/resource_types/Netscape_web/exclusive /tmp/ipfile /dev/null # echo $? 0 |
For the probe script, enter the following command:
# echo “cm1-ha” > tmp/ipfile # /var/cluster/ha/resource_types/Netscape_web/probe /tmp/ipfile /dev/null # echo $? 0 |
As with all scripts, the output is logged to the script log file, /var/cluster/ha/log/script_hostname. To check that the script has worked, use the tail(1) command to view the file as in the following example:
# tail /var/cluster/ha/log/script_cm1 Tue Oct 13 09:28:59.470 <ha_cilog script 10637:0> ./exclusive[10959]: ./exclusive called with /tmp/ipfile and /dev/null Tue Oct 13 09:28:59.666 <ha_cilog script 10002:0> ./exclusive[10959]: checking for webserver process running at /usr/ns-home/failsafe-1 Tue Oct 13 09:28:59.725 <ha_cilog script 7770:0> ./exclusive[10959]: /usr/cluster/bin/ha_exec2 -s 0 -t /usr/ns-home/failsafe-1 exited with status 0 Tue Oct 13 09:28:59.749 <ha_cilog script 10413:0> ./exclusive[10959]: Web server running from location /usr/ns-home/failsafe-1 Tue Oct 13 09:28:59.769 <ha_cilog script 10371:0> ./exclusive[10959]: resource cm1-ha exclusive status: RUNNING Tue Oct 13 09:30:01.180 <ha_cilog script 10599:0> ./probe[9353]: ./probe called with /tmp/ipfile and /dev/null Tue Oct 13 09:30:01.374 <ha_cilog script 10094:0> ./probe[9353]: checking for the failsafe root directory /usr/ns-home/failsafe-1 Tue Oct 13 09:30:01.393 <ha_cilog script 10505:0> ./probe[9353]: exited with status 0 Tue Oct 13 09:30:01.420 <ha_cilog script 10463:0> ./probe[9353]: checking for the web server default web document page /var/www/htdocs Tue Oct 13 09:30:01.438 <ha_cilog script 6240:0> ./probe[9353]: exited with status 0 # |
You can test the failover policy by using either cmgr or the GUI to move the resource group to another node in the cluster. To ensure that the resource group correctly failed over, use cmgr or the GUI to display the resource group states. The following example uses cmgr to test the failover policy:
cmgr> admin offline resource_group www in cluster eagan Resource group is changing state -- please wait cmgr> admin move resource_group www in cluster eagan to node cm2 Resource group is changing state -- please wait cmgr> admin online resource_group www in cluster eagan Resource group is changing state -- please wait |