Sun Cluster Data Services Developer's Guide for Solaris OS

Source and Binary Files

The Resource Group Manager (RGM) manages resource groups and ultimately resources on a cluster. The RGM works on a callback model. When specific events happen, such as a node failure, the RGM calls the resource type's methods for each of the resources that are running on the affected node. For example, the RGM calls the Stop method to stop a resource that is running on the affected node, and calls the resource's Start method to start the resource on a different node. See Resource Group Manager Model, Callback Methods, and the rt_callbacks(1HA) man page for more information about this model.

To support this model, Agent Builder generates eight executable C programs or Korn shell scripts in the install-directory/rt-name/bin directory. These programs or shell scripts serve as callback methods.


Note –

Strictly speaking, the rt-name_probe program, which implements a fault monitor, is not a callback program. The RGM does not directly call rt-name_probe. Instead, the RGM calls rt-name_monitor_start and rt-name_monitor_stop. These methods start and stop the fault monitor by calling rt-name _probe.


Here are the eight methods that Agent Builder generates:

See the rt_callbacks(1HA) man page for specific information about each method.

In the install-directory/rt-name/src directory (C output), Agent Builder generates the following files:

Agent Builder links the rt-name.o file to each of the method .o files to create the executable files in the install-directory/rt-name/bin directory.

For Korn shell output, the install-directory/rt-name/bin and install-directory/rt-name/src directories are identical. Each directory contains the eight executable scripts that correspond to the seven callback methods and the Probe method.


Note –

The Korn shell output includes two compiled utility programs, gettime and gethostnames. Particular callback methods require these methods for getting the time and for probing.


You can edit the source code, run the make command to recompile the code, and when you are finished, run the make pkg command to generate a new package. To support making changes to the source code, Agent Builder embeds comments in the source code at correct locations where you can add code. See Editing the Generated Source Code.