LooksAlive/IsAlive & Pending timeout
The role and behavior of the first two functions (IsAlive & LooksAlive) is related to the type of resource they are serving. A detailed description of these particular roles is here:
Behavior of the LooksAlive and IsAlive functions for the resources that are included in the Windows Server Clustering component of Windows Server 2003
https://support.microsoft.com/kb/914458/en-us
As you can see, the functions perform different actions for a generic service resource, as compared to a file share resource for example. (Remember, a generic service cluster resource is nothing more than a wrapper for a particular service. It basically enables it to be "cluster-aware")
Generic Service resource (ClusRes.DLL)
• LooksAlive - The LooksAlive test for the Generic Service resource queries SCM to see whether the specified service is in a "Running" state.
• IsAlive - The IsAlive test is the same as the LooksAlive test in this context.
Example of using SCM to check a service state:
c:\>sc query spooler
SERVICE_NAME: spooler
TYPE : 110 WIN32_OWN_PROCESS (interactive)
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
File Share resource (ClusRes.DLL)
• LooksAlive - The LooksAlive test for a File Share resource retrieves the properties of the share from the Server service as a basic test that the share exists.
• IsAlive - The IsAlive test for a File Share resource does the same thing as a LooksAlive test. If the MaxUsers property is set to -1 (unlimited), the IsAlive function opens the first file on the share by using the share name. Otherwise, the IsAlive function tests that the directory path that is associated with the share is still valid.
Having seen how LooksAlive/IsAlive act differently depending on the resource type, we now focus on the "Pending timeout" value: all it does is to stop the resource if no response has been passed by the LooksAlive/IsAlive functions within the specified timeout value. It has a default value of 180 seconds and can be changed.
Bogdan Palos
- Technical Lead / Enterprise Platforms Support (Core)