pacemaker  2.1.7-0f7f88312f
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/msg_xml.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:
"//" XML_CIB_TAG_STATE "[@" XML_ATTR_UNAME "='%s']" \
"//" XML_LRM_TAG_RESOURCE "[@" XML_ATTR_ID "='%s']" \
"[@" XML_LRM_ATTR_INTERVAL "='%u']"
#define XML_LRM_ATTR_INTERVAL
Definition: msg_xml.h:300
#define XML_LRM_TAG_RESOURCE
Definition: msg_xml.h:278
#define XML_LRM_ATTR_TASK
Definition: msg_xml.h:306
#define XML_ATTR_ID
Definition: msg_xml.h:156
#define XML_CIB_TAG_STATE
Definition: msg_xml.h:222
#define XML_ATTR_UNAME
Definition: msg_xml.h:178
#define XML_LRM_TAG_RSC_OP
Definition: msg_xml.h:279

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 453 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 360 of file failcounts.c.