Sun Cluster 資料服務開發者指南 (適用於 Solaris 作業系統)

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 配置目錄的路徑。此目錄含有 in.named 檔案,DNS 需要此檔案才能成功作業。資料服務範例的 StartValidate 方法在啟動 DNS 前使用此特性驗證配置目錄和 in.named 檔案是否可存取。

配置資料服務時,Validate 方法將驗證新目錄是否可存取。

資料服務範例的 PROBE 方法不是 Sun Cluster 回呼方法,而是使用者定義的方法。因此,Sun Cluster 不提供該方法的 Probe_timeout 特性。您需要定義 RTR 檔案中的延伸特性,以便叢集管理員配置 Probe_timeout 值。