Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Solaris Cluster Data Services Developer's Guide Oracle Solaris Cluster 4.0 |
1. Overview of Resource Management
3. Resource Management API Reference
Overview of Modifying a Resource Type
Setting Up the Contents of the Resource Type Registration File
What Happens When a Cluster Administrator Upgrades
Determining Installation Requirements and Packaging
Before You Change the RTR File
Determining the Packaging Scheme to Use
Documentation to Provide for a Modified Resource Type
Information About What to Do Before Installing an Upgrade
Information About When to Upgrade Resources
Information About Changes to Resource Properties
6. Data Service Development Library
8. Sample DSDL Resource Type Implementation
9. Oracle Solaris Cluster Agent Builder
12. Cluster Reconfiguration Notification Protocol
A. Sample Data Service Code Listings
B. DSDL Sample Resource Type Code Listings
C. Requirements for Non-Cluster-Aware Applications
D. Document Type Definitions for the CRNP
This section describes how to set up a resource type registration file.
This section covers the following topics:
The three components of a resource type name are properties that are specified in the RTR file as vendor-id, resource-type, and rt-version. The clresourcetype(1CL) command inserts the period and the colon delimiters to create the name of the resource type:
vendor-id.resource-type:rt-version
The vendor-id prefix serves to distinguish between two registration files of the same name that different companies provide. To ensure that the vendor-id is unique, use the stock symbol of the company when creating the resource type. The rt-version distinguishes between multiple registered versions (upgrades) of the same base resource type.
You can obtain the fully qualified resource type name by typing the following command:
# scha_resource_get -O Type -R resource-name -G resource-group-name
The format of resource type names is described in Format of Resource Type Names.
Existing resources can be upgraded at run time to a new upgrade-aware version of their resource type. However, if the new resource type version is non-upgrade-aware, you would have to delete and re-create any existing resources of that type to move them to the new version. Therefore, new resource types should always include the #$upgrade directive.
To ensure that the resource type that you are modifying is upgrade-aware, include the #$upgrade directive in the resource type's RTR file. After the #$upgrade directive, add zero or more #$upgrade_from directives for each earlier version of the resource type that you want to support.
The #$upgrade and #$upgrade_from directives must appear between the resource type property declarations and the resource declarations sections in the RTR file. See the rt_reg(4) man page.
Example 4-1 #$upgrade_from Directive in an RTR File
#$upgrade #$upgrade_from "1.1" WHEN_OFFLINE #$upgrade_from "1.2" WHEN_OFFLINE #$upgrade_from "1.3" WHEN_OFFLINE #$upgrade_from "2.0" WHEN_UNMONITORED #$upgrade_from "2.1" ANYTIME #$upgrade_from "" WHEN_UNMANAGED
The format of the #$upgrade_from directive is as follows:
#$upgrade_from version tunability
The RT_version. If any resource type does not have a version, or for versions other than what you defined previously in the RTR file, specify the empty string (“”).
The conditions under which, or when, the cluster administrator can upgrade the specified RT_version.
Use the following tunability values in the #$upgrade_from directives:
Use when there are no restrictions on when the cluster administrator can upgrade the resource. The resource can be completely online during the upgrade.
Use when the new resource type version's methods are as follows:
The Update, Stop, Monitor_check, and Postnet_stop methods are compatible with the older resource type version's starting methods (Prenet_stop and Start)
The Fini method is compatible with the Init method of older versions
The cluster administrator must only stop the resource monitor program before upgrading.
Use when the new resource type version's Update, Stop, Monitor_check, or Postnet_stop method is as follows:
Compatible with the Init method of an older version
Incompatible with an older resource type version's starting methods (Prenet_stop and Start)
The cluster administrator must take the resource offline before upgrading.
Similar to WHEN_OFFLINE. However, the cluster administrator must disable the resource before upgrading.
Use when the new resource type version's Fini method is incompatible with the Init method of an older version. The cluster administrator must switch the existing resource group to the unmanaged state before upgrading.
If a version of the resource type does not appear in the list of #$upgrade_from directives, the RGM imposes the tunability of WHEN_UNMANAGED to that version by default.
Use to prevent existing resources from being upgraded to the new version of the resource type. The cluster administrator must delete and re-create a resource.
You only need to change the RT_version property in an RTR file whenever the contents of the RTR file change. Choose a value for this property that clearly indicates that this version of the resource type is the latest version.
Do not include the following characters in the RT_version string in the RTR file or registration of the resource type fails:
Space
Tab
Slash (/)
Backslash (\)
Asterisk (*)
Question mark (?)
Comma (,)
Semicolon (;)
Left square bracket ([)
Right square bracket (])
The RT_version property is required.