| 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 using the Vendor_id as a prefix with a "." separating it from the resource type (SUNW.smpl), as in the 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. Note - By convention, the resource type name (Resource_typeVendor_id) is used as the package name. Package names are limited to nine characters, so it is a good idea to limit the total number of characters in these two properties to nine or fewer characters, though the RGM does not enforce this limit. Agent Builder, on the other hand, explicitly generates the package name from the resource type name, so it does enforce the nine character limit. |
| Rt_version | Identifies the version of the sample data service. |
| API_version | Identifies the version of the API. 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, that is, specifies a failover data service. See Transferring a Data Service to a Cluster for more information. |
| Start, Stop, Validate, and so on | Provide the paths to the respective callback method programs called by the RGM. These paths are relative to the directory specified by RT_basedir. |
The remaining resource type declarations provide configuration information, as follows:
| 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 specified by RG_PRIMARIES is 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 all nodes on which the data service is installed. |
| 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 called by the RGM. These paths are relative to the directory specified by RT_basedir. |
Declaring Resource Properties
As with resource type properties, you declare resource properties in the RTR file. By convention, resource property declarations follow the resource type declarations in the RTR file. The syntax for resource declarations is a set of attribute value pairs enclosed by curly brackets:
{
Attribute = Value;
Attribute = Value;
.
.
.
Attribute = Value;
} |
For resource properties provided by Sun Cluster, so-called system-defined properties, you can change specific attributes in the RTR file. For example, Sun Cluster provides method timeout properties for each of the callback methods, and specifies default values. In the RTR file, you can specify different default values.
You can also define new resource properties in the RTR file, so-called extension properties, using a set of property attributes provided by Sun Cluster. Table A-4 lists the attributes for changing and defining resource properties. Extension property declarations follow the system-defined property declarations in the RTR file.
The first set of system-defined resource properties specifies timeout values for the callback methods:
...
# Resource property declarations appear as a list of bracketed
# entries after the resource-type declarations. The property
# name declaration must be the first attribute after the open
# curly bracket of a resource property entry.
#
# Set minimum and default for method timeouts.
{
PROPERTY = Start_timeout;
MIN=60;
DEFAULT=300;
}
{
PROPERTY = Stop_timeout;
MIN=60;
DEFAULT=300;
}
{
PROPERTY = Validate_timeout;
MIN=60;
DEFAULT=300;
}
{
PROPERTY = Update_timeout;
MIN=60;
DEFAULT=300;
}
{
PROPERTY = Monitor_Start_timeout;
MIN=60;
DEFAULT=300;
}
{
PROPERTY = Monitor_Stop_timeout;
MIN=60;
DEFAULT=300;
{
PROPERTY = Monitor_Check_timeout;
MIN=60;
DEFAULT=300;
} |
The name of the property (PROPERTY = value) must be the first attribute for each resource-property declaration. You can configure resource properties, within limits defined by the property attributes in the RTR file. For example, the default value for each method timeout in the sample is 300 seconds. An administrator can change this value; however, the minimum allowable value, specified by the MIN attribute, is 60 seconds. See Table A-4 for a complete list of resource property attributes.
The next set of resource properties defines properties that have specific uses in the data service.
{
PROPERTY = Failover_mode;
DEFAULT=SOFT;
TUNABLE = ANYTIME;
}
{
PROPERTY = Thorough_Probe_Interval;
MIN=1;
MAX=3600;
DEFAULT=60;
TUNABLE = ANYTIME;
}
# The number of retries to be done within a certain period before concluding
# that the application cannot be successfully started on this node.
{
PROPERTY = Retry_Count;
MAX=10;
DEFAULT=2;
TUNABLE = ANYTIME;
}
# Set Retry_Interval as a multiple of 60 since it is converted from seconds
# to minutes, rounding up. For example, a value of 50 (seconds)
# is converted to 1 minute. Use this property to time the number of
# retries (Retry_Count).
{
PROPERTY = Retry_Interval;
MAX=3600;
DEFAULT=300;
TUNABLE = ANYTIME;
}
{
PROPERTY = Network_resources_used;
TUNABLE = WHEN_DISABLED;
DEFAULT = "";
}
{
PROPERTY = Scalable;
DEFAULT = FALSE;
TUNABLE = AT_CREATION;
}
{
PROPERTY = Load_balancing_policy;
DEFAULT = LB_WEIGHTED;
TUNABLE = AT_CREATION;
}
{
PROPERTY = Load_balancing_weights;
DEFAULT = "";
TUNABLE = ANYTIME;
}
{
PROPERTY = Port_list;
TUNABLE = AT_CREATION;
DEFAULT = ;
} |



