Oracle® Solaris Cluster Data Services Developer's Guide

Exit Print View

Updated: July 2014, E39646-01
 
 

Declaring Resource Type Properties

The cluster administrator cannot configure the resource type properties that you declare in the RTR file. They become part of the permanent configuration of the resource type.


Note - Only a cluster administrator can configure the resource type property Installed_nodes. You cannot declare Installed_nodes in the RTR file.

The syntax of resource type declarations is as follows:

property-name = value;

Note - Property names for resource groups, resources, and resource types are not case sensitive. You can use any combination of uppercase and lowercase letters when you specify property names.

These are resource type declarations in the RTR file for a sample (smpl) data service:

# Oracle Solaris Cluster Data Services Builder template version 1.0
# Registration information and resources for smpl
#
#NOTE: Keywords are case insensitive, i.e., you can use
#any capitalization style you prefer.
#
Resource_type = "smpl";
Vendor_id = ORCL;
RT_description = "Sample Service on Oracle Solaris Cluster";

RT_version ="1.0";
API_version = 2;
Failover = FALSE;

Init_nodes = RG_PRIMARIES;

RT_basedir=/opt/ORCLsmpl/bin;

Start           =    smpl_svc_start;
Stop            =    smpl_svc_stop;

Validate        =    smpl_validate;
Update          =    smpl_update;

Monitor_start   =    smpl_monitor_start;
Monitor_stop    =    smpl_monitor_stop;
Monitor_check   =    smpl_monitor_check;

Tip  - You must declare the Resource_type property as the first entry in the RTR file. Otherwise, registration of the resource type fails.

The first set of resource type declarations provide basic information about the resource type.

Resource_type and Vendor_id

Provide a name for the resource type. You can specify the resource type name with the Resource_type property alone (smpl) or by using the Vendor_id property as a prefix with a period (.) separating it from the resource type (ORCL.smpl), as shown in the sample. If you use Vendor_id, make it the stock market symbol of the company that is defining the resource type. The resource type name must be unique in the cluster.


Note - By convention, the resource type name (vendoridApplicationname) is used as the package name. The combination of vendor ID and application name can exceed nine characters.

Agent Builder, on the other hand, in all cases explicitly generates the package name from the resource type name, so it enforces the nine-character limit.


RT_description

Briefly describes the resource type.

RT_version

Identifies the version of the sample data service.

API_version

Identifies the version of the API. For example, API_version = 11 indicates that the data service can be registered on any version of Oracle Solaris Cluster starting with Oracle Solaris Cluster 3.3, assuming that the application is compatible with that version of Oracle Solaris Cluster software. However, API_version = 11 also indicates that the data service cannot be registered on any version of Oracle Solaris Cluster that was released before Oracle Solaris Cluster 3.3. This property is described in more detail under the entry for API_version in Resource Type Properties.

Failover = FALSE

Indicates that the data service can run in a resource group that can be online on multiple nodes at the same time. In other words, this declaration specifies a multi-master data service. This property is described in more detail under the entry for Failover in Resource Type Properties.

Start, Stop, and Validate

Provide the paths to the respective callback method programs that are called by the RGM. These paths are relative to the directory that is specified by RT_basedir.

The remaining resource type declarations provide configuration information.

Init_nodes = RG_PRIMARIES

Specifies that the RGM call the Init, Boot, Fini, and Validate methods only on nodes that can master the data service. The nodes that are specified by RG_PRIMARIES are a subset of all nodes on which the data service is installed. Set the value to RT_INSTALLED_NODES to specify that the RGM call these methods on all nodes on which the data service is installed.

RT_basedir

Points to /opt/ORCLsample/bin as the directory path to complete relative paths, such as callback method paths.

Start, Stop, and Validate

Provide the paths to the respective callback method programs that are called by the RGM. These paths are relative to the directory that is specified by RT_basedir.

See the rt_properties(5) man page for more information about resource type properties. See the clresourcetype(1CL) man page for more information about registering resource types in the global cluster or in a zone cluster.