The sample RTR file begins with comments followed by resource type properties that define the HA-DNS configuration, as shown in the following listing.
# # Copyright (c) 1998-2004 by Sun Microsystems, Inc. # All rights reserved. # # Registration information for Domain Name Service (DNS) # #pragma ident “@(#)SUNW.sample 1.1 00/05/24 SMI” RESOURCE_TYPE = “sample”; VENDOR_ID = SUNW; RT_DESCRIPTION = “Domain Name Service on Sun Cluster”; RT_VERSION =”1.0”; API_VERSION = 2; FAILOVER = TRUE; RT_BASEDIR=/opt/SUNWsample/bin; PKGLIST = SUNWsample; START = dns_svc_start; STOP = dns_svc_stop; VALIDATE = dns_validate; UPDATE = dns_update; MONITOR_START = dns_monitor_start; MONITOR_STOP = dns_monitor_stop; MONITOR_CHECK = dns_monitor_check;
You must declare the Resource_type property as the first entry in the RTR file. Otherwise, registration of the resource type will fail.
The RGM treats property names as case insensitive. The convention for properties in Sun-supplied RTR files, with the exception of method names, is uppercase for the first letter of the name and lowercase for the rest of the name. Method names—as well as property attributes—contain all uppercase letters.
Some information about these properties follows.
The resource type name can be specified by the Resource_type property alone (sample) or using the Vendor_id as a prefix with a “.” separating it from the resource type (SUNW.sample).
If you use Vendor_id, make it the stock symbol for the company defining the resource type. The resource type name must be unique in the cluster.
The Rt_version property identifies the version of the sample data service as specified by the vendor.
The API_version property identifies the Sun Cluster version. For example, API_version = 2, indicates that the data service runs under Sun Cluster version 3.0.
Failover = TRUE indicates that the data service cannot run in a resource group that can be online on multiple nodes at once.
RT_basedir points to /opt/SUNWsample/bin as the directory path to complete relative paths, such as callback method paths.
Start, Stop, Validate, and so on provide the paths to the respective callback method programs invoked by the RGM. These paths are relative to the directory specified by RT_basedir.
Pkglist identifies SUNWsample as the package that contains the sample data service installation.
Resource type properties not specified in this RTR file, such as Single_instance, Init_nodes, and Installed_nodes, get their default value. See Table A–1 for a complete list of the resource type properties, including their default values.
The cluster administrator cannot change the values specified for resource type properties in the RTR file.