
Veritas™ Cluster Server Agent Developer’s Guide Windows 2000, Windows Server 2003 5.0 11293735 Veritas Cluster Server Agent Developer’s Guide Copyright © 2007 Symantec Corporation. All rights reserved. Veritas Cluster Server 5.0 Symantec, the Symantec logo, Storage Foundation, are trademarks or registered trademarks of Symantec Corporation or its affiliates in the U.S. and other countries. Other names may be trademarks of their respective owners. The product described in this document is distributed under licenses restricting its use, copying, distribution, and decompilation/reverse engineering. No part of this document may be reproduced in any form by any means without prior written authorization of Symantec Corporation and its licensors, if any. THIS DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID, SYMANTEC CORPORATION SHALL NOT BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING PERFORMANCE, OR USE OF THIS DOCUMENTATION. THE INFORMATION CONTAINED IN THIS DOCUMENTATION IS SUBJECT TO CHANGE WITHOUT NOTICE. The Licensed Software and Documentation are deemed to be “commercial computer software” and “commercial computer software documentation” as defined in FAR Sections 12.212 and DFARS Section 227.7202. Symantec Corporation 20330 Stevens Creek Blvd. Cupertino, CA 95014 www.symantec.com Third-party legal notices Third-party software may be recommended, distributed, embedded, or bundled with this Symantec product. Such third-party software is licensed separately by its copyright holder. All third-party copyrights associated with this product are listed in the accompanying release notes. Windows is a registered trademark of Microsoft Corporation. Licensing and registration See the Veritas Storage Foundation for Windows Installation and Upgrade Guide for license installation instructions. Technical support For technical assistance, visit http://entsupport.symantec.com and select phone or email support. Use the Knowledge Base search feature to access resources such as TechNotes, product alerts, software downloads, hardware compatibility lists, and our customer email notification service. Contents Chapter 1 Introduction VCS agents: an overview .....................................................................................13 How agents work ..................................................................................................14 The agent framework ..................................................................................14 Resource type definitions ...........................................................................14 Entry points ..................................................................................................15 Developing an agent: overview ..........................................................................15 Applications considerations .......................................................................15 Creating an agent: highlights .....................................................................16 Creating the resource type definition ...............................................16 Choosing to use C++ or scripts to implement the agent ................16 Creating the entry points ....................................................................17 Testing the agent .................................................................................17 Resource type definitions ...........................................................................17 Example resource type definition: FileOnOff ..................................18 The FileOnOff Resource: an example in the main.cf file ...............19 How the FileOnOff agent uses configuration information ............19 Example script entry points for the FileOnOff resource .......................20 Online entry point for FileOnOff .......................................................20 Monitor entry point for FileOnOff ....................................................20 Offline entry point for FileOnOff ......................................................21 About on-off, on-only, and persistent resources ............................................22 About attributes of resources and resource types ..........................................22 Categories of attributes ...............................................................................23 Attribute data types and dimensions ........................................................25 Attribute data types .............................................................................25 Attribute dimensions ...........................................................................26 Chapter 2 Agent entry point overview Agents process entry point requests one at a time ........................................30 Using C++ or script entry points .......................................................................30 C++ agents .....................................................................................................31 Script agents .................................................................................................31 About the VCSAgStartup routine ..............................................................31 Implementing entry points using scripts .........................................31 6 Implementing all or some of the entry points in C++ .................... 32 Example: VCSAgStartup with C++ and script entry points .......... 33 Agent entry points ............................................................................................... 34 monitor .......................................................................................................... 34 info ................................................................................................................. 35 Return values for info entry point .................................................... 35 Invoking the info entry point ............................................................. 36 ResourceInfo resource attribute used by info entry point ............ 37 online ............................................................................................................. 37 offline ............................................................................................................ 38 clean ............................................................................................................... 38 action ............................................................................................................. 40 Action tokens ........................................................................................ 40 Return values for action entry point ................................................ 41 attr_changed ................................................................................................. 41 open ............................................................................................................... 41 close ............................................................................................................... 42 shutdown ....................................................................................................... 42 Summary of return values for entry points .................................................... 43 Agent information file ........................................................................................ 44 Example agent information file ................................................................. 44 Agent information ............................................................................... 45 Attribute argument details ................................................................. 46 Implementing the agent XML information file ....................................... 47 Chapter 3 Entry points in C++ Entry point examples in this chapter ....................................................... 50 Data Structures .................................................................................................... 51 ArgList Attribute ................................................................................................. 53 ArgList attribute for agents registered as V50 ....................................... 53 ArgList Attribute for agents registered as V40 and earlier .................. 53 C++ Entry Point Syntax ...................................................................................... 56 VCSAgStartup .............................................................................................. 56 monitor .......................................................................................................... 57 info ................................................................................................................. 58 resinfo_op ............................................................................................. 58 info_output ........................................................................................... 58 opt_update_args ................................................................................... 59 opt_add_args ........................................................................................ 59 Example, info entry point implementation in C++ ......................... 60 online ............................................................................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages186 Page
-
File Size-