pacemaker  1.1.18-7fdfbbe
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
unpack.c File Reference
#include <crm_internal.h>
#include <glib.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 <unpack.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)
 
gboolean unpack_rsc_op (resource_t *rsc, node_t *node, xmlNode *xml_op, xmlNode **last_failure, enum action_fail_response *failed, pe_working_set_t *data_set)
 
void pe_fence_node (pe_working_set_t *data_set, node_t *node, const char *reason)
 Schedule a fence action for a node. More...
 
gboolean unpack_config (xmlNode *config, pe_working_set_t *data_set)
 
node_tpe_create_node (const char *id, const char *uname, const char *type, const char *score, pe_working_set_t *data_set)
 
bool remote_id_conflict (const char *remote_name, pe_working_set_t *data)
 
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)
 
gboolean determine_online_status (xmlNode *node_state, node_t *this_node, 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)
 
resource_tcreate_child_clone (resource_t *rsc, int sub_id, pe_working_set_t *data_set)
 
void calculate_active_ops (GListPtr sorted_op_list, int *start_index, int *stop_index)
 
gboolean unpack_lrm_resources (node_t *node, xmlNode *lrm_rsc_list, pe_working_set_t *data_set)
 
int get_target_rc (xmlNode *xml_op)
 
gboolean add_node_attrs (xmlNode *xml_obj, node_t *node, gboolean overwrite, pe_working_set_t *data_set)
 
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

#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)
const char * pe_pref(GHashTable *options, const char *name)
Definition: common.c:190
#define clear_bit(word, bit)
Definition: crm_internal.h:191
#define set_bit(word, bit)
Definition: crm_internal.h:190
gboolean crm_is_true(const char *s)
Definition: strings.c:165

Definition at line 34 of file unpack.c.

#define STATUS_PATH_MAX   1024

Definition at line 2375 of file unpack.c.

#define XPATH_ENABLE_UNFENCING
Value:
#define XML_CIB_TAG_RESOURCES
Definition: msg_xml.h:159
#define XML_TAG_META_SETS
Definition: msg_xml.h:185
#define XML_TAG_CIB
Definition: msg_xml.h:81
#define XPATH_UNFENCING_NVPAIR
Definition: unpack.c:148
#define XML_CIB_TAG_RSCCONFIG
Definition: msg_xml.h:165
#define XML_CIB_TAG_CONFIGURATION
Definition: msg_xml.h:157

Definition at line 154 of file unpack.c.

#define XPATH_UNFENCING_NVPAIR
Value:
"and @" XML_NVPAIR_ATTR_VALUE "='unfencing']"
#define XML_NVPAIR_ATTR_NAME
Definition: msg_xml.h:366
#define XML_RSC_ATTR_PROVIDES
Definition: msg_xml.h:228
#define XML_CIB_TAG_NVPAIR
Definition: msg_xml.h:181
#define XML_RSC_ATTR_REQUIRES
Definition: msg_xml.h:227
#define XML_NVPAIR_ATTR_VALUE
Definition: msg_xml.h:367

Definition at line 148 of file unpack.c.

Function Documentation

gboolean add_node_attrs ( xmlNode *  xml_obj,
node_t node,
gboolean  overwrite,
pe_working_set_t data_set 
)

Definition at line 3310 of file unpack.c.

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

Definition at line 2140 of file unpack.c.

char* clone_strip ( const char *  last_rsc_id)

Definition at line 1609 of file unpack.c.

char* clone_zero ( const char *  last_rsc_id)

Definition at line 1631 of file unpack.c.

resource_t* create_child_clone ( resource_t rsc,
int  sub_id,
pe_working_set_t data_set 
)

Definition at line 84 of file clone.c.

CRM_TRACE_INIT_DATA ( pe_status  )
gboolean determine_online_status ( xmlNode *  node_state,
node_t this_node,
pe_working_set_t data_set 
)

Definition at line 1489 of file unpack.c.

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

Definition at line 3418 of file unpack.c.

int get_target_rc ( xmlNode *  xml_op)

Definition at line 2972 of file unpack.c.

const char* pe_base_name_end ( const char *  id)

Definition at line 1569 of file unpack.c.

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 356 of file unpack.c.

void pe_fence_node ( pe_working_set_t data_set,
node_t node,
const char *  reason 
)

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

Definition at line 77 of file unpack.c.

bool remote_id_conflict ( const char *  remote_name,
pe_working_set_t data 
)

Definition at line 418 of file unpack.c.

gboolean unpack_config ( xmlNode *  config,
pe_working_set_t data_set 
)

Definition at line 176 of file unpack.c.

gboolean unpack_lrm_resources ( node_t node,
xmlNode *  lrm_rsc_list,
pe_working_set_t data_set 
)

Definition at line 2322 of file unpack.c.

gboolean unpack_nodes ( xmlNode *  xml_nodes,
pe_working_set_t data_set 
)

Definition at line 525 of file unpack.c.

gboolean unpack_remote_nodes ( xmlNode *  xml_resources,
pe_working_set_t data_set 
)

Definition at line 611 of file unpack.c.

gboolean unpack_resources ( xmlNode *  xml_resources,
pe_working_set_t data_set 
)

Definition at line 737 of file unpack.c.

gboolean unpack_rsc_op ( resource_t rsc,
node_t node,
xmlNode *  xml_op,
xmlNode **  last_failure,
enum action_fail_response failed,
pe_working_set_t data_set 
)

Definition at line 3091 of file unpack.c.

gboolean unpack_status ( xmlNode *  status,
pe_working_set_t data_set 
)

Definition at line 1157 of file unpack.c.

gboolean unpack_tags ( xmlNode *  xml_tags,
pe_working_set_t data_set 
)

Definition at line 797 of file unpack.c.

Variable Documentation

uint32_t pe_wo = 0

Definition at line 50 of file unpack.c.