3.1.4.1.25 ApiRemoveResourceNode (Opnum 24)

(Protocol Version 2) The ApiRemoveResourceNode method instructs the server to remove the designated node from the set of nodes that can host the designated resource, as specified in section 3.1.1.1.1. The non-volatile cluster state associated with this resource is updated.

The server MUST enforce that a resource will be hosted only on a node that is a member of the set. If none of the nodes in the set is active, then the resource MUST be hosted on another node but MUST remain in the ClusterResourceOffline state.

The server fails this method using error ERROR_INVALID_STATE if the specified node is the current owner of the resource and the resource is in the ClusterResourceOnline, ClusterResourceOnlinePending, or ClusterResourceOfflinePending state or the group hosting the resource is not in the ClusterResourceOffline state.

The server fails this method using error ERROR_CLUSTER_NODE_NOT_FOUND if the set is not empty and the node is not a member of the set.

The server MUST accept an ApiRemoveResourceNode request for processing only if it is in the read/write state, as specified in section 3.1.1.

 error_status_t ApiRemoveResourceNode(
   [in] HRES_RPC hResource,
   [in] HNODE_RPC hNode
 );

hResource: An HRES_RPC context handle that was obtained in a previous ApiOpenResource or ApiCreateResource method call.

hNode:  An HNODE_RPC context handle that is obtained in a previous ApiOpenNode method call.

Return Values: The method MUST return the following error codes for the specified conditions.

Return value/code

Description

0x00000000

ERROR_SUCCESS

Success.

0x00000006

ERROR_INVALID_HANDLE

Either the hResource parameter does not represent a valid HRES_RPC context handle or the hNode parameter does not represent a valid HNODE_RPC context handle.

0x0000138E

ERROR_RESOURCE_NOT_AVAILABLE

The resource represented by the hResource parameter no longer exists in the non-volatile cluster state.

0x0000139F

ERROR_INVALID_STATE

See the preceding text for details of when this error can occur.

0x000013B2

ERROR_CLUSTER_NODE_NOT_FOUND

The node specified by hNode is not in the set of possible owners for the resource specified by hResource.

For any other condition, the server MUST set Status to a value that is not one of the values listed in the preceding table. The client MUST treat all other values the same, except as specified in section 3.2.4.6.