pacemaker  2.1.3-ea053b43a
Scalable High-Availability cluster resource manager
Data Structures | Macros | Typedefs | Enumerations | Functions
pcmki_transition.h File Reference
#include <glib.h>
#include <crm/crm.h>
#include <crm/msg_xml.h>
#include <crm/common/xml.h>
Include dependency graph for pcmki_transition.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  synapse_s
 
struct  crm_action_s
 
struct  te_timer_s
 
struct  crm_graph_s
 
struct  crm_graph_functions_s
 

Macros

#define pcmk__set_synapse_flags(synapse, flags_to_set)
 
#define pcmk__clear_synapse_flags(synapse, flags_to_clear)
 
#define crm__set_graph_action_flags(action, flags_to_set)
 
#define crm__clear_graph_action_flags(action, flags_to_clear)
 

Typedefs

typedef struct te_timer_s crm_action_timer_t
 
typedef struct crm_graph_s crm_graph_t
 
typedef struct synapse_s synapse_t
 
typedef struct crm_action_s crm_action_t
 
typedef struct crm_graph_functions_s crm_graph_functions_t
 

Enumerations

enum  action_type_e { action_type_pseudo, action_type_rsc, action_type_crm }
 
enum  pcmk__synapse_flags { pcmk__synapse_ready = (1 << 0), pcmk__synapse_failed = (1 << 1), pcmk__synapse_executed = (1 << 2), pcmk__synapse_confirmed = (1 << 3) }
 
enum  pcmk__graph_action_flags {
  pcmk__graph_action_sent_update = (1 << 0), pcmk__graph_action_executed = (1 << 1), pcmk__graph_action_confirmed = (1 << 2), pcmk__graph_action_failed = (1 << 3),
  pcmk__graph_action_can_fail = (1 << 4)
}
 
enum  transition_action { tg_done, tg_stop, tg_restart, tg_shutdown }
 
enum  transition_status {
  transition_active, transition_pending, transition_complete, transition_stopped,
  transition_terminated, transition_action_failed, transition_failed
}
 

Functions

const char * synapse_state_str (synapse_t *synapse)
 
const char * action_state_str (crm_action_t *action)
 
void pcmk__set_graph_functions (crm_graph_functions_t *fns)
 
crm_graph_tpcmk__unpack_graph (xmlNode *xml_graph, const char *reference)
 
enum transition_status pcmk__execute_graph (crm_graph_t *graph)
 
void pcmk__update_graph (crm_graph_t *graph, crm_action_t *action)
 
void pcmk__free_graph (crm_graph_t *graph)
 
const char * pcmk__graph_status2text (enum transition_status state)
 
void pcmk__log_graph (unsigned int log_level, crm_graph_t *graph)
 
void pcmk__log_graph_action (int log_level, crm_action_t *action)
 
lrmd_event_data_tpcmk__event_from_graph_action (xmlNode *resource, crm_action_t *action, int status, int rc, const char *exit_reason)
 

Macro Definition Documentation

◆ crm__clear_graph_action_flags

#define crm__clear_graph_action_flags (   action,
  flags_to_clear 
)
Value:
do { \
(action)->flags = pcmk__clear_flags_as(__func__, __LINE__, \
"Action", "action", \
(action)->flags, (flags_to_clear), #flags_to_clear); \
} while (0)
#define LOG_TRACE
Definition: logging.h:37
const char * action
Definition: pcmk_fence.c:29
uint64_t flags
Definition: remote.c:149

Definition at line 97 of file pcmki_transition.h.

◆ crm__set_graph_action_flags

#define crm__set_graph_action_flags (   action,
  flags_to_set 
)
Value:
do { \
(action)->flags = pcmk__set_flags_as(__func__, __LINE__, \
"Action", "action", \
(action)->flags, (flags_to_set), #flags_to_set); \
} while (0)
#define LOG_TRACE
Definition: logging.h:37
const char * action
Definition: pcmk_fence.c:29
uint64_t flags
Definition: remote.c:149

Definition at line 90 of file pcmki_transition.h.

◆ pcmk__clear_synapse_flags

#define pcmk__clear_synapse_flags (   synapse,
  flags_to_clear 
)
Value:
do { \
(synapse)->flags = pcmk__clear_flags_as(__func__, __LINE__, \
"Synapse", "synapse", \
(synapse)->flags, (flags_to_clear), #flags_to_clear); \
} while (0)
#define LOG_TRACE
Definition: logging.h:37
uint64_t flags
Definition: remote.c:149

Definition at line 57 of file pcmki_transition.h.

◆ pcmk__set_synapse_flags

#define pcmk__set_synapse_flags (   synapse,
  flags_to_set 
)
Value:
do { \
(synapse)->flags = pcmk__set_flags_as(__func__, __LINE__, \
"Synapse", "synapse", \
(synapse)->flags, (flags_to_set), #flags_to_set); \
} while (0)
#define LOG_TRACE
Definition: logging.h:37
uint64_t flags
Definition: remote.c:149

Definition at line 50 of file pcmki_transition.h.

Typedef Documentation

◆ crm_action_t

typedef struct crm_action_s crm_action_t

◆ crm_action_timer_t

Definition at line 28 of file pcmki_transition.h.

◆ crm_graph_functions_t

◆ crm_graph_t

typedef struct crm_graph_s crm_graph_t

Definition at line 29 of file pcmki_transition.h.

◆ synapse_t

typedef struct synapse_s synapse_t

Enumeration Type Documentation

◆ action_type_e

Enumerator
action_type_pseudo 
action_type_rsc 
action_type_crm 

Definition at line 22 of file pcmki_transition.h.

◆ pcmk__graph_action_flags

Enumerator
pcmk__graph_action_sent_update 
pcmk__graph_action_executed 
pcmk__graph_action_confirmed 
pcmk__graph_action_failed 
pcmk__graph_action_can_fail 

Definition at line 64 of file pcmki_transition.h.

◆ pcmk__synapse_flags

Enumerator
pcmk__synapse_ready 
pcmk__synapse_failed 
pcmk__synapse_executed 
pcmk__synapse_confirmed 

Definition at line 31 of file pcmki_transition.h.

◆ transition_action

Enumerator
tg_done 
tg_stop 
tg_restart 
tg_shutdown 

Definition at line 111 of file pcmki_transition.h.

◆ transition_status

Enumerator
transition_active 
transition_pending 
transition_complete 
transition_stopped 
transition_terminated 
transition_action_failed 
transition_failed 

Definition at line 153 of file pcmki_transition.h.

Function Documentation

◆ action_state_str()

const char* action_state_str ( crm_action_t action)

◆ pcmk__event_from_graph_action()

lrmd_event_data_t* pcmk__event_from_graph_action ( xmlNode *  resource,
crm_action_t action,
int  status,
int  rc,
const char *  exit_reason 
)

Definition at line 812 of file pcmk_graph_consumer.c.

◆ pcmk__execute_graph()

enum transition_status pcmk__execute_graph ( crm_graph_t graph)

Definition at line 344 of file pcmk_graph_consumer.c.

◆ pcmk__free_graph()

void pcmk__free_graph ( crm_graph_t graph)

Definition at line 785 of file pcmk_graph_consumer.c.

◆ pcmk__graph_status2text()

const char* pcmk__graph_status2text ( enum transition_status  state)

Definition at line 26 of file pcmk_graph_logging.c.

◆ pcmk__log_graph()

void pcmk__log_graph ( unsigned int  log_level,
crm_graph_t graph 
)

Definition at line 199 of file pcmk_graph_logging.c.

◆ pcmk__log_graph_action()

void pcmk__log_graph_action ( int  log_level,
crm_action_t action 
)

Definition at line 193 of file pcmk_graph_logging.c.

◆ pcmk__set_graph_functions()

void pcmk__set_graph_functions ( crm_graph_functions_t fns)

Definition at line 146 of file pcmk_graph_consumer.c.

◆ pcmk__unpack_graph()

crm_graph_t* pcmk__unpack_graph ( xmlNode *  xml_graph,
const char *  reference 
)

Definition at line 661 of file pcmk_graph_consumer.c.

◆ pcmk__update_graph()

void pcmk__update_graph ( crm_graph_t graph,
crm_action_t action 
)

Definition at line 111 of file pcmk_graph_consumer.c.

◆ synapse_state_str()

const char* synapse_state_str ( synapse_t synapse)

Definition at line 94 of file pcmk_graph_logging.c.