Sun Logo




Netra™ High Availability Suite 3.0 1/08 Foundation Services CMM Programming Guide

819-5236-13


Contents

Figures

Examples

Preface

Netra HA Suite Software CMM API

Overview of CMM API

Characteristics of the CMM API

Introduction to the Properties of a Node

Membership Roles

Qualification Levels

Administrative Attributes

Setting Up the Development Environment

Introduction to the Development Environment

Setting Up the Development Host

Setting Up a Netra HA Suite Cluster

Installing Libraries and Header Files

procedure iconsmall spaceTo Install the Developer and Trace Packages

Building CMM Applications

Installing Applications on a Cluster

Setting Up a Makefile

Compiling Applications

Including Applications in a Startup Script

Running Your Applications on the Cluster

Application Examples

Retrieving Node Information Using the CMM API

Identifying the Current Node

Retrieving Information About the Master Node or Vice-Master Node

Retrieving Information About Any Node

Retrieving Information About All Nodes in the Cluster

Identifying the Role of a Node

Identifying the Properties of a Node

Using the cmm_member_t Structure for Information About Member Nodes

Using the sflag Field of the cmm_member_t Structure

Understanding Change Notifications

Introduction to Change Notifications

Understanding the Structure of Notifications

Notification Values

Notifications During Changes in the Cluster State

Cluster Initialization Notifications

Vice-Master Removal Notifications

Vice-Master Excluded Notification

Peer Node Removal Notification

Master Node Excluded Notifications

Node Other Than Master Excluded Notification

Switchover Notifications

Failover Notifications

Failover Due to the Removal or Failure of the Master Node

Failover Due to Master Disqualification

Stale Cluster Notification

Amnesia

Split Brain

Managing Changes in the Cluster State

Setting a Timeout Value for Calls to the nhcmmd Daemon

Reloading the Cluster Node Table

Receiving and Handling Change Notifications

Registering to Receive Notifications

Filtering Notifications

Receiving and Dispatching Notifications

Retrieving Change Notifications

Responding to Cluster Notifications by Modifying the Cluster

Removing or Excluding a Node

Removing the Master Node

Removing the Vice-Master Node

Removing Diskless and Dataless Nodes

Setting the Qualification of a Node

Triggering a Switchover

Triggering a Switchover Using cmm_mastership_release

Triggering a Failover

Triggering a Failover by Using the cmm_membership_remove Function

Triggering a Failover by Using the cmm_member_setqualif Function

Rejoining the Cluster

Debugging Applications in the Foundation Services

Reporting Application Errors

Reading Error Information for Debugging

Stopping the Daemon Monitor for Debugging

Broken Pipe Error Messages

Return Values of the CMM API