This source file includes following definitions.
- pcmk__colocation_has_influence
1
2
3
4
5
6
7
8
9
10 #ifndef PENGINE__H
11 # define PENGINE__H
12
13 typedef struct rsc_ticket_s rsc_ticket_t;
14 typedef struct lrm_agent_s lrm_agent_t;
15
16 # include <glib.h>
17 # include <crm/crm.h>
18 # include <crm/common/iso8601.h>
19 # include <crm/pengine/rules.h>
20 # include <crm/pengine/common.h>
21 # include <crm/pengine/status.h>
22
23 # include <crm/pengine/complex.h>
24
25 enum pe_stop_fail {
26 pesf_block,
27 pesf_stonith,
28 pesf_ignore
29 };
30
31 enum pe_weights {
32 pe_weights_none = 0x0,
33 pe_weights_init = 0x1,
34 pe_weights_forward = 0x4,
35 pe_weights_positive = 0x8,
36 pe_weights_rollback = 0x10,
37 };
38
39 typedef struct {
40 const char *id;
41 const char *node_attribute;
42 pe_resource_t *dependent;
43 pe_resource_t *primary;
44
45 int dependent_role;
46 int primary_role;
47
48 int score;
49 bool influence;
50 } pcmk__colocation_t;
51
52 enum loss_ticket_policy_e {
53 loss_ticket_stop,
54 loss_ticket_demote,
55 loss_ticket_fence,
56 loss_ticket_freeze
57 };
58
59 struct rsc_ticket_s {
60 const char *id;
61 pe_resource_t *rsc_lh;
62 pe_ticket_t *ticket;
63 enum loss_ticket_policy_e loss_policy;
64
65 int role_lh;
66 };
67
68 extern gboolean stage0(pe_working_set_t * data_set);
69 extern gboolean probe_resources(pe_working_set_t * data_set);
70 extern gboolean stage2(pe_working_set_t * data_set);
71 extern gboolean stage4(pe_working_set_t * data_set);
72 extern gboolean stage5(pe_working_set_t * data_set);
73 extern gboolean stage6(pe_working_set_t * data_set);
74 extern gboolean stage8(pe_working_set_t * data_set);
75
76 void pcmk__unpack_constraints(pe_working_set_t *data_set);
77
78 extern void graph_element_from_action(pe_action_t * action, pe_working_set_t * data_set);
79 extern void add_maintenance_update(pe_working_set_t *data_set);
80 xmlNode *pcmk__schedule_actions(pe_working_set_t *data_set, xmlNode *xml_input,
81 crm_time_t *now);
82
83 extern const char *transition_idle_timeout;
84
85
86
87
88
89
90
91
92
93
94
95
96
97 static inline bool
98 pcmk__colocation_has_influence(const pcmk__colocation_t *colocation,
99 const pe_resource_t *rsc)
100 {
101 if (rsc == NULL) {
102 rsc = colocation->primary;
103 }
104
105
106
107
108 return colocation->influence || (rsc->running_on == NULL);
109 }
110
111 #endif