Sun Cluster Data Services Developer's Guide for Solaris OS

Source and Binary Files

The Resource Group Manager (RGM), which manages resource groups and ultimately resources on a cluster, 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 running on the affected node. For example, the RGM calls the Stop method to stop a resource running on the affected node, and then calls the resource's Start method to start the resource on a different node. See RGM 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 that 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, but rather calls rt_name_monitor_start and rt_name_monitor_stop, which start and stop the fault monitor by calling rt_name_probe.


The eight methods that Agent Builder generates are listed here:

See the rt_callbacks(1HA) man page for specific information about each of these methods.

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 executables 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, which particular callback methods require 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 appropriate locations where you can add code. See Editing the Generated Source Code.