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", " Node name [%.*s]",
slotInfo.nodeName.length, slotInfo.nodeName.value);
}
return rc;
}