(Created page with "== High Availability (AMF) == ===Overview=== OpenClovis ASP provides a SA-Forum compliant High Availability solution (the AMF in SAF terminology). This component controls the s…") |
(→FAQ) |
||
Line 19: | Line 19: | ||
rc = clCpmSlotGet(CL_CPM_SLOT_ID, &slotInfo); | rc = clCpmSlotGet(CL_CPM_SLOT_ID, &slotInfo); | ||
if(rc == CL_OK) | if(rc == CL_OK) | ||
− | clLogNotice("MASTER", "GET", " | + | clLogNotice("MASTER", "GET", " Currently active controller node name is [%.*s]", |
slotInfo.nodeName.length, slotInfo.nodeName.value); | slotInfo.nodeName.length, slotInfo.nodeName.value); | ||
} | } |
Revision as of 01:11, 14 June 2011
High Availability (AMF)
Overview
OpenClovis ASP provides a SA-Forum compliant High Availability solution (the AMF in SAF terminology). This component controls the starting/stopping of applications, application redundancy configuration, and role assignment.
FAQ
- What’s the best way for an application to determine the name/slot of the currently active controller in the cluster?
- The relevant API is "clCpmSlotGet". Example code is as follows:
#include <clCpmExtApi.h> ClRcT masterNodeGet(void) { ClIocNodeAddressT node = 0; ClRcT rc = clCpmMasterAddressGet(&node); if(node) { ClCpmSlotInfoT slotInfo = {.slotId = node } ; rc = clCpmSlotGet(CL_CPM_SLOT_ID, &slotInfo); if(rc == CL_OK) clLogNotice("MASTER", "GET", " Currently active controller node name is [%.*s]", slotInfo.nodeName.length, slotInfo.nodeName.value); } return rc; }