How VCS handles resource faults
This section describes the process VCS uses to determine the course of action when a resource faults.
VCS behavior when an online resource faults
In the following example, a resource in an online state is reported as being offline without being commanded by the agent to go offline.
-
VCS first verifies the Monitor routine completes successfully in the required time. If it does, VCS examines the exit code returned by the Monitor routine. If the Monitor routine does not complete in the required time, VCS looks at the FaultOnMonitorTimeouts (FOMT) attribute.
-
If FOMT=0, the resource will not fault when the Monitor routine times out. VCS considers the resource online and monitors the resource periodically, depending on the monitor interval.
If FOMT=1 or more, VCS compares the CurrentMonitorTimeoutCount (CMTC) with the FOMT value. If the monitor timeout count is not used up, CMTC is incremented and VCS monitors the resource in the next cycle.
-
If FOMT= CMTC, this means that the available monitor timeout count is exhausted and VCS must now take corrective action.
-
If the ManageFaults attribute is set to NONE, VCS marks the resource as online|admin_wait and fires the resadminwait trigger. If the ManageFaults attribute is set to ALL, the resource enters a going offline wait state. VCS invokes the Clean function with the reason Monitor Hung.
-
If the Clean function is successful (that is, Clean exit code = 0), VCS examines the value of the RestartLimit attribute. If Clean fails (exit code = 1), the resource remains online with the state unable to offline. VCS fires the resnotoff trigger and monitors the resource again.
-
If the Monitor routine does not time out, it returns the status of the resource as being online or offline.
-
If the ToleranceLimit (TL) attribute is set to a non-zero value, the Monitor cycle returns offline (exit code = 100) for a number of times specified by the ToleranceLimit and increments the ToleranceCount (TC). When the ToleranceCount equals the ToleranceLimit (TC = TL), the agent declares the resource as faulted.
-
If the Monitor routine returns online (exit code = 110) during a monitor cycle, the agent takes no further action. The ToleranceCount attribute is reset to 0 when the resource is online for a period of time specified by the ConfInterval attribute.
If the resource is detected as being offline a number of times specified by the ToleranceLimit before the ToleranceCount is reset (TC = TL), the resource is considered failed.
-
After the agent determines the resource is not online, VCS checks the Frozen attribute for the service group. If the service group is frozen, VCS declares the resource faulted and calls the resfault trigger. No further action is taken.
-
If the service group is not frozen, VCS checks the ManageFaults attribute. If ManageFaults=NONE, VCS marks the resource state as online|admin_wait and calls the resadminwait trigger. If ManageFaults=ALL, VCS calls the Clean function with the CleanReason set to Unexpected Offline.
-
If the Clean function fails (exit code = 1) the resource remains online with the state unable to offline. VCS fires the resnotoff trigger and monitors the resource again. The resource enters a cycle of alternating Monitor and Clean functions until the Clean function succeeds or a user intervenes.
-
If the Clean function is successful, VCS examines the value of the RestartLimit (RL) attribute. If the attribute is set to a non-zero value, VCS increments the RestartCount (RC) attribute and invokes the Online function. This continues till the value of the RestartLimit equals that of the RestartCount. At this point, VCS attempts to monitor the resource.
If the Monitor returns an online status, VCS considers the resource online and resumes periodic monitoring. If the monitor returns an offline status, the resource is faulted and VCS takes actions based on the service group configuration.
VCS behavior when a resource fails to come online
In the following example, the agent framework invokes the Online function for an offline resource. The resource state changes to waiting to online.
-
If the Online function times out, VCS examines the value of the ManageFaults attribute.
-
If ManageFaults is set to NONE, the resource state changes to offline|admin_wait.
If ManageFaults is set to ALL, VCS calls the Clean function with the CleanReason set to Online Hung.
-
If the Online function does not time out, VCS invokes the Monitor function. The Monitor routine returns an exit code of 110 if the resource is online. Otherwise, the Monitor routine returns an exit code of 100.
-
VCS examines the value of the OnlineWaitLimit (OWL) attribute. This attribute defines how many monitor cycles can return an offline status before the agent framework declares the resource faulted. Each successive Monitor cycle increments the OnlineWaitCount (OWC) attribute. When OWL= OWC (or if OWL= 0), VCS determines the resource has faulted.
-
VCS then examines the value of the ManageFaults attribute. If the ManageFaults is set to NONE, the resource state changes to offline|admin_wait.
If the ManageFaults is set to ALL, VCS calls the Clean function with the CleanReason set to Online Ineffective.
-
If the Clean function is not successful (exit code = 1), the agent monitors the resource. It determines the resource is offline, and calls the Clean function with the Clean Reason set to Online Ineffective. This cycle continues till the Clean function is successful, after which VCS resets the OnlineWaitCount value.
-
If the OnlineRetryLimit (ORL) is set to a non-zero value, VCS increments the OnlineRetryCount (ORC) and invokes the Online function. This starts the cycle all over again. If ORL = ORC, or if ORL = 0, VCS assumes that the Online operation has failed and declares the resource as faulted.
Click the thumbnail above to view full-sized image.