Solaris OS용 Sun Cluster 데이터 서비스 개발 안내서

자원 유형 등록 파일 정의

이 예의 자원 유형 등록(RTR) 파일은 DNS 자원 유형의 정적 구성을 정의합니다. 이 유형의 자원은 RTR 파일에 정의된 등록 정보를 상속합니다.

클러스터 관리자가 HA-DNS 데이터 서비스를 등록할 때 RGM은 RTR 파일의 정보를 읽습니다.

RTR 파일 개요

RTR 파일은 잘 정의된 형식을 따릅니다. RTR 파일에서는 지원 유형 등록 정보가 가장 먼저 정의되고 시스템 정의 자원 등록 정보가 그 다음에 정의되며 마지막으로 확장 등록 정보가 정의됩니다. 자세한 내용은 rt_reg(4) 설명서 페이지 및 자원 및 자원 유형 등록 정보 설정을 참조하십시오.

이 절에서는 샘플 RTR 파일의 특정 등록 정보에 대해 설명하며 샘플 RTR 파일의 여러 부분을 보여줍니다. 샘플 RTR 파일 내용의 전체 목록은 자원 유형 등록(RTR) 파일 목록을 참조하십시오.

샘플 RTR 파일의 자원 유형 등록 정보

샘플 RTR 파일은 다음 목록에서처럼 맨 앞에 주석이 있고 HA-DNS 구성을 정의하는 자원 유형 등록 정보가 그 뒤에 옵니다.


주 –

자원 그룹, 자원 및 자원 유형의 등록 정보 이름은 대소문자를 구분하지 않습니다. 등록 정보 이름을 지정하는 경우 대문자와 소문자를 임의로 조합해서 사용할 수 있습니다.


#
# Copyright (c) 1998-2005 by Sun Microsystems, Inc.
# All rights reserved.
#
# Registration information for Domain Name Service (DNS)
#

#pragma ident   “@(#)SUNW.sample   1.1   00/05/24 SMI”

Resource_type = “sample”;
Vendor_id = SUNW;
RT_description = “Domain Name Service on Sun Cluster”;

RT_version =”1.0”; 
API_version = 2;    
Failover = TRUE;

RT_basedir=/opt/SUNWsample/bin;
Pkglist = SUNWsample;

Start         =   dns_svc_start;
Stop          =   dns_svc_stop;

Validate      =   dns_validate;
Update        =   dns_update;

Monitor_start =   dns_monitor_start;
Monitor_stop  =   dns_monitor_stop;
Monitor_check =   dns_monitor_check;

정보 –

RTR 파일의 첫 번째 항목으로 Resource_type 등록 정보를 선언해야 합니다. 그렇지 않으면 자원 유형 등록에 실패합니다.


이러한 등록 정보에 대한 몇 가지 정보는 다음과 같습니다.

Single_instance, Init_nodesInstalled_nodes와 같이 이 RTR 파일에 지정되지 않은 자원 유형 등록 정보는 기본값으로 설정됩니다. 자원 유형 등록 정보에는 자원 유형 등록 정보의 전체 목록이 기본값과 함께 나와 있습니다.

클러스터 관리자는 RTR 파일의 자원 유형 등록 정보 값을 변경할 수 없습니다.

샘플 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_timeout을 정의합니다. Confdir 등록 정보는 DNS 구성 디렉토리의 경로를 지정합니다. 이 디렉토리는 DNS가 성공적으로 작동하는 데 필요한 in.named 파일을 포함합니다. 샘플 데이터 서비스의 StartValidate 메소드는 DNS를 시작하기 전에 이 등록 정보를 사용하여 구성 디렉토리와 in.named 파일에 액세스할 수 있는지 확인합니다.

데이터 서비스가 구성되면 Validate 메소드는 새 디렉토리에 액세스할 수 있는지 확인합니다.

샘플 데이터 서비스의 PROBE 메소드는 Sun Cluster 콜백 메소드가 아니라 사용자 정의 메소드입니다. 따라서 Sun Cluster는 이 메소드에 대한 Probe_timeout 등록 정보를 제공하지 않습니다. 개발자는 클러스터 관리자가 Probe_timeout 값을 구성할 수 있도록 RTR 파일에 확장 등록 정보를 정의해야 합니다.