Veritas Cluster Server One 5.0 Service Pack 1 - Agent Developer's Guide

Article:DOC2633  |  Created: 2010-08-18  |  Updated: 2010-08-18  |  Article URL http://www.symantec.com/docs/DOC2633
Article Type
Documentation


Description



Table of Contents:
Introduction
About VCS One agents
How agents work
About the agent framework
Resource type definitions
About agent functions (entry points)
About on-off, on-only, and persistent resources
About attributes
Attribute data types
Attribute dimensions
Attribute scope across systems: global and local attributes
Attribute life: temporary attributes
About intentional offline of applications
About developing an agent
Considerations for the application
High-level overview of the agent development process
Developing the entry points
Building the agent
Testing the agent
Agent entry point overview
About agent entry points
Supported entry points
How the agent framework interacts with entry points
Agent entry points described
About the monitor entry point
About the info entry point
Return values for info entry point
About the ResourceInfo attribute
Invoking the info entry point
About the online entry point
About the offline entry point
About the clean entry point
About the action entry point
Return values for action entry point
About the attr_changed entry point
About the open entry point
About the close entry point
About the shutdown entry point
Return values for entry points
Considerations for using C++ or script entry points
About the VCSAgStartup routine
If you implement entry points using scripts
If you implement all or some of the entry points in C++
Example: VCSAgStartup with C++ and script entry points
About the ArgList and ArgListValues attributes
ArgListValues attribute for agents registered as V50 and later
Overview of the name-value tuple format
Scalar attribute format
Vector attribute format
Keylist attribute format
Association attribute format
About the entry point timeouts
ArgListValues attribute for agents registered as V40 and earlier
Creating entry points in C++
About creating entry points in C++
Entry point examples in this chapter
Data Structures
Syntax for C++ entry points
Syntax for C++ VCSAgStartup
Syntax for C++ monitor
Syntax for C++ info
resinfo_op
info_output
opt_update_args
opt_add_args
Example: info entry point implementation in C++
Syntax for C++ online
Syntax for C++ offline
Syntax for C++ clean
Syntax for C++ action
Syntax for C++ attr_changed
Syntax for C++ open
Syntax for C++ close
Syntax for C++ shutdown
Agent framework primitives
VCSAgRegisterEPStruct
VCSAgSetCookie
VCSAgSetCookie2
VCSAgRegister
VCSAgUnregister
VCSAgGetCookie
VCSAgStrlcpy
VCSAgStrlcat
VCSAgSnprintf
VCSAgCloseFile
VCSAgDelString
VCSAgExec
VCSAgExecWithTimeout
VCSAgSendTrap
VCSAgLockFile
VCSAgInitEntryPointStruct
VCSAgSetStackSize
VCSAgUnlockFile
VCSAgDisableCancellation
VCSAgRestoreCancellation
VCSAgSetEntryPoint
VCSAgValidateAndSetEntryPoint
VCSAgSetLogCategory
VCSAgGetProductName
VCSAgIsMonitorLevelOne
VCSAgIsMonitorLevelTwo
VCSAgMonitorReturn
VCSAgSetResEPTimeout
VCSAgDecryptKey
VCSAgCloseFile
VCSAgCloseFilePtr
VCSAgCloseFp
VCSAgCloseFpPtr
VCSAgCloseDirp
VCSAgCloseDirpPtr
VCSAgDelPasswdPtr
VCSAgDelString
VCSAgDelStringPtr
Agent Framework primitives for container support
VCSAgISContainerCapable
VCSAgExecInContainerWithTmo
VCSAgExecInContainerWithTimeout
VCSAgGetUID
VCSAgIsPidInContainer
VCSAgIsProcInContainer
VCSAgGetContainerID2
VCSAgGetContainerName2
Agent framework primitives for Windows
C++ logging primitives for use by Windows agents
Using logging primitives with localized Windows agents
Defining UCS-2 encoding when compiling agents
C++ primitives for ArgList conversion
VCSAgGetEncodedArgList
VCSAgDelEncodedArgList
C++ primitives for ArgList string manipulation
VCSAgStrlcpyW
VCSAgStrlcatW
VCSAgSnprintfW
C++ primitives for allocating and freeing memory
VCSAgAllocMem
VCSAgDeleteMem
Example: Windows-based primitives for the FileOnOff agent
Creating entry points in scripts
About creating entry points in scripts
Rules for using script entry points
On the Windows platform
On UNIX platforms
Parameters and values for script entry points
ArgList attributes
Example
Syntax for script entry points
Syntax for the monitor script
Syntax for the online script
Syntax for the offline script
Syntax for the clean script
Syntax for the action script
Syntax for the attr_changed script
Syntax for the info script
Syntax for the open script
Syntax for the close script
Syntax for the shutdown script
Example script entry points
Online entry point for FileOnOff
Monitor entry point for FileOnOff
Monitor entry point with intentional offline
Offline entry point for FileOnOff
Logging agent messages
About logging agent messages
Logging in C++ and script-based entry points
Agent messages: format
Timestamp
Mnemonic
Severity
UMI
Message text
C++ agent logging APIs
Agent application logging macros for C++ entry points
Agent debug logging macros for C++ entry points
Severity arguments for C++ macros
Initializing function_name using VCSAG_LOG_INIT
Log category
Examples of logging APIs used in a C++ agent
Script entry point logging functions
Using functions in scripts
VCSAG_SET_ENVS
VCSAG_SET_ENVS examples, Shell script entry points
VCSAG_SET_ENVS examples, Perl script entry points
VCSAG_LOG_MSG
VCSAG_LOG_MSG examples, Shell script entry points
VCSAG_LOG_MSG examples, Perl script entry points
VCSAG_LOGDBG_MSG
VCSAG_LOGDBG_MSG examples, Shell script entry points
VCSAG_LOGDBG_MSG examples, Perl script entry points
Example of logging functions used in a script agent
Building a custom agent
Files for use in agent development
Creating the type definition file for a custom agent
Naming convention for the type definition file
Example: Type definition file for the FileOnOff agent on Linux
Example: Type definition file for the FileOnOff agent on Windows
Requirements for creating the agentTypes.xml file
Configuring attribute properties
Example: Type definition for a custom agent that supports intentional offline
Adding the custom type definition to the configuration
Building a custom agent on UNIX
Example: Using script entry points on UNIX
Example: Using VCSAgStartup() and script entry points on UNIX
Implementing entry points using C++
Example: Using C++ entry points on UNIX
Example: Using C++ and script entry points on UNIX
Building a custom agent on Windows
Recommendations for building custom agents on Windows
Example: Using C++ entry points on Windows
Implementing entry points using scripts
Example: Using script entry points on Windows
Example: Using VCSAgStartup() and script entry points on Windows
Example: Using C++ and script entry points on Windows
Installing the custom agent
Defining resources for the custom resource type
Sample resource definition
How the FileOnOff agent uses configuration information
Testing agents
About testing agents
Using debug messages
Debugging agent functions (entry points).
Debugging the agent framework
Using the engine process to test agents
Test commands
Using the AgentServer utility to test agents
Static type attributes
About static attributes
Overriding static type attributes
Static timeout attributes on Windows
Static type attribute definitions
ActionTimeout
AEPTimeout
AgentClass
AgentFailedOn
AgentPriority
AgentReplyTimeout
AgentStartTimeout
ArgList
ArgList reference attributes
AttrChangedTimeout
CleanTimeout
CleanRetryLimit
CloseTimeout
ContainerOpts
ConfInterval
FaultOnMonitorTimeouts
InfoInterval
InfoTimeout
IntentionalOffline
Leveltwomonitorfrequency
LogDbg
LogFileSize
MinCompatAgentVersion
MonitorInterval
MonitorMethod
MonitorStatsParam
MonitorTimeout
NumThreads
OfflineMonitorInterval
OfflineTimeout
OnlineRetryLimit
OnlineTimeout
OnlineWaitLimit
OpenTimeout
Operations
Platform
RegList
ResFaultPolicy
RestartLimit
ScriptClass
ScriptPriority
SupportedActions
ToleranceLimit
TypeDefinitionVersion
State transition diagrams
State transitions
State transitions for quiesce and unquiesce
State transitions with respect to ResFaultPolicy attribute
Using VCS agents with VCS One
About using VCS agents with VCS One
Using pre-5.0 VCS agents with VCS One and registering them as V51
Outline of steps to change V40 agents V51
Example script in V40 and V51
Sourcing ag_i18n_inc modules in script entry points

Attachments

vcsone_agent_dev_50sp1.pdf (1.2 MBytes)

Article URL http://www.symantec.com/docs/DOC2633


Terms of use for this information are found in Legal Notices