This procedure describes how to use the Oracle Solaris Cluster maintenance commands to register and configure HA for Oracle Traffic Director with one or more failover logical hostnames.
To perform this procedure, you must have the following information.
The name of the resource type for HA for Oracle Traffic Director. This name is ORCL.otd.
The names of the cluster nodes on which Oracle Traffic Director is installed and running.
The logical hostname (for failover services) that clients use to access the data service.
The path to the Oracle Traffic Director instances. You can install the Oracle Traffic Director binaries on the local disks or the cluster file system. See Configuration Guidelines for Oracle Solaris Cluster Data Services in Oracle Solaris Cluster Data Services Planning and Administration Guide for a discussion of the advantages and disadvantages of each location.
When using a logical hostname, you must configure Oracle Traffic Director to bind to INADDR_ANY since the logicial hostnames are available on only one node at a time. The fault monitor probes the local hostname when used with a logical hostname unless overridden by the Server_URL extension property.
# clresourcetype register ORCL.otd
You can optionally select the set of nodes on which the data service can run with the –n option.
# clresourcegroup create [-n node[,…]] resource-group
Specifies the name of the failover logical hostname resource group. This name can be your choice but must be unique for resource groups within the cluster.
Specifies a comma-separated, ordered list of nodes that can master this resource group.
This list is optional. If you omit this list, the global zone of each cluster node can master the resource group.
You should have performed this verification during the Oracle Solaris Cluster installation. See the planning chapter in the Oracle Solaris Cluster Software Installation Guide for details.
# clreslogicalhostname create -g resource-group \ -h logical-hostname[,…] \ [-N netiflist] \ resource
Specifies the name of the failover resource group.
Specifies a comma-separated list of logical hostnames that this resource is to make available.
Specifies an optional, comma-separated list that identifies the IPMP groups that are on each node. The format of each entry in the list is netif@node. The replaceable items in this format are as follows:
Specifies an IPMP group name, such as sc_ipmp0, or a public network interface card (NIC). If you specify a public NIC, Oracle Solaris Cluster attempts to create the required IPMP groups.
Specifies the name or ID of a node.
This list is optional. If you omit this list, Oracle Solaris Cluster attempts to create the required IPMP groups.
Specifies the name of the resource.
# clresourcegroup online -emM resource-group
# clresourcegroup create -p Maximum_primaries=m \ -p Desired_primaries=n \ scalable-resource-group
Specifies the maximum number of active primary nodes allowed for this resource group. If you do not assign a value to this property, the default is 1.
Specifies the desired number of active primary nodes allowed for this resource group. If you do not assign a value to this property, the default is 1.
Specifies the scalable resource group.
# clresourcegroup create -S resource-group
You can repeat this step to add multiple application resources to the same resource group.
# clresource create -g resource-group \ -t resource-type \ -p ORACLE_HOME=oracle-traffic-director-installation-directory \ -p INSTANCE_HOME=instance-directory \ -p Port_list=port-number/protocol \ resource
Specifies the name of the failover resource group into which the resources are to be placed.
Specifies the type of the resource to add.
Specifies the directory where the Oracle Traffic Director software has been installed. This is a per-node setting and if the location is different on each node, each node must be qualified with the node name. For example:
-p ORACLE_HOME{node1}=oracle-traffic-director-installation-directory-node1 \ -p ORACLE_HOME{node2}=oracle-traffic-director-installation-directory-node2
Specifies the directory where the Oracle Traffic Director instance configuration is located. This is a per-node setting and if the location is different on each node, each node must be qualified with the node name. For example:
-p INSTANCE_HOME{node1}=instance-directory-node1 \ -p INSTANCE_HOME{node2}=instance-directory-node2
Specifies a comma-separated list of port numbers and protocol to use, for example, 80/tcp and 81/tcp.
Specifies the name of the resource to add.
The resource is created in the enabled state.
# clresourcegroup set \ -p RG_affinities+=+++instance-resource-group logical-hostname-resource-group
Specifies the name of the Oracle Traffic Director instance resource group.
Specifies the name of the failover logical hostname resource group.
# clresourcegroup online -eM resource-group
Specifies the name of the scalable application resource group.
# clresource set -p Resource_dependencies_offline_restart+=instance-resource{local_node} / logical-hostname-resource
Specifies the name of the Oracle Traffic Director instance resource.
Specifies the name of the failover logical hostname resource.
This example creates an Oracle Traffic Director resource, otd-rs, in a resource group, otd-rg. It is configured to run simultaneously on all the four nodes of a four-node cluster.
In an agent configuration where a logical hostname is being used, the Oracle Traffic Director instances must be configured to listen on all addresses, INADDR_ANY, which allows the fault monitor to connect to the localhost address of each node using the default Port_List, 80/tcp. The clients use the IP addresses as configured in a logical hostname resource, lh-rs, which is contained in the resource group, lh-rg. The hostname otd-a-lh is configured in the naming service used by the cluster and in any of the clients that will be accessing the server instances.
Ensure that the /etc/netmasks file has IP-address subnet and netmask entries for all logical hostnames. If necessary, edit the /etc/netmasks file to add any missing entries.
To create a logical hostname in this example:
# clresourcegroup create -p Nodelist="node1,node2,node3,node4" \ -p Failback=True lh-rg # clreslogicalhostname create -g lh-rg -h otd-a-lh lh-rs # clresourcegroup online -eM lh-rg
To facilitate the automatic failover of the logical hostname to a node that has a running instance of Oracle Traffic Director:
The logical hostname resource group must have a strong positive affinity with fail-over delegation to the Oracle Traffic Director resource group.
The logical hostname resource must also have an offline-restart dependency on the Oracle Traffic Director resource with a local-node scope.
To create the Oracle Traffic Director resource group and resource, do the following:
# clresourcegroup create -S otd-rg # clresourcetype register ORCL.otd # clresource create -g otd-rg -t ORCL.otd \ -p ORACLE_HOME=/global/otd/otd-home \ -p INSTANCE_HOME{node1}= /global/otd/otd-1/net-otd-a \ -p INSTANCE_HOME{node2}= /global/otd/otd-2/net-otd-a \ -p INSTANCE_HOME{node3}= /global/otd/otd-3/net-otd-a \ -p INSTANCE_HOME{node4}= /global/otd/otd-4/net-otd-a \ -p Resource_dependencies_offline_restart=otd-gfs-rs \ -p Port_List=80/tcp \ otd-rs # clresource set -p Resource_dependencies_offline_restart+= otd-rs{local_node} lh-rs # clresourcegroup online -eM otd-rg # clresourcegroup set -p RG_affinities+=+++otd-rg lh-rg