GetClusterNodeState function

Returns the current state of a node. The PCLUSAPI_GET_CLUSTER_NODE_STATE type defines a pointer to this function.

Syntax

CLUSTER_NODE_STATE GetClusterNodeState(
  HNODE hNode
);

Parameters

hNode

Handle to the node for which state information should be returned.

Return Value

GetClusterNodeState returns the current state of the node, which is represented by one of the following values.

The returned values are from the CLUSTER_NODE_STATE enumeration.

Return code/value Description
ClusterNodeUp
0
The node is physically plugged in, turned on, booted, and capable of executing programs.
ClusterNodeDown
1
The node is turned off or not operational.
ClusterNodeJoining
3
The node is in the process of joining a cluster.
ClusterNodePaused
2
The node is running but not participating in cluster operations.
ClusterNodeStateUnknown
-1
The operation was not successful. For more information about the error, call the function GetLastError.

Remarks

The ClusterNodeDown state only indicates that a node is inactive; it does not specify the reason for the inactivity. A node can be in the ClusterNodeDown state for the following reasons:

  • The node is not running.
  • The Cluster service on the node is not running.
  • The node cannot communicate with the node controlling the quorum resource.
  • The node is inactive for any other reason.
When a node is operating as an active member of a cluster but cannot host any resources or groups, it is in the ClusterNodePaused state (see the PauseClusterNode function). Nodes that are undergoing maintenance are typically placed in this state.

Requirements

   
Minimum supported client None supported
Minimum supported server Windows Server 2008 Enterprise, Windows Server 2008 Datacenter
Target Platform Windows
Header clusapi.h
Library ClusAPI.lib
DLL ClusAPI.dll

See Also

CLUSTER_NODE_STATE

OpenClusterNode

PauseClusterNode