Microsoft KB Archive/838869

= The ClusterResourceControl function and the ClusterResourceTypeControl function are serialized by the resource monitor =

Article ID: 838869

Article Last Modified on 1/4/2006

-

APPLIES TO


 * Microsoft Cluster Server 1.1

-



SUMMARY
''This article describes a situation where the resource monitor may stop responding in Microsoft Cluster Server. The problem is caused by a custom Resource Type DLL and occurs because the ClusterResourceControl function and the ClusterResourceTypeControl function are serialized by the resource monitor.''



SYMPTOMS
If two resources are hosted in the same resource monitor, and if you try to pass Resource control codes or Resource Type control codes from one resource DLL to itself or to another resource, the resource monitor may stop responding.

Additionally, the cluster service may seem to stop responding because the cluster service cannot receive any Resource control codes or Resource Type control responses from the resource monitor.



CAUSE
This problem occurs because all calls to the ClusterResourceControl function and to the ClusterResourceTypeControl function are serialized across all resources in the same resource monitor.

The following example assumes two different resources, resourceA and resourceB. If resourceA passes a control code to itself or to resourceB from its own ClusterResourceControl function or ClusterResourceTypeControl function, the call cannot be completed. The call does not complete because the resource monitor is waiting for the ClusterResourceControl function or the ClusterResourceTypeControl function of resourceA to be completed. This behavior causes the symptoms that are described earlier.



WORKAROUND
To work around this problem, force the resources to be in separate resource monitors.

To do this, use one of the following methods:  In Cluster Administrator, right-click the resource, click the General tab, and then select the Run this resource in a separate Resource Monitor check box. Use the Cluster.exe tool. To do this, run the following command at a command prompt:

cluster res /prop SeparateMonitor=1

 You can do this programmatically by using one of the following:  Server Cluster APIs Cluster Automation Server WMI Cluster Provider that is available in Microsoft Windows Server 2003</li></ul> </li></ul>

<div class="moreinformation_section">

Sample code
The following sample code reproduces the problem that is described in this article. hCluster = OpenCluster(NULL); switch (nControlCodeIn) {    case CLUSCTL_RESOURCE_ : {         hRes = OpenClusterResource( hCluster, resourceEntry->ResourceName ); hDepRes = ResUtilGetResourceDependency( hRes, lpszResourceType); status = ClusterResourceControl( hDepRes,            // Handle to resource                                   NULL,                        // Host node                                   nControlCodeIn,              // Control code                                       NULL,                        // InBuffer                                   0,                           // Size of InBuffer                                   resourceEntry->buf,          // OutBuffer                                   resourceEntry->size,         // Size of OutBuffer                                   &BytesReturned               // Actual bytes returned                                   ); resourceEntry->size = BytesReturned; break; }

case CLUSCTL_RESOURCE_TYPE_ : {         status = ClusterResourceTypeControl( hCluster,          // Handle to cluster                                   lpszResourceType,              // Dependent resource type                                   NULL,                          // Host node                                   nControlCodeIn,                // Control code                                       NULL,                          // InBuffer                                   0,                             // Size of InBuffer                                   resourceEntry->buf,            // OutBuffer                                   resourceEntry->size,           // Size of OutBuffer                                   &BytesReturned                 // Actual bytes returned                                   ); resourceEntry->size = BytesReturned; break; }

default: status = ERROR_INVALID_PARAMETER; break; }

Additional query words: MSCS

Keywords: kbinfo kbdebug kbclustering KB838869

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.