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

xfnts_validate 메소드 코드 목록

이 메소드는 Confdir_list 등록 정보에서 가리키는 디렉토리가 있는지 확인합니다. RGM은 데이터 서비스가 만들어질 때와 데이터 서비스 등록 정보가 클러스터 관리자에 의해 업데이트될 때 이 메소드를 호출합니다. Monitor_check 메소드는 오류 모니터가 데이터 서비스를 새 노드로 페일오버할 때마다 이 메소드를 호출합니다.


예 C–9 xfnts_validate.c

/*
 * Copyright (c) 1998-2005 by Sun Microsystems, Inc.
 * All rights reserved.
 *
 * xfnts_validate.c - validate method for HA-XFS
 */

#pragma ident “@(#)xfnts_validate.c 1.9 01/01/18 SMI”

#include <rgm/libdsdev.h>
#include “xfnts.h”

/*
 * Check to make sure that the properties have been set properly.
 */

int
main(int argc, char *argv[])
{
   scds_handle_t   scds_handle;
   int   rc;

   /* Process arguments passed by RGM and initialize syslog */
   if (scds_initialize(&scds_handle, argc, argv) != SCHA_ERR_NOERR)
{
      scds_syslog(LOG_ERR, “Failed to initialize the handle.”);
      return (1);
   }
   rc = svc_validate(scds_handle);

   /* Free up all the memory allocated by scds_initialize */
   scds_close(&scds_handle);

   /* Return the result of validate method */
   return (rc);

}