pacemaker  2.0.2-debe490
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
pcmk_sched_native.c File Reference
#include <crm_internal.h>
#include <crm/pengine/rules.h>
#include <crm/msg_xml.h>
#include <pacemaker-internal.h>
#include <crm/services.h>
#include <lib/pengine/variant.h>
Include dependency graph for pcmk_sched_native.c:

Go to the source code of this file.

Macros

#define INFINITY_HACK   (INFINITY * -100)
 
#define VARIANT_NATIVE   1
 
#define log_change(a, fmt, args...)
 
#define STOP_SANITY_ASSERT(lineno)
 

Functions

void native_rsc_colocation_rh_must (resource_t *rsc_lh, gboolean update_lh, resource_t *rsc_rh, gboolean update_rh)
 
void native_rsc_colocation_rh_mustnot (resource_t *rsc_lh, gboolean update_lh, resource_t *rsc_rh, gboolean update_rh)
 
void ReloadRsc (resource_t *rsc, node_t *node, pe_working_set_t *data_set)
 
gboolean DeleteRsc (resource_t *rsc, node_t *node, gboolean optional, pe_working_set_t *data_set)
 
gboolean StopRsc (resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
 
gboolean StartRsc (resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
 
gboolean DemoteRsc (resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
 
gboolean PromoteRsc (resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
 
gboolean RoleError (resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
 
gboolean NullOp (resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
 
GHashTable * node_hash_dup (GHashTable *hash)
 
GHashTable * native_merge_weights (resource_t *rsc, const char *rhs, GHashTable *nodes, const char *attr, float factor, enum pe_weights flags)
 
GHashTable * rsc_merge_weights (resource_t *rsc, const char *rhs, GHashTable *nodes, const char *attr, float factor, enum pe_weights flags)
 
node_tnative_color (resource_t *rsc, node_t *prefer, pe_working_set_t *data_set)
 
void native_create_actions (resource_t *rsc, pe_working_set_t *data_set)
 
void native_internal_constraints (resource_t *rsc, pe_working_set_t *data_set)
 
void native_rsc_colocation_lh (pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, rsc_colocation_t *constraint, pe_working_set_t *data_set)
 
enum filter_colocation_res filter_colocation_constraint (resource_t *rsc_lh, resource_t *rsc_rh, rsc_colocation_t *constraint, gboolean preview)
 
void native_rsc_colocation_rh (pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, rsc_colocation_t *constraint, pe_working_set_t *data_set)
 
void rsc_ticket_constraint (resource_t *rsc_lh, rsc_ticket_t *rsc_ticket, pe_working_set_t *data_set)
 
enum pe_action_flags native_action_flags (action_t *action, node_t *node)
 
enum pe_graph_flags native_update_actions (pe_action_t *first, pe_action_t *then, pe_node_t *node, enum pe_action_flags flags, enum pe_action_flags filter, enum pe_ordering type, pe_working_set_t *data_set)
 
void native_rsc_location (pe_resource_t *rsc, pe__location_t *constraint)
 
void native_expand (resource_t *rsc, pe_working_set_t *data_set)
 
void LogActions (resource_t *rsc, pe_working_set_t *data_set, gboolean terminal)
 
gboolean native_create_probe (resource_t *rsc, node_t *node, action_t *complete, gboolean force, pe_working_set_t *data_set)
 
void rsc_stonith_ordering (resource_t *rsc, action_t *stonith_op, pe_working_set_t *data_set)
 
void native_append_meta (resource_t *rsc, xmlNode *xml)
 

Variables

enum rsc_role_e rsc_state_matrix [RSC_ROLE_MAX][RSC_ROLE_MAX]
 
gboolean(* rsc_action_matrix [RSC_ROLE_MAX][RSC_ROLE_MAX])(resource_t *, node_t *, gboolean, pe_working_set_t *)
 

Macro Definition Documentation

#define INFINITY_HACK   (INFINITY * -100)

Definition at line 20 of file pcmk_sched_native.c.

#define log_change (   a,
  fmt,
  args... 
)
Value:
do { \
if(a && a->reason && terminal) { \
printf(" * "fmt" \tdue to %s\n", ##args, a->reason); \
} else if(a && a->reason) { \
crm_notice(fmt" \tdue to %s", ##args, a->reason); \
} else if(terminal) { \
printf(" * "fmt"\n", ##args); \
} else { \
crm_notice(fmt, ##args); \
} \
} while(0)
#define crm_notice(fmt, args...)
Definition: logging.h:242

Definition at line 2238 of file pcmk_sched_native.c.

#define STOP_SANITY_ASSERT (   lineno)
Value:
do { \
if(current && current->details->unclean) { \
/* It will be a pseudo op */ \
} else if(stop == NULL) { \
crm_err("%s:%d: No stop action exists for %s", __FUNCTION__, lineno, rsc->id); \
CRM_ASSERT(stop != NULL); \
} else if(is_set(stop->flags, pe_action_optional)) { \
crm_err("%s:%d: Action %s is still optional", __FUNCTION__, lineno, stop->uuid); \
CRM_ASSERT(is_not_set(stop->flags, pe_action_optional)); \
} \
} while(0)
#define crm_err(fmt, args...)
Definition: logging.h:240
#define CRM_ASSERT(expr)
Definition: results.h:42

Definition at line 2250 of file pcmk_sched_native.c.

#define VARIANT_NATIVE   1

Definition at line 22 of file pcmk_sched_native.c.

Function Documentation

gboolean DeleteRsc ( resource_t rsc,
node_t node,
gboolean  optional,
pe_working_set_t data_set 
)

Definition at line 2732 of file pcmk_sched_native.c.

gboolean DemoteRsc ( resource_t rsc,
node_t next,
gboolean  optional,
pe_working_set_t data_set 
)

Definition at line 2697 of file pcmk_sched_native.c.

enum filter_colocation_res filter_colocation_constraint ( resource_t rsc_lh,
resource_t rsc_rh,
rsc_colocation_t constraint,
gboolean  preview 
)

Definition at line 1592 of file pcmk_sched_native.c.

void LogActions ( resource_t rsc,
pe_working_set_t data_set,
gboolean  terminal 
)

Definition at line 2365 of file pcmk_sched_native.c.

enum pe_action_flags native_action_flags ( action_t action,
node_t node 
)

Definition at line 1914 of file pcmk_sched_native.c.

void native_append_meta ( resource_t rsc,
xmlNode *  xml 
)

Definition at line 3302 of file pcmk_sched_native.c.

node_t* native_color ( resource_t rsc,
node_t prefer,
pe_working_set_t data_set 
)

Definition at line 437 of file pcmk_sched_native.c.

void native_create_actions ( resource_t rsc,
pe_working_set_t data_set 
)

Definition at line 1116 of file pcmk_sched_native.c.

gboolean native_create_probe ( resource_t rsc,
node_t node,
action_t complete,
gboolean  force,
pe_working_set_t data_set 
)

Definition at line 2762 of file pcmk_sched_native.c.

void native_expand ( resource_t rsc,
pe_working_set_t data_set 
)

Definition at line 2217 of file pcmk_sched_native.c.

void native_internal_constraints ( resource_t rsc,
pe_working_set_t data_set 
)

Definition at line 1359 of file pcmk_sched_native.c.

GHashTable* native_merge_weights ( resource_t rsc,
const char *  rhs,
GHashTable *  nodes,
const char *  attr,
float  factor,
enum pe_weights  flags 
)

Definition at line 297 of file pcmk_sched_native.c.

void native_rsc_colocation_lh ( pe_resource_t rsc_lh,
pe_resource_t rsc_rh,
rsc_colocation_t constraint,
pe_working_set_t data_set 
)

Definition at line 1572 of file pcmk_sched_native.c.

void native_rsc_colocation_rh ( pe_resource_t rsc_lh,
pe_resource_t rsc_rh,
rsc_colocation_t constraint,
pe_working_set_t data_set 
)

Definition at line 1782 of file pcmk_sched_native.c.

void native_rsc_colocation_rh_must ( resource_t rsc_lh,
gboolean  update_lh,
resource_t rsc_rh,
gboolean  update_rh 
)
void native_rsc_colocation_rh_mustnot ( resource_t rsc_lh,
gboolean  update_lh,
resource_t rsc_rh,
gboolean  update_rh 
)
void native_rsc_location ( pe_resource_t rsc,
pe__location_t constraint 
)

Definition at line 2148 of file pcmk_sched_native.c.

enum pe_graph_flags native_update_actions ( pe_action_t first,
pe_action_t then,
pe_node_t node,
enum pe_action_flags  flags,
enum pe_action_flags  filter,
enum pe_ordering  type,
pe_working_set_t data_set 
)

Definition at line 1993 of file pcmk_sched_native.c.

GHashTable* node_hash_dup ( GHashTable *  hash)

Definition at line 286 of file pcmk_sched_native.c.

gboolean NullOp ( resource_t rsc,
node_t next,
gboolean  optional,
pe_working_set_t data_set 
)

Definition at line 2724 of file pcmk_sched_native.c.

gboolean PromoteRsc ( resource_t rsc,
node_t next,
gboolean  optional,
pe_working_set_t data_set 
)

Definition at line 2656 of file pcmk_sched_native.c.

void ReloadRsc ( resource_t rsc,
node_t node,
pe_working_set_t data_set 
)

Definition at line 3255 of file pcmk_sched_native.c.

gboolean RoleError ( resource_t rsc,
node_t next,
gboolean  optional,
pe_working_set_t data_set 
)

Definition at line 2715 of file pcmk_sched_native.c.

GHashTable* rsc_merge_weights ( resource_t rsc,
const char *  rhs,
GHashTable *  nodes,
const char *  attr,
float  factor,
enum pe_weights  flags 
)

Definition at line 304 of file pcmk_sched_native.c.

void rsc_stonith_ordering ( resource_t rsc,
action_t stonith_op,
pe_working_set_t data_set 
)

Definition at line 3234 of file pcmk_sched_native.c.

void rsc_ticket_constraint ( resource_t rsc_lh,
rsc_ticket_t rsc_ticket,
pe_working_set_t data_set 
)

Definition at line 1824 of file pcmk_sched_native.c.

gboolean StartRsc ( resource_t rsc,
node_t next,
gboolean  optional,
pe_working_set_t data_set 
)

Definition at line 2637 of file pcmk_sched_native.c.

gboolean StopRsc ( resource_t rsc,
node_t next,
gboolean  optional,
pe_working_set_t data_set 
)

Definition at line 2553 of file pcmk_sched_native.c.

Variable Documentation

gboolean(* rsc_action_matrix[RSC_ROLE_MAX][RSC_ROLE_MAX])(resource_t *, node_t *, gboolean, pe_working_set_t *)
Initial value:
= {
}
gboolean PromoteRsc(resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
gboolean NullOp(resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
gboolean StopRsc(resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
gboolean DemoteRsc(resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
gboolean StartRsc(resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
gboolean RoleError(resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)

Definition at line 61 of file pcmk_sched_native.c.

enum rsc_role_e rsc_state_matrix[RSC_ROLE_MAX][RSC_ROLE_MAX]