About the clean entry point

The clean entry point is called automatically by the agent framework when all ongoing tasks associated with a resource must be terminated and the resource must be taken offline, perhaps forcibly. The entry point receives as input the resource name, an encoded reason describing why the entry point is being called, and the ArgList attribute values. It must return 0 if the operation is successful and 1 if unsuccessful.

The reason for calling the entry point is encoded according to the following enum type:

enum VCSAgWhyClean {

VCSAgCleanOfflineHung,

VCSAgCleanOfflineIneffective,

VCSAgCleanOnlineHung,

VCSAgCleanOnlineIneffective,

VCSAgCleanUnexpectedOffline,

VCSAgCleanMonitorHung

};

For script-based Clean entry points, the Clean reason is passed as an integer:

0 => offline hung

1 => offline ineffective

2 => online hung

3 => online ineffective

4 => unexpected offline

5 => monitor hung

The above is an enum type, so same integer value is passed irrespective of whether the entry point is written in C++ or is script-based.

Note   On Windows, VCSAgCleanOfflineHung, VCSAgCleanOnlineHung, and VCSAgCleanMonitorHung do not apply. Entry point timeouts are not configurable parameters on the Windows platform.

The agent supports the following tasks when the clean entry point is implemented:

For the above actions to occur, the clean entry point must run successfully, that is, return an exit code of 0.