pacemaker  2.0.4-2deceaa3ae
Scalable High-Availability cluster resource manager
Macros | Functions | Variables
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/msg_xml.h>
#include <crm/common/xml.h>
#include <crm/common/util.h>
#include <crm/pengine/rules.h>
#include <crm/pengine/internal.h>
#include <crm/common/iso8601_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(data_set, option, flag)
 
#define XPATH_UNFENCING_NVPAIR
 
#define XPATH_ENABLE_UNFENCING
 
#define STATUS_PATH_MAX   1024
 

Functions

 CRM_TRACE_INIT_DATA (pe_status)
 
void pe_fence_node (pe_working_set_t *data_set, pe_node_t *node, const char *reason, bool priority_delay)
 Schedule a fence action for a node. More...
 
gboolean unpack_config (xmlNode *config, pe_working_set_t *data_set)
 
pe_node_tpe_create_node (const char *id, const char *uname, const char *type, const char *score, pe_working_set_t *data_set)
 
gboolean unpack_nodes (xmlNode *xml_nodes, pe_working_set_t *data_set)
 
gboolean unpack_remote_nodes (xmlNode *xml_resources, pe_working_set_t *data_set)
 
gboolean unpack_resources (xmlNode *xml_resources, pe_working_set_t *data_set)
 
gboolean unpack_tags (xmlNode *xml_tags, pe_working_set_t *data_set)
 
gboolean unpack_status (xmlNode *status, pe_working_set_t *data_set)
 
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 (GListPtr sorted_op_list, int *start_index, int *stop_index)
 
int pe__target_rc_from_xml (xmlNode *xml_op)
 
GListPtr find_operations (const char *rsc, const char *node, gboolean active_filter, pe_working_set_t *data_set)
 

Variables

uint32_t pe_wo = 0
 

Macro Definition Documentation

◆ set_config_flag

#define set_config_flag (   data_set,
  option,
  flag 
)
Value:
do { \
const char *tmp = pe_pref(data_set->config_hash, option); \
if(tmp) { \
if(crm_is_true(tmp)) { \
set_bit(data_set->flags, flag); \
} else { \
clear_bit(data_set->flags, flag); \
} \
} \
} while(0)
gboolean crm_is_true(const char *s)
Definition: strings.c:278
const char * pe_pref(GHashTable *options, const char *name)
Definition: common.c:315

Definition at line 30 of file unpack.c.

◆ STATUS_PATH_MAX

#define STATUS_PATH_MAX   1024

Definition at line 2434 of file unpack.c.

◆ XPATH_ENABLE_UNFENCING

#define XPATH_ENABLE_UNFENCING
Value:
#define XML_TAG_CIB
Definition: msg_xml.h:76
#define XML_CIB_TAG_RESOURCES
Definition: msg_xml.h:140
#define XML_CIB_TAG_RSCCONFIG
Definition: msg_xml.h:146
#define XML_TAG_META_SETS
Definition: msg_xml.h:164
#define XML_CIB_TAG_CONFIGURATION
Definition: msg_xml.h:138
#define XPATH_UNFENCING_NVPAIR
Definition: unpack.c:160

Definition at line 166 of file unpack.c.

◆ XPATH_UNFENCING_NVPAIR

#define XPATH_UNFENCING_NVPAIR
Value:
"and @" XML_NVPAIR_ATTR_VALUE "='unfencing']"
#define XML_NVPAIR_ATTR_VALUE
Definition: msg_xml.h:340
#define XML_RSC_ATTR_REQUIRES
Definition: msg_xml.h:203
#define XML_NVPAIR_ATTR_NAME
Definition: msg_xml.h:339
#define XML_CIB_TAG_NVPAIR
Definition: msg_xml.h:160
#define XML_RSC_ATTR_PROVIDES
Definition: msg_xml.h:204

Definition at line 160 of file unpack.c.

Function Documentation

◆ calculate_active_ops()

void calculate_active_ops ( GListPtr  sorted_op_list,
int *  start_index,
int *  stop_index 
)

Definition at line 2167 of file unpack.c.

◆ clone_strip()

char* clone_strip ( const char *  last_rsc_id)

Definition at line 1546 of file unpack.c.

◆ clone_zero()

char* clone_zero ( const char *  last_rsc_id)

Definition at line 1568 of file unpack.c.

◆ CRM_TRACE_INIT_DATA()

CRM_TRACE_INIT_DATA ( pe_status  )

◆ find_operations()

GListPtr find_operations ( const char *  rsc,
const char *  node,
gboolean  active_filter,
pe_working_set_t data_set 
)

Definition at line 3926 of file unpack.c.

◆ pe__target_rc_from_xml()

int pe__target_rc_from_xml ( xmlNode *  xml_op)

Definition at line 3391 of file unpack.c.

◆ pe_base_name_end()

const char* pe_base_name_end ( const char *  id)

Definition at line 1506 of file unpack.c.

◆ pe_create_node()

pe_node_t* pe_create_node ( const char *  id,
const char *  uname,
const char *  type,
const char *  score,
pe_working_set_t data_set 
)

Definition at line 378 of file unpack.c.

◆ pe_fence_node()

void pe_fence_node ( pe_working_set_t data_set,
pe_node_t node,
const char *  reason,
bool  priority_delay 
)

Schedule a fence action for a node.

Parameters
[in,out]data_setCurrent working set of cluster
[in,out]nodeNode to fence
[in]reasonText description of why fencing is needed
[in]priority_delayWhether to consider priority-fencing-delay

Definition at line 85 of file unpack.c.

◆ unpack_config()

gboolean unpack_config ( xmlNode *  config,
pe_working_set_t data_set 
)

Definition at line 188 of file unpack.c.

◆ unpack_nodes()

gboolean unpack_nodes ( xmlNode *  xml_nodes,
pe_working_set_t data_set 
)

Definition at line 518 of file unpack.c.

◆ unpack_remote_nodes()

gboolean unpack_remote_nodes ( xmlNode *  xml_resources,
pe_working_set_t data_set 
)

Definition at line 608 of file unpack.c.

◆ unpack_resources()

gboolean unpack_resources ( xmlNode *  xml_resources,
pe_working_set_t data_set 
)

Definition at line 745 of file unpack.c.

◆ unpack_status()

gboolean unpack_status ( xmlNode *  status,
pe_working_set_t data_set 
)

Definition at line 1100 of file unpack.c.

◆ unpack_tags()

gboolean unpack_tags ( xmlNode *  xml_tags,
pe_working_set_t data_set 
)

Definition at line 808 of file unpack.c.

Variable Documentation

◆ pe_wo

uint32_t pe_wo = 0

Definition at line 57 of file unpack.c.