3.1.4.1 CleanupNode (Opnum 7)

The CleanupNode method removes all persistent artifacts that exist on the node after it is evicted from a cluster.

The Failover Cluster: Management API (ClusAPI) Protocol server provides a method to evict a node from a cluster. Evicting a node from a cluster is specified in [MS-CMRP], section 3.1.1.5. Once evicted, the node can be restored to its precluster installation state.

This method is idempotent. After it is invoked, the following actions MUST occur.

  • The target node MUST no longer be a server for the Failover Cluster: Management API (ClusAPI) Protocol (as specified in [MS-CMRP]) until the node is reconfigured as a member of a cluster by using implementation-specific methods between servers.

  • In any subsequent query of the ClusterInstallationState Registry Value, by means of the Windows Remote Registry Protocol ([MS-RRP]), as specified in [MS-CMRP] section 3.1.3.1, the server MUST return that the Value is set to 0x00000001 (eClusterInstallStateFilesCopied).

  • In any subsequent calls of the Service Control Manager Remote Protocol ([MS-SCMR]) OpenService method for service name "ClusSvc", the server MUST complete with error 1060 (ERROR_SERVICE_DOES_NOT_EXIST). This behavior is in contrast to the behavior specified in the first bullet of [MS-CMRP] section 3.1.3.2.

  • Reset any other implementation-specific values to their precluster installation state.

This method MUST NOT be invoked while the node is a configured member of a cluster.

 HRESULT CleanupNode(
   [in] BSTR bstrEvictedNodeNameIn,
   [in] long nDelayIn,
   [in] long nTimeoutIn
 );

bstrEvictedNodeNameIn: The name of the node on which cleanup is to be initiated. The client MUST provide the name of a configured node that was evicted from its cluster.

The name of the node passed in the bstrEvictedNodeNameIn parameter is the same as the name of the node evicted using [MS-CMRP]. How clients obtain node names is specified in the ApiOpenNode method of [MS-CMRP], section 3.1.4.67.

nDelayIn: The number of milliseconds that will elapse before cleanup is started on the target node. If some other process cleans up the target node while the delay is in progress, the delay is terminated before its expiration. If this value is zero, the node is cleaned up immediately.

nTimeoutIn: The number of milliseconds that this method will wait for cleanup to complete. This time-out is independent of the delay described previously, so if nDelayIn is greater than nTimeoutIn, this method will probably time out. However, after cleanup is initiated, cleanup will run to completion, but this method might not wait for it to complete.

Return Values: A signed 32-bit value that indicates return status. If the method returns a negative value, the method has failed. If the 12-bit facility code (bits 16-27) is set to 0x007, the value contains a Win32 error code (defined in [MS-ERREF]) in the lower 16 bits. A zero value or positive values indicate success, with the lower 16 bits in positive nonzero values containing warnings or flags that are defined in the method implementation.

Return value/code

Description

0x00000000

S_OK

The call was successful.

Exceptions thrown:

No exceptions are thrown except those that are thrown by the underlying RPC protocol, as specified in [MS-RPCE].