pacemaker  2.0.3-4b1f869f0f
Scalable High-Availability cluster resource manager
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

◆ INFINITY_HACK

#define INFINITY_HACK   (INFINITY * -100)

Definition at line 20 of file pcmk_sched_native.c.

◆ log_change

#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)

Definition at line 2251 of file pcmk_sched_native.c.

◆ STOP_SANITY_ASSERT

#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)

Definition at line 2263 of file pcmk_sched_native.c.

◆ VARIANT_NATIVE

#define VARIANT_NATIVE   1

Definition at line 22 of file pcmk_sched_native.c.

Function Documentation

◆ DeleteRsc()

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

Definition at line 2754 of file pcmk_sched_native.c.

◆ DemoteRsc()

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

Definition at line 2719 of file pcmk_sched_native.c.

◆ filter_colocation_constraint()

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

Definition at line 1609 of file pcmk_sched_native.c.

◆ LogActions()

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

Definition at line 2378 of file pcmk_sched_native.c.

◆ native_action_flags()

enum pe_action_flags native_action_flags ( action_t action,
node_t node 
)

Definition at line 1931 of file pcmk_sched_native.c.

◆ native_append_meta()

void native_append_meta ( resource_t rsc,
xmlNode *  xml 
)

Definition at line 3332 of file pcmk_sched_native.c.

◆ native_color()

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.

◆ native_create_actions()

void native_create_actions ( resource_t rsc,
pe_working_set_t data_set 
)

Definition at line 1119 of file pcmk_sched_native.c.

◆ native_create_probe()

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

Definition at line 2784 of file pcmk_sched_native.c.

◆ native_expand()

void native_expand ( resource_t rsc,
pe_working_set_t data_set 
)

Definition at line 2230 of file pcmk_sched_native.c.

◆ native_internal_constraints()

void native_internal_constraints ( resource_t rsc,
pe_working_set_t data_set 
)

Definition at line 1376 of file pcmk_sched_native.c.

◆ native_merge_weights()

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.

◆ native_rsc_colocation_lh()

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 1589 of file pcmk_sched_native.c.

◆ native_rsc_colocation_rh()

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 1799 of file pcmk_sched_native.c.

◆ native_rsc_colocation_rh_must()

void native_rsc_colocation_rh_must ( resource_t rsc_lh,
gboolean  update_lh,
resource_t rsc_rh,
gboolean  update_rh 
)

◆ native_rsc_colocation_rh_mustnot()

void native_rsc_colocation_rh_mustnot ( resource_t rsc_lh,
gboolean  update_lh,
resource_t rsc_rh,
gboolean  update_rh 
)

◆ native_rsc_location()

void native_rsc_location ( pe_resource_t rsc,
pe__location_t constraint 
)

Definition at line 2165 of file pcmk_sched_native.c.

◆ native_update_actions()

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 2010 of file pcmk_sched_native.c.

◆ node_hash_dup()

GHashTable* node_hash_dup ( GHashTable *  hash)

Definition at line 286 of file pcmk_sched_native.c.

◆ NullOp()

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

Definition at line 2746 of file pcmk_sched_native.c.

◆ PromoteRsc()

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

Definition at line 2678 of file pcmk_sched_native.c.

◆ ReloadRsc()

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

Definition at line 3275 of file pcmk_sched_native.c.

◆ RoleError()

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

Definition at line 2737 of file pcmk_sched_native.c.

◆ rsc_merge_weights()

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.

◆ rsc_stonith_ordering()

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

Definition at line 3254 of file pcmk_sched_native.c.

◆ rsc_ticket_constraint()

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

Definition at line 1841 of file pcmk_sched_native.c.

◆ StartRsc()

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

Definition at line 2659 of file pcmk_sched_native.c.

◆ StopRsc()

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

Definition at line 2575 of file pcmk_sched_native.c.

Variable Documentation

◆ rsc_action_matrix

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

◆ rsc_state_matrix

enum rsc_role_e rsc_state_matrix[RSC_ROLE_MAX][RSC_ROLE_MAX]
StopRsc
gboolean StopRsc(resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
Definition: pcmk_sched_native.c:2575
RSC_ROLE_STOPPED
@ RSC_ROLE_STOPPED
Definition: common.h:100
RSC_ROLE_MASTER
@ RSC_ROLE_MASTER
Definition: common.h:103
RSC_ROLE_SLAVE
@ RSC_ROLE_SLAVE
Definition: common.h:102
DemoteRsc
gboolean DemoteRsc(resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
Definition: pcmk_sched_native.c:2719
RSC_ROLE_UNKNOWN
@ RSC_ROLE_UNKNOWN
Definition: common.h:99
pe_action_optional
@ pe_action_optional
Definition: pe_types.h:270
StartRsc
gboolean StartRsc(resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
Definition: pcmk_sched_native.c:2659
RoleError
gboolean RoleError(resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
Definition: pcmk_sched_native.c:2737
RSC_ROLE_STARTED
@ RSC_ROLE_STARTED
Definition: common.h:101
NullOp
gboolean NullOp(resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
Definition: pcmk_sched_native.c:2746
PromoteRsc
gboolean PromoteRsc(resource_t *rsc, node_t *next, gboolean optional, pe_working_set_t *data_set)
Definition: pcmk_sched_native.c:2678