Sun Cluster 数据服务开发者指南(适用于 Solaris OS)

RTR 文件样例中的资源特性

按照惯例,在 RTR 文件中声明资源类型特性之后声明资源特性。 资源特性包括由 Sun Cluster 提供的系统定义的特性和由您定义的扩展特性。 对于每一种类型,您都可以指定多个由 Sun Cluster 提供的特性属性,例如最小值、最大值和缺省值。

RTR 文件中的系统定义的特性

下面列出了 RTR 文件样例中的系统定义的特性。

# A list of bracketed resource property declarations follows the 
# resource-type declarations. The property-name declaration must be
# the first attribute after the open curly bracket of each entry.

# The <method>_timeout properties set the value in seconds after which 
# the RGM concludes invocation of the method has failed. 

# The MIN value for all method timeouts is set to 60 seconds. This 
# prevents administrators from setting shorter timeouts, which do not 
# improve switchover/failover performance, and can lead to undesired 
# RGM actions (false failovers, node reboot, or moving the resource group 
# to ERROR_STOP_FAILED state, requiring operator intervention). Setting
# too-short method timeouts leads to a *decrease* in overall availability 
# of the data service.
{  
   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 = 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;
        MIN=0;
        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;
        MIN=60;
        MAX=3600;
        DEFAULT=300;
        TUNABLE = ANYTIME;
}

{
        PROPERTY = Network_resources_used;
        TUNABLE = AT_CREATION;
        DEFAULT = ““;
}

虽然 Sun Cluster 提供了系统定义的特性,但是您也可以使用资源特性属性设置不同的缺省值。 要获得可应用于资源特性的属性的完整列表,请参阅资源特性属性

请注意以下有关 RTR 文件样例中的系统定义的资源特性的信息:

RTR 文件中的扩展特性

位于 RTR 文件样例结尾处的是扩展特性,如下所示:

# Extension Properties

# The cluster administrator must set the value of this property to point to the 
# directory that contains the configuration files used by the application. 
# For this application, DNS, specify the path of the DNS configuration file on 
# PXFS (typically named.conf).
{
   PROPERTY = Confdir;
   EXTENSION;
   STRING;
   TUNABLE = AT_CREATION;
   DESCRIPTION = “The Configuration Directory Path”;
}

# Time out value in seconds before declaring the probe as failed.
{
        PROPERTY = Probe_timeout;
        EXTENSION;
        INT;
        DEFAULT = 120;
        TUNABLE = ANYTIME;
        DESCRIPTION = “Time out value for the probe (seconds)”;
}

RTR 文件样例中定义了两种扩展特性 ConfdirProbe_timeoutConfdir 用于指定指向 DNS 配置目录的路径。 此目录中包含 DNS 要成功地进行操作所需的 in.named 文件。 在启动 DNS 之前,数据服务样例的 StartValidate 方法将使用此特性来检验配置目录和 in.named 文件是否可以存取。

配置数据服务之后,Validate 方法将检验新目录是否可以存取。

数据服务样例的 PROBE 方法不是 Sun Cluster 回叫方法,而是用户定义的方法, 因此,Sun Cluster 未为该方法提供 Probe_timeout 特性。 开发者已在 RTR 文件中定义了一个扩展特性,以便群集管理员配置 Probe_timeout 值。