Go to main content

Oracle® Solaris Cluster Data Service for Oracle Traffic Director Guide

Exit Print View

Updated: July 2014, E35577–01
 
 

How to Register and Configure HA for Oracle Traffic Director With a Failover Logical Host

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.


Note -  Perform this procedure on any cluster member.

Note -  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.
  1. On a cluster member, become an administrator that provides solaris.cluster.modify and solaris.cluster.admin authorization.
  2. Register the ORCL.otd resource type for HA for Oracle Traffic Director.
    # clresourcetype register ORCL.otd
  3. Create a failover resource group for the logical hostname.

    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
    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.

    –n node[,…]

    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.

  4. Verify that all of the network addresses that you use have been added to your name service database.

    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.


    Note -  To avoid any failures because of name service lookup, ensure that all logical hostnames and shared addresses are present in the server's and client's /etc/inet/hosts file. Configure name service mapping in /etc/nsswitch.conf on the servers to first check the local files before trying to access NIS or NIS+.
  5. Add a logical hostname to the failover resource group.
    # clreslogicalhostname create -g resource-group \
    -h logical-hostname[,…] \
    [-N netiflist] \
    resource
    –g resource-group

    Specifies the name of the failover resource group.

    –h logical-hostname[,…]

    Specifies a comma-separated list of logical hostnames that this resource is to make available.

    –N netiflist

    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:

    netif

    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.

    node

    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.


    Note -  If you require a fully qualified hostname, you must specify the fully qualified name with the -h option and you cannot use the fully qualified form in the resource name.

    Note -  Oracle Solaris Cluster does not currently support using the adapter name for netif.
    resource

    Specifies the name of the resource.

  6. Bring the failover logical host resource group online.
    # clresourcegroup online -emM resource-group
  7. Configure the Oracle Traffic Director server instance that uses the failover logical host.
  8. Create a scalable application resource group.
    # clresourcegroup create -p Maximum_primaries=m \
    -p Desired_primaries=n \
    scalable-resource-group
    –p Maximum_primaries=m

    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.

    –p Desired_primaries=n

    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.

    scalable-resource-group

    Specifies the scalable resource group.


    Note -  If the value of the Maximum_primaries is equal to the value of the Desired_primaries, and if that number is equal to the number of nodes in the nodes list, then you can substitute the -p Maximum_primaries=m \ -p Desired_primaries=n options with the –S option. For example:
    # clresourcegroup create -S resource-group

  9. Add an application resource to the application 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
    –g resource-group

    Specifies the name of the failover resource group into which the resources are to be placed.

    –t resource-type

    Specifies the type of the resource to add.

    –p ORACLE_HOME=oracle-traffic-director-installation-directory

    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
    –p INSTANCE_HOME=instance-directory

    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
    –p Port_list=port-number/protocol

    Specifies a comma-separated list of port numbers and protocol to use, for example, 80/tcp and 81/tcp.

    resource

    Specifies the name of the resource to add.

    The resource is created in the enabled state.


    Note -  Optionally, you can set additional extension properties that belong to the HA for Oracle Traffic Director to override the default values of the properties. See Appendix A, HA for Oracle Traffic Director Extension Properties for a list of these properties.
  10. Create a strong positive affinity with delgated failover from the logical hostname resource group to the Oracle Traffic Director instance resource group.
    # clresourcegroup set \
    -p RG_affinities+=+++instance-resource-group logical-hostname-resource-group
    instance-resource-group

    Specifies the name of the Oracle Traffic Director instance resource group.

    logical-hostname-resource-group

    Specifies the name of the failover logical hostname resource group.

  11. Bring the scalable application resource group online.
    # clresourcegroup online -eM resource-group 
    resource-group

    Specifies the name of the scalable application resource group.

  12. Create a local node offline restart dependency from the logical hostname resource to the Oracle Traffic Director instance resource.
    # clresource set -p Resource_dependencies_offline_restart+=instance-resource{local_node} /
    logical-hostname-resource
    instance-resource

    Specifies the name of the Oracle Traffic Director instance resource.

    logical-hostname-resource

    Specifies the name of the failover logical hostname resource.

Example 1  Creating an Oracle Traffic Director Resource for Use With a Failover Logical Hostname

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