pacemaker  2.1.8-3980678f03
Scalable High-Availability cluster resource manager
Macros | Functions
failcounts.c File Reference
#include <crm_internal.h>
#include <sys/types.h>
#include <regex.h>
#include <glib.h>
#include <crm/crm.h>
#include <crm/common/xml.h>
#include <crm/common/util.h>
#include <crm/pengine/internal.h>
Include dependency graph for failcounts.c:

Go to the source code of this file.

Macros

#define XPATH_FMT
 

Functions

int pe_get_failcount (const pcmk_node_t *node, pcmk_resource_t *rsc, time_t *last_failure, uint32_t flags, const xmlNode *xml_op)
 
pcmk_action_tpe__clear_failcount (pcmk_resource_t *rsc, const pcmk_node_t *node, const char *reason, pcmk_scheduler_t *scheduler)
 Schedule a controller operation to clear a fail count. More...
 

Macro Definition Documentation

◆ XPATH_FMT

#define XPATH_FMT
Value:
"//" PCMK__XE_NODE_STATE "[@" PCMK_XA_UNAME "='%s']" \
"//" PCMK__XE_LRM_RESOURCE "[@" PCMK_XA_ID "='%s']" \
"[@" PCMK_META_INTERVAL "='%u']"
#define PCMK_XA_OPERATION
Definition: xml_names.h:344
#define PCMK__XE_LRM_RESOURCE
#define PCMK_XA_UNAME
Definition: xml_names.h:426
#define PCMK_XA_ID
Definition: xml_names.h:296
#define PCMK_META_INTERVAL
Definition: options.h:91
#define PCMK__XE_LRM_RSC_OP
#define PCMK__XE_NODE_STATE

Function Documentation

◆ pe__clear_failcount()

pcmk_action_t* pe__clear_failcount ( pcmk_resource_t rsc,
const pcmk_node_t node,
const char *  reason,
pcmk_scheduler_t scheduler 
)

Schedule a controller operation to clear a fail count.

Parameters
[in,out]rscResource with failure
[in]nodeNode failure occurred on
[in]reasonReadable description why needed (for logging)
[in,out]schedulerScheduler data cluster
Returns
Scheduled action

Definition at line 458 of file failcounts.c.

◆ pe_get_failcount()

int pe_get_failcount ( const pcmk_node_t node,
pcmk_resource_t rsc,
time_t *  last_failure,
uint32_t  flags,
const xmlNode *  xml_op 
)

Definition at line 361 of file failcounts.c.