pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
Macros | Functions
unpack.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include <time.h>
#include <crm/crm.h>
#include <crm/services.h>
#include <crm/common/xml.h>
#include <crm/common/xml_internal.h>
#include <crm/common/util.h>
#include <crm/pengine/rules.h>
#include <crm/pengine/internal.h>
#include <pe_status_private.h>
Include dependency graph for unpack.c:

Go to the source code of this file.

Macros

#define set_config_flag(scheduler, option, flag)
 
#define XPATH_UNFENCING_NVPAIR
 
#define XPATH_ENABLE_UNFENCING
 
#define XPATH_NODE_STATE
 
#define SUB_XPATH_LRM_RESOURCE
 
#define SUB_XPATH_LRM_RSC_OP   "/" PCMK__XE_LRM_RSC_OP
 

Functions

 CRM_TRACE_INIT_DATA (pe_status)
 
void pe_fence_node (pcmk_scheduler_t *scheduler, pcmk_node_t *node, const char *reason, bool priority_delay)
 Schedule a fence action for a node. More...
 
gboolean unpack_config (xmlNode *config, pcmk_scheduler_t *scheduler)
 
pcmk_node_tpe_create_node (const char *id, const char *uname, const char *type, int score, pcmk_scheduler_t *scheduler)
 
gboolean unpack_nodes (xmlNode *xml_nodes, pcmk_scheduler_t *scheduler)
 
gboolean unpack_remote_nodes (xmlNode *xml_resources, pcmk_scheduler_t *scheduler)
 
gboolean unpack_resources (const xmlNode *xml_resources, pcmk_scheduler_t *scheduler)
 
void pcmk__unpack_fencing_topology (const xmlNode *xml_fencing_topology, pcmk_scheduler_t *scheduler)
 
gboolean unpack_tags (xmlNode *xml_tags, pcmk_scheduler_t *scheduler)
 
gboolean unpack_status (xmlNode *status, pcmk_scheduler_t *scheduler)
 
const char * pe_base_name_end (const char *id)
 
char * clone_strip (const char *last_rsc_id)
 
char * clone_zero (const char *last_rsc_id)
 
void calculate_active_ops (const GList *sorted_op_list, int *start_index, int *stop_index)
 
int pe__target_rc_from_xml (const xmlNode *xml_op)
 
GList * find_operations (const char *rsc, const char *node, gboolean active_filter, pcmk_scheduler_t *scheduler)
 

Macro Definition Documentation

◆ set_config_flag

#define set_config_flag (   scheduler,
  option,
  flag 
)
Value:
do { \
GHashTable *config_hash = (scheduler)->config_hash; \
const char *scf_value = pcmk__cluster_option(config_hash, (option)); \
\
if (scf_value != NULL) { \
if (crm_is_true(scf_value)) { \
(scheduler)->flags = pcmk__set_flags_as(__func__, __LINE__, \
LOG_TRACE, "Scheduler", \
(flag), #flag); \
} else { \
(scheduler)->flags = pcmk__clear_flags_as(__func__, __LINE__, \
LOG_TRACE, "Scheduler", \
(flag), #flag); \
} \
} \
} while(0)
#define LOG_TRACE
Definition: logging.h:38
char * crm_system_name
Definition: utils.c:48
const char * pcmk__cluster_option(GHashTable *options, const char *name)
Definition: options.c:1419
pcmk_scheduler_t * scheduler
gboolean crm_is_true(const char *s)
Definition: strings.c:500
uint64_t flags
Definition: remote.c:215

Definition at line 51 of file unpack.c.

◆ SUB_XPATH_LRM_RESOURCE

#define SUB_XPATH_LRM_RESOURCE
Value:
#define PCMK__XE_LRM_RESOURCES
#define PCMK__XE_LRM_RESOURCE
#define PCMK__XE_LRM

Definition at line 2962 of file unpack.c.

◆ SUB_XPATH_LRM_RSC_OP

#define SUB_XPATH_LRM_RSC_OP   "/" PCMK__XE_LRM_RSC_OP

Definition at line 2965 of file unpack.c.

◆ XPATH_ENABLE_UNFENCING

#define XPATH_ENABLE_UNFENCING
Value:
#define PCMK_XE_CIB
Definition: xml_names.h:79
#define PCMK_XE_RSC_DEFAULTS
Definition: xml_names.h:186
#define XPATH_UNFENCING_NVPAIR
Definition: unpack.c:187
#define PCMK_XE_CONFIGURATION
Definition: xml_names.h:87
#define PCMK_XE_META_ATTRIBUTES
Definition: xml_names.h:130
#define PCMK_XE_RESOURCES
Definition: xml_names.h:179

Definition at line 193 of file unpack.c.

◆ XPATH_NODE_STATE

#define XPATH_NODE_STATE
Value:
#define PCMK_XE_CIB
Definition: xml_names.h:79
#define PCMK_XE_STATUS
Definition: xml_names.h:204
#define PCMK__XE_NODE_STATE

Definition at line 2960 of file unpack.c.

◆ XPATH_UNFENCING_NVPAIR

#define XPATH_UNFENCING_NVPAIR
Value:
"or @" PCMK_XA_NAME "='" PCMK_META_REQUIRES "') " \
#define PCMK_XE_NVPAIR
Definition: xml_names.h:144
#define PCMK_XA_NAME
Definition: xml_names.h:330
#define PCMK_META_REQUIRES
Definition: options.h:110
#define PCMK_STONITH_PROVIDES
Definition: agents.h:48
#define PCMK_XA_VALUE
Definition: xml_names.h:442
#define PCMK_VALUE_UNFENCING
Definition: options.h:216

Definition at line 187 of file unpack.c.

Function Documentation

◆ calculate_active_ops()

void calculate_active_ops ( const GList *  sorted_op_list,
int *  start_index,
int *  stop_index 
)

Definition at line 2657 of file unpack.c.

◆ clone_strip()

char* clone_strip ( const char *  last_rsc_id)

Definition at line 1988 of file unpack.c.

◆ clone_zero()

char* clone_zero ( const char *  last_rsc_id)

Definition at line 2010 of file unpack.c.

◆ CRM_TRACE_INIT_DATA()

CRM_TRACE_INIT_DATA ( pe_status  )

◆ find_operations()

GList* find_operations ( const char *  rsc,
const char *  node,
gboolean  active_filter,
pcmk_scheduler_t scheduler 
)

Definition at line 5164 of file unpack.c.

◆ pcmk__unpack_fencing_topology()

void pcmk__unpack_fencing_topology ( const xmlNode *  xml_fencing_topology,
pcmk_scheduler_t scheduler 
)

Definition at line 946 of file unpack.c.

◆ pe__target_rc_from_xml()

int pe__target_rc_from_xml ( const xmlNode *  xml_op)

Definition at line 4418 of file unpack.c.

◆ pe_base_name_end()

const char* pe_base_name_end ( const char *  id)

Definition at line 1948 of file unpack.c.

◆ pe_create_node()

pcmk_node_t* pe_create_node ( const char *  id,
const char *  uname,
const char *  type,
int  score,
pcmk_scheduler_t scheduler 
)

Definition at line 470 of file unpack.c.

◆ pe_fence_node()

void pe_fence_node ( pcmk_scheduler_t scheduler,
pcmk_node_t node,
const char *  reason,
bool  priority_delay 
)

Schedule a fence action for a node.

Parameters
[in,out]schedulerScheduler data
[in,out]nodeNode to fence
[in]reasonText description of why fencing is needed
[in]priority_delayWhether to consider PCMK_OPT_PRIORITY_FENCING_DELAY

Definition at line 112 of file unpack.c.

◆ unpack_config()

gboolean unpack_config ( xmlNode *  config,
pcmk_scheduler_t scheduler 
)

Definition at line 214 of file unpack.c.

◆ unpack_nodes()

gboolean unpack_nodes ( xmlNode *  xml_nodes,
pcmk_scheduler_t scheduler 
)

Definition at line 638 of file unpack.c.

◆ unpack_remote_nodes()

gboolean unpack_remote_nodes ( xmlNode *  xml_resources,
pcmk_scheduler_t scheduler 
)

Definition at line 727 of file unpack.c.

◆ unpack_resources()

gboolean unpack_resources ( const xmlNode *  xml_resources,
pcmk_scheduler_t scheduler 
)

Definition at line 871 of file unpack.c.

◆ unpack_status()

gboolean unpack_status ( xmlNode *  status,
pcmk_scheduler_t scheduler 
)

Definition at line 1437 of file unpack.c.

◆ unpack_tags()

gboolean unpack_tags ( xmlNode *  xml_tags,
pcmk_scheduler_t scheduler 
)

Definition at line 973 of file unpack.c.