pacemaker  2.0.4-2deceaa
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 ReloadRsc (pe_resource_t *rsc, pe_node_t *node, pe_working_set_t *data_set)
 
gboolean DeleteRsc (pe_resource_t *rsc, pe_node_t *node, gboolean optional, pe_working_set_t *data_set)
 
gboolean StopRsc (pe_resource_t *rsc, pe_node_t *next, gboolean optional, pe_working_set_t *data_set)
 
gboolean StartRsc (pe_resource_t *rsc, pe_node_t *next, gboolean optional, pe_working_set_t *data_set)
 
gboolean DemoteRsc (pe_resource_t *rsc, pe_node_t *next, gboolean optional, pe_working_set_t *data_set)
 
gboolean PromoteRsc (pe_resource_t *rsc, pe_node_t *next, gboolean optional, pe_working_set_t *data_set)
 
gboolean RoleError (pe_resource_t *rsc, pe_node_t *next, gboolean optional, pe_working_set_t *data_set)
 
gboolean NullOp (pe_resource_t *rsc, pe_node_t *next, gboolean optional, pe_working_set_t *data_set)
 
GHashTable * pcmk__native_merge_weights (pe_resource_t *rsc, const char *rhs, GHashTable *nodes, const char *attr, float factor, uint32_t flags)
 
pe_node_tpcmk__native_allocate (pe_resource_t *rsc, pe_node_t *prefer, pe_working_set_t *data_set)
 
void native_create_actions (pe_resource_t *rsc, pe_working_set_t *data_set)
 
void native_internal_constraints (pe_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 (pe_resource_t *rsc_lh, pe_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 (pe_resource_t *rsc_lh, rsc_ticket_t *rsc_ticket, pe_working_set_t *data_set)
 
enum pe_action_flags native_action_flags (pe_action_t *action, pe_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 (pe_resource_t *rsc, pe_working_set_t *data_set)
 
void LogActions (pe_resource_t *rsc, pe_working_set_t *data_set, gboolean terminal)
 
gboolean native_create_probe (pe_resource_t *rsc, pe_node_t *node, pe_action_t *complete, gboolean force, pe_working_set_t *data_set)
 
void rsc_stonith_ordering (pe_resource_t *rsc, pe_action_t *stonith_op, pe_working_set_t *data_set)
 
void native_append_meta (pe_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])(pe_resource_t *, pe_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:365

Definition at line 2327 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:363
#define CRM_ASSERT(expr)
Definition: results.h:42

Definition at line 2339 of file pcmk_sched_native.c.

#define VARIANT_NATIVE   1

Definition at line 22 of file pcmk_sched_native.c.

Function Documentation

gboolean DeleteRsc ( pe_resource_t rsc,
pe_node_t node,
gboolean  optional,
pe_working_set_t data_set 
)

Definition at line 2821 of file pcmk_sched_native.c.

gboolean DemoteRsc ( pe_resource_t rsc,
pe_node_t next,
gboolean  optional,
pe_working_set_t data_set 
)

Definition at line 2786 of file pcmk_sched_native.c.

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

Definition at line 1684 of file pcmk_sched_native.c.

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

Definition at line 2454 of file pcmk_sched_native.c.

enum pe_action_flags native_action_flags ( pe_action_t action,
pe_node_t node 
)

Definition at line 2006 of file pcmk_sched_native.c.

void native_append_meta ( pe_resource_t rsc,
xmlNode *  xml 
)

Definition at line 3391 of file pcmk_sched_native.c.

void native_create_actions ( pe_resource_t rsc,
pe_working_set_t data_set 
)

Definition at line 1193 of file pcmk_sched_native.c.

gboolean native_create_probe ( pe_resource_t rsc,
pe_node_t node,
pe_action_t complete,
gboolean  force,
pe_working_set_t data_set 
)

Definition at line 2851 of file pcmk_sched_native.c.

void native_expand ( pe_resource_t rsc,
pe_working_set_t data_set 
)

Definition at line 2306 of file pcmk_sched_native.c.

void native_internal_constraints ( pe_resource_t rsc,
pe_working_set_t data_set 
)

Definition at line 1436 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 1661 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 1877 of file pcmk_sched_native.c.

void native_rsc_location ( pe_resource_t rsc,
pe__location_t constraint 
)

Definition at line 2240 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 2085 of file pcmk_sched_native.c.

gboolean NullOp ( pe_resource_t rsc,
pe_node_t next,
gboolean  optional,
pe_working_set_t data_set 
)

Definition at line 2813 of file pcmk_sched_native.c.

pe_node_t* pcmk__native_allocate ( pe_resource_t rsc,
pe_node_t prefer,
pe_working_set_t data_set 
)

Definition at line 488 of file pcmk_sched_native.c.

GHashTable* pcmk__native_merge_weights ( pe_resource_t rsc,
const char *  rhs,
GHashTable *  nodes,
const char *  attr,
float  factor,
uint32_t  flags 
)

Definition at line 341 of file pcmk_sched_native.c.

gboolean PromoteRsc ( pe_resource_t rsc,
pe_node_t next,
gboolean  optional,
pe_working_set_t data_set 
)

Definition at line 2745 of file pcmk_sched_native.c.

void ReloadRsc ( pe_resource_t rsc,
pe_node_t node,
pe_working_set_t data_set 
)

Definition at line 3344 of file pcmk_sched_native.c.

gboolean RoleError ( pe_resource_t rsc,
pe_node_t next,
gboolean  optional,
pe_working_set_t data_set 
)

Definition at line 2804 of file pcmk_sched_native.c.

void rsc_stonith_ordering ( pe_resource_t rsc,
pe_action_t stonith_op,
pe_working_set_t data_set 
)

Definition at line 3323 of file pcmk_sched_native.c.

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

Definition at line 1916 of file pcmk_sched_native.c.

gboolean StartRsc ( pe_resource_t rsc,
pe_node_t next,
gboolean  optional,
pe_working_set_t data_set 
)

Definition at line 2726 of file pcmk_sched_native.c.

gboolean StopRsc ( pe_resource_t rsc,
pe_node_t next,
gboolean  optional,
pe_working_set_t data_set 
)

Definition at line 2642 of file pcmk_sched_native.c.

Variable Documentation

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

Definition at line 55 of file pcmk_sched_native.c.

enum rsc_role_e rsc_state_matrix[RSC_ROLE_MAX][RSC_ROLE_MAX]