pacemaker  2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
Macros | Functions
pcmk_sched_actions.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <sys/param.h>
#include <glib.h>
#include <crm/lrmd_internal.h>
#include <crm/common/scheduler_internal.h>
#include <pacemaker-internal.h>
#include "libpacemaker_private.h"
Include dependency graph for pcmk_sched_actions.c:

Go to the source code of this file.

Macros

#define action_type_str(flags)   (pcmk_is_set((flags), pcmk_action_pseudo)? "pseudo-action" : "action")
 
#define action_optional_str(flags)   (pcmk_is_set((flags), pcmk_action_optional)? "optional" : "required")
 
#define action_runnable_str(flags)   (pcmk_is_set((flags), pcmk_action_runnable)? "runnable" : "unrunnable")
 
#define action_node_str(a)   (((a)->node == NULL)? "no node" : (a)->node->details->uname)
 
#define clear_action_flag_because(action, flag, reason)
 
#define FAKE_TE_ID   "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
 
#define XPATH_NODE_HISTORY
 

Functions

void pcmk__update_action_for_orderings (pcmk_action_t *then, pcmk_scheduler_t *scheduler)
 
uint32_t pcmk__update_ordered_actions (pcmk_action_t *first, pcmk_action_t *then, const pcmk_node_t *node, uint32_t flags, uint32_t filter, uint32_t type, pcmk_scheduler_t *scheduler)
 
void pcmk__log_action (const char *pre_text, const pcmk_action_t *action, bool details)
 
pcmk_action_tpcmk__new_shutdown_action (pcmk_node_t *node)
 
xmlNode * pcmk__create_history_xml (xmlNode *parent, lrmd_event_data_t *op, const char *caller_version, int target_rc, const char *node, const char *origin)
 
bool pcmk__action_locks_rsc_to_node (const pcmk_action_t *action)
 
void pcmk__deduplicate_action_inputs (pcmk_action_t *action)
 
void pcmk__output_actions (pcmk_scheduler_t *scheduler)
 
bool pcmk__check_action_config (pcmk_resource_t *rsc, pcmk_node_t *node, const xmlNode *xml_op)
 
void pcmk__handle_rsc_config_changes (pcmk_scheduler_t *scheduler)
 

Macro Definition Documentation

◆ action_node_str

#define action_node_str (   a)    (((a)->node == NULL)? "no node" : (a)->node->details->uname)

Definition at line 494 of file pcmk_sched_actions.c.

◆ action_optional_str

#define action_optional_str (   flags)    (pcmk_is_set((flags), pcmk_action_optional)? "optional" : "required")

Definition at line 488 of file pcmk_sched_actions.c.

◆ action_runnable_str

#define action_runnable_str (   flags)    (pcmk_is_set((flags), pcmk_action_runnable)? "runnable" : "unrunnable")

Definition at line 491 of file pcmk_sched_actions.c.

◆ action_type_str

#define action_type_str (   flags)    (pcmk_is_set((flags), pcmk_action_pseudo)? "pseudo-action" : "action")

Definition at line 485 of file pcmk_sched_actions.c.

◆ clear_action_flag_because

#define clear_action_flag_because (   action,
  flag,
  reason 
)
Value:
do { \
if (pcmk_is_set((action)->flags, (flag))) { \
pe__clear_action_flags(action, flag); \
if ((action)->rsc != (reason)->rsc) { \
char *reason_text = pe__action2reason((reason), (flag)); \
pe_action_set_reason((action), reason_text, false); \
free(reason_text); \
} \
} \
} while (0)
const char * action
Definition: pcmk_fence.c:30
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
Definition: util.h:99
char * pe__action2reason(const pcmk_action_t *action, enum pe_action_flags flag)
Definition: pe_actions.c:1614
uint64_t flags
Definition: remote.c:215

Definition at line 693 of file pcmk_sched_actions.c.

◆ FAKE_TE_ID

#define FAKE_TE_ID   "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Definition at line 1102 of file pcmk_sched_actions.c.

◆ XPATH_NODE_HISTORY

#define XPATH_NODE_HISTORY
Value:
"/" XML_CIB_TAG_STATE "[@" XML_ATTR_UNAME "='%s']" \
#define XML_CIB_TAG_LRM
Definition: msg_xml.h:276
#define XML_CIB_TAG_STATE
Definition: msg_xml.h:222
#define XML_ATTR_UNAME
Definition: msg_xml.h:178
#define XML_TAG_CIB
Definition: msg_xml.h:137
#define XML_LRM_TAG_RESOURCES
Definition: msg_xml.h:277
#define XML_CIB_TAG_STATUS
Definition: msg_xml.h:204

Definition at line 1876 of file pcmk_sched_actions.c.

Function Documentation

◆ pcmk__action_locks_rsc_to_node()

bool pcmk__action_locks_rsc_to_node ( const pcmk_action_t action)

Definition at line 1301 of file pcmk_sched_actions.c.

◆ pcmk__check_action_config()

bool pcmk__check_action_config ( pcmk_resource_t rsc,
pcmk_node_t node,
const xmlNode *  xml_op 
)

Definition at line 1603 of file pcmk_sched_actions.c.

◆ pcmk__create_history_xml()

xmlNode* pcmk__create_history_xml ( xmlNode *  parent,
lrmd_event_data_t op,
const char *  caller_version,
int  target_rc,
const char *  node,
const char *  origin 
)

Definition at line 1118 of file pcmk_sched_actions.c.

◆ pcmk__deduplicate_action_inputs()

void pcmk__deduplicate_action_inputs ( pcmk_action_t action)

Definition at line 1349 of file pcmk_sched_actions.c.

◆ pcmk__handle_rsc_config_changes()

void pcmk__handle_rsc_config_changes ( pcmk_scheduler_t scheduler)

Definition at line 1893 of file pcmk_sched_actions.c.

◆ pcmk__log_action()

void pcmk__log_action ( const char *  pre_text,
const pcmk_action_t action,
bool  details 
)

Definition at line 964 of file pcmk_sched_actions.c.

◆ pcmk__new_shutdown_action()

pcmk_action_t* pcmk__new_shutdown_action ( pcmk_node_t node)

Definition at line 1055 of file pcmk_sched_actions.c.

◆ pcmk__output_actions()

void pcmk__output_actions ( pcmk_scheduler_t scheduler)

Definition at line 1393 of file pcmk_sched_actions.c.

◆ pcmk__update_action_for_orderings()

void pcmk__update_action_for_orderings ( pcmk_action_t then,
pcmk_scheduler_t scheduler 
)

Definition at line 505 of file pcmk_sched_actions.c.

◆ pcmk__update_ordered_actions()

uint32_t pcmk__update_ordered_actions ( pcmk_action_t first,
pcmk_action_t then,
const pcmk_node_t node,
uint32_t  flags,
uint32_t  filter,
uint32_t  type,
pcmk_scheduler_t scheduler 
)

Definition at line 840 of file pcmk_sched_actions.c.