|
|
Code Overview for
|
| <rootpath>/opt/SUNWsc<agent>/ | |
|---|---|
| bin/ | Containing the scripts that are executed
by SUNW.gds and registered as Start_command,
Stop_command and Probe_command.
Some agents also provide a Validation_command.
These scripts are used during runtime of the agent. |
| etc/ | Containing the configuration file config, which
is used to enable/disable debugging code, the RTR
file and any agent specific parameter file, if used.
The configuration and parameter files are evaluated during
agent runtime. |
| util/ | Containing the agent configuration file and a register
script. The configuration file must be
ammended by the user. The register script performs
all necessary steps to register the SUNW.gds resource.
These scripts are only used at agent registration
time; they are not used during runtime of the agent. |
Examples of agents without several components are the 9ias, PostgreSQL, dhc, mys, saa, sag, and tomcat agents.
bin/, etc/ and util/ directories in their component subdirectory, as described in the previous table.lib/ directory in the agents
top directory, containing common ksh shell script functions used by all
components.util/ directory in the agents top directory, if components are always registered and used together.
Examples of agents with several components are the ebs, pax, sge, smb, sps, and zone agents.
Some agents are designed to register and run on top of the HA-Container agent
(short name: zone). These agents have additional scripts within their
util/ directory that deal with the registration of the sczsmf
component and the corresponding SMF service within the non-global zone. These
scripts are called by the agents register script.
These agents also contain a control script contained in the bin/
directory, which implements the logic to run either as a "real"
SUNW.gds resource or as a SMF method script when used by the
sczsmf component of the HA-Container agent.
Examples are the PostgreSQL, mys, smb, mqs, sps, and tomcat agents.
The following briefly describes the individual files of the Samba agent, as an example. The agent has two components and is HA-Container agent aware.
The location for the Samba agent is
<OHACDS-source-root>/usr/src/cmd/ha-services/gds-agents/smb/
| Makefile | This file defines the SUBDIRS for the components
and the
rules to relate the scripts and configuration files with
the corresponding installation location. |
| control_samba.ksh | This control script implements the logic to fulfill two roles:
functions.ksh file for the
case of "start", "stop", and "probe". |
| functions.ksh | A library of shell functions implementing all the necessary methods to handle the Samba application within the Sun Cluster framework. It is sourced by all shell scripts using those functions. |
| samba_config.ksh | The configuration file that a user needs to amend
to reflect the intended configuration of the Samba
resource. It is used by samba_register.ksh. |
| samba_register.ksh | This script registers the samba and/or winbind
resource based on the configuration setup within
samba_config.ksh. |
| samba_smf_register.ksh | This script registers the SMF manifest for samba
and/or winbind in the non-global zone, if the agent
is used in combination with the HA-Container agent.
This script is called by samba_register.ksh if the
setup in samba_config.ksh indicates the failover
zone usage. |
| samba_smf_remove.ksh | This script helps to remove the registered SMF manifest for samba and/or winbind, if the corresponding resource should get removed again. |
| SUNW.smb | This is a "dummy" RTR file (dummy, since the real
resource type is SUNW.gds for this resource), which
is used by the scinstall cluster command in case of an
upgrade to newer cluster software and thus new agent version. |
| samba/Makefile | Defines rules to relate the scripts and configuration files with the corresponding installation location for the samba component. |
| samba/config | File that allows you to enable/disable debug code and messages while the samba component is running. |
| samba/probe_samba.ksh | Script which is a wrapper for control_samba.ksh
to get registered with the Probe_command property
of SUNW.gds for the samba component. |
| samba/start_samba.ksh | Script which is a wrapper for control_samba.ksh
to get registered with the Start_command property
of SUNW.gds for the samba component. |
| samba/stop_samba.ksh | Script which is a wrapper for control_samba.ksh
to get registered with the Stop_command property
of SUNW.gds for the samba component. |
| winbind/Makefile | Defines rules to relate the scripts and config files with the corresponding installation location for the winbind component. |
| winbind/config | File that allows to enable/disable debug code and messages while the winbind component is running. |
| winbind/probe_winbind.ksh | Script which is a wrapper for control_samba.ksh
to get registered with the Probe_command property
of SUNW.gds for the winbind component. |
| winbind/start_winbind.ksh | Script which is a wrapper for control_samba.ksh
to get registered with the Start_command property
of SUNW.gds for the winbind component. |
| winbind/stop_winbind.ksh | Script which is a wrapper for control_samba.ksh
to get registered with the Stop_command property
of SUNW.gds for the winbind component. |