NCS_RESOURCE

Contains information about a cluster resource.

Syntax

 #include <ncssdk.h> 
  
 typedef struct NCS_RESOURCE 
 {  UINT8       name[ MAX_RDN_CHARS+1]; 
    UINT32      loadWait; 
    UINT32      unloadWait; 
    UINT32      failOver;
    UINT32      failBack; 
    UINT32      ignore_quorum; 
    UINT32      revision; 
    UINT8       fail_order[MAX_NODES];
    UINT8      *loadScript;
    UINT8      *unloadScript;
    UINT8       uniObjName[MAX_DN_CHARS * 2 + 4];
    UINT32      incarnation;
    NCS_STATE   state;
    NCS_ALERT   alert;
    UINT32      location;
    UINT32      fromTo;
    UINT32      res_fail_cnt;
    BYTE        dateAndTime[ 24]; 
 }NCS_RESOURCE;
 

Field

name[ MAX_RDN_CHARS+1]

Contains the resource name filled by NCS_ListResources or NCS_FindResource.

loadWait

Contains the load wait time. Filled by NCS_ReadResource.

unloadWait

Contains the unload wait time. Filled by the NCS_ReadResource.

failOver

Contains the failover policy. Filled by the NCS_ReadResource.

failBack

Contains the failback policy. Filled by the NCS_ReadResource.

ignore_quorum

Contains the value that constitutes a quorum. Filled by the NCS_ReadResource. If true, the cluster resources will ignore quorum; if false, quorum not ignored. (For more information, see Cluster Container and Configuration Settings in the Novell Cluster Services product documentation.)

revision

Contains the revision. Filled by the NCS_ReadResource.

fail_order

Designates the preferred nodes list for this cluster resource. Filled by the NCS_ReadResource.

loadScript

Contains the load script. Filled by the NCS_ReadResource.

unloadScript

Contains an internal unload script. Filled by the NCS_ReadResource.

uniObjName

Contains the FDN (Unicode).

incarnation

Contains the resource incarnation number.

state

Resource state, as described in Section 6.3, NCSSDK Resource States.)

alert

Contains the resource alert, as described in Section 6.4, Cluster Services API Resource Alerts.

location

Specifies the node number of the node where the resource is currently running.

fromTo

Contains the node number to migrate to. Used for online or migrate online. –1 here means “go to preferred node.”

res_fail_cnt

Contains the number of times the resource has failed.

dateAndTime

Contains the date and time the resource was last brought on line.

NOTE:Internally, this is called upSince.

Remarks

Dynamic state runtime data from the resource callback or the resource control function include (see the defined field Elements):

  • incarnation

  • state

  • alert

  • location

  • fromTo

  • res_fail_cnt

  • dateAndTime