Veritas Cluster Server configuration

Veritas Cluster Server software is not provided by IBM®. Customers who want to use VCS must purchase it from Symantec and install it on their own. See the Veritas Cluster Server documentation for details on installing, configuring and operating VCS, and hardware requirements for Linux.

To configure HA for DevOps Code ClearCase®, create a VCS failover service group with the following resources:

  • NIC resource - to monitor the public network interface
  • IP resource - to create the virtual IP address for the server.
    Note: Before creating the virtual IP address, assign a static IP address and hostname for the service group and add it to the local DNS server
  • Mount resource - for file system mount points for shared storage. (Not needed if the shared storage is on a NAS device.)
  • Application resource - to start, stop and monitor DevOps Code ClearCase

A VCS application resource includes the StartProgram, StopProgram, CleanProgram and MonitorProcesses attributes. The DevOps Code ClearCase application resource should use these attributes. The StartProgram, StopProgram and CleanProgram attributes must be local executables on each cluster node. They must ensure that all DevOps Code ClearCase processes have stopped on the master node before starting DevOps Code ClearCase on the standby node. The MonitorProcesses attribute should be set to /opt/devops/clearcase/etc/albd_server, in order to monitor whether DevOps Code ClearCase is still running.

The following scripts are not installed with DevOps Code ClearCase, but are provided here as an example.

StartProgram (cconline)

#! /bin/ksh 
# cconline - Start ClearCase 
# 
if [  ! -f /opt/devops/code/clearcase/bin/cleartool ] ; then
   echo "this is not a ClearCase host"
   exit 
fi  

# Start ClearCase 
/opt/devops/code/clearcase/etc/ClearCase start  

# Make a registry master server 
# (Only needed if the registry server is part of the VCS service group.)
/opt/devops/code/clearcase/bin/cleartool setrgysvrtype –master

StopProgram (ccoffline)

#! /bin/ksh 
# ccoffline - Stop ClearCase cleanly, wait for all ClearCase processes to exit 
# 
PSOPTS="-ef"  

if [  ! -f /opt/devops/code/clearcase/bin/cleartool ] ; then
   echo "this is not a ClearCase host"
   exit 
fi  

# Demote the registry master to standby 
# (Only needed if the registry server is part of the VCS service group.)
/opt/devops/code/clearcase/bin/cleartool setrgysvrtype –standby  

# Stop ClearCase 
/opt/devops/code/clearcase/etc/clearcase stop  
# Wait for all ClearCase processes to exit 
ccend="0" 
while [ "$ccend" == 0 ] 
do
     PID=`ps $PSOPTS | egrep 
'(albd_server|admin_server|ccfs_server|credmap_server|db_server|mntrpc_server
|msadm_server|promote_server|shipping_server|view_server|vob_server
|vobrpc_server)' | grep -v grep`
     if [ "${PID}" == "" ] ; then
         echo "ClearCase servers have exited."
         ccend="1"
     else
         sleep 1
     fi 
done

CleanProgram (ccclean)

#! /bin/ksh 
# cclean - Clean up all ClearCase processes after a fault. 
# 
PSOPTS="-ef"  

if [  ! -f /opt/devops/code/clearcase/bin/cleartool ] ; then
   echo this is not a ClearCase host
   exit 
fi  

# Attempt to stop ClearCase cleanly 
PID=`ps $PSOPTS | grep albd_server | grep -v grep` 
if [ "${PID}" != "" ] ; then
    /opt/devops/code/clearcase/etc/clearcase stop 
fi  

# Make sure all ClearCase processes have stopped 
ccend="0" 
while [ "$ccend" == 0 ] 
do
     PID=`ps $PSOPTS | egrep '(albd_server|admin_server|ccfs_server|credmap_server
|db_server|mntrpc_server|msadm_server|promote_server|shipping_server|view_server|vob_server|vobrpc_server)' | grep -v grep`
     if [ "${PID}" != "" ] ; then
         echo "Attempting to kill ClearCase servers."
         pkill albd_server
         pkill admin_server
         pkill ccfs_server
         pkill credmap_server
         pkill db_server
         pkill mntrpc_server
         pkill msadm_server
         pkill promote_server
         pkill shipping_server
         pkill view_server
         pkill vob_server
         pkill vobrpc_server
         sleep 1
     else
         echo "ClearCase servers have exited."
         ccend="1"
     fi 
done

Sample VCS configuration

The following is a sample VCS configuration file (/etc/VRTSvcs/conf/config/main.cf), which includes a DevOps Code ClearCase service group and resources. In this example, the sample scripts in previous sections were created in the /etc/VRTSvcs directory, but could be placed in any directory that is accessible by root.

include "types.cf"  

cluster vcs1 (
 	UserNames = { admin = annOniNhoInwMr }
 	ClusterAddress = "19.34.112.245"
 	Administrators = { admin }
 	CredRenewFrequency = 0
 	CounterInterval = 5
 	)  

system hanode1 (
 	)  

system hanode2 (
 	)  

group ClearCase (
 	SystemList = { hanode1 = 0, hanode2 = 1 }
 	AutoStartList = { hanode1 }
 	)  	

Application CC (
 		StartProgram = "/etc/VRTSvcs/cconline"
 		StopProgram = "/etc/VRTSvcs/ccoffline"
 		CleanProgram = "/etc/VRTSvcs/ccclean"
 		MonitorProcesses = { "/opt/devops/code/clearcase/etc/albd_server" }
 		)
  	IP CC-IP (
 		Device @hanode1 = hme0
 		Device @hanode2 = hme0
 		Address = "19.34.112.235"
 		)

  	NIC CC-NIC (
 		Device @hanode1 = hme0
 		Device @hanode2 = hme0
 		)
  	CC requires CC-IP
 	CC-IP requires CC-NIC

  // resource dependency tree
 	//
 	//	group ClearCase
 	//	{
 	//	Application CC
 	//	    {
 	//	    IP CC-IP
 	//	        {
 	//	        NIC CC-NIC
 	//	        }
 	//	    }
 	//	}   

group ClusterService (
 	SystemList = { hanode2 = 0, hanode1 = 1 }
 	UserStrGlobal = "vcs1_14141@https://19.34.112.28:8443;vcs1_14141@https://19.34.112.30:8443;"
 	AutoStartList = { hanode2, hanode1 }
 	OnlineRetryLimit = 3
 	OnlineRetryInterval = 120
 	)

  	IP webip (
 		Device = hme0
 		Address = "19.34.112.245"
 		NetMask = "255.255.252.0"
 		)

  	NIC csgnic (
 		Device = hme0
 		)
  	NotifierMngr ntfr (
 		SmtpServer = "smtp.server.com"
 		SmtpRecipients = { "user@address.com" = Information }
 		)
  	VRTSWebApp VCSweb (
 		Critical = 0
 		AppName = vcs
 		InstallDir = "/opt/VRTSweb/VERITAS"
 		TimeForOnline = 5
 		RestartLimit = 3
 		)
  	VCSweb requires webip
 	ntfr requires csgnic
 	webip requires csgnic

  // resource dependency tree
 	//
 	//	group ClusterService
 	//	{
 	//	VRTSWebApp VCSweb
 	//	    {
 	//	    IP webip
 	//	        {
 	//	        NIC csgnic
 	//	        }
 	//	    }
 	//	NotifierMngr ntfr
 	//	    {
 	//	    NIC csgnic
 	//	    }
 	//	}