Hitachi

uCosminexus Application Server HTTP Server User Guide


D.4 MC/ServiceGuard settings

Define HTTP Server, and related programs as necessary, for the packages. For more information and points not covered here, see the MC/ServiceGuard documentation.

Organization of this subsection

(1) Cluster configuration and package configuration

Examples of a cluster configuration and package configuration are as follows.

(a) Example of a cluster configuration

CLUSTER_NAME cluster1
FIRST_CLUSTER_LOCK_VG /dev/vg01
NODE_NAME original_node
NETWORK_INTERFACE lan0
HEARTBEAT_IP 172.16.1.1
FIRST_CLUSTER_LOCK_PV /dev/dsk/c1t2d0
NODE_NAME adoptive_node
NETWORK_INTERFACE lan0
HEARTBEAT_IP 172.16.1.2
FIRST_CLUSTER_LOCK_PV /dev/dsk/c1t2d0
HEARTBEAT_INTERVAL 1000000
NODE_TIMEOUT 2000000
AUTO_START_TIMEOUT 600000000
NETWORK_POLLING_INTERVAL 2000000
MAX_CONFIGURED_PACKAGES 10
VOLUME_GROUP /dev/vg01

(b) Example of a package configuration

PACKAGE_NAME CosminexusHTTPServer
FAILOVER_POLICY CONFIGURED_NODE
FAILBACK_POLICY MANUAL
NODE_NAME original_node
NODE_NAME adoptive_node
RUN_SCRIPT /etc/cmcluster/CosminexusHTTPServer/control.sh
RUN_SCRIPT_TIMEOUT NO_TIMEOUT
HALT_SCRIPT /etc/cmcluster/CosminexusHTTPServer/control.sh
HALT_SCRIPT_TIMEOUT NO_TIMEOUT
SERVICE_NAME httpsd_check
SERVICE_FAIL_FAST_ENABLED NO
SERVICE_HALT_TIMEOUT 300
SUBNET 172.16.1.0
PKG_SWITCHING_ENABLED YES
NET_SWITCHING_ENABLED YES
NODE_FAIL_FAST_ENABLED NO

(2) Writing a package control script

This section explains how to write a package control script when you want HTTP Server to be monitored. For cases other than those described below, the settings differ based on the system.

(a) Storing a script

Store the shell script httpsd_monitor you have created as a service to be monitored by MC/ServiceGuard. The following example assumes that httpsd_monitor is stored in /opt/hitachi/httpsd/bin.

Note that the same value for the PidFile directive specified in HTTP Server configuration file must be specified in the httpsd_monitor argument. You do not need to store SERVER_NAME and SERVER_CMD if the HTTP Server is not to be monitored.

PATH=/sbin:/usr/bin:/usr/sbin:/etc:/bin
VGCHANGE="vgchange -a e"
VG[0]=/dev/vg01
LV[0]=/dev/vg01/lvol1
FS[0]=/MCSG
FS_MOUNT_OPT[0]="-o rw"
IP[0]=172.16.1.3
SUBNET[0]=172.16.1.0
SERVICE_NAME[0]="httpsd_check"
SERVICE_CMD[0]="/opt/hitachi/httpsd/bin/httpsd_monitor
                /opt/hitachi/httpsd/logs/httpd.pid"
SERVICE_RESTART[0]="-r 0"

(b) Defining a function

Define processes to start or stop HTTP Server in the function customer_defined_run_cmds in the package control script (to start the package) or in the function customer_defined_halt_cmds (to stop the package).

To start:

function customer_defined_run_cmds
{
# ADD customer defined run commands.
: # do nothing instruction, because a function must contain some command.
  /opt/hitachi/httpsd/sbin/httpsdctl start 
  test_return 51
}

To stop:

function customer_defined_halt_cmds
{
# ADD customer defined halt commands.
: # do nothing instruction, because a function must contain some command.
  /opt/hitachi/httpsd/sbin/httpsdctl stop 
test_return 52
}

(3) Notes

When a failover to another node occurs, normal HTTP connections and connections using SSL are all disconnected, and these are not taken over by the standby node. In this case, the clients need to be reconnected.