MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / graph_update_action

Function graph_update_action

pengine/graph.c:176–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176static enum pe_graph_flags
177graph_update_action(action_t * first, action_t * then, node_t * node, enum pe_action_flags flags,
178 enum pe_ordering type)
179{
180 enum pe_graph_flags changed = pe_graph_none;
181 gboolean processed = FALSE;
182
183 /* TODO: Do as many of these in parallel as possible */
184
185 if (type & pe_order_implies_then) {
186 processed = TRUE;
187 if (then->rsc) {
188 changed |=
189 then->rsc->cmds->update_actions(first, then, node, flags & pe_action_optional,
190 pe_action_optional, pe_order_implies_then);
191
192 } else if (is_set(flags, pe_action_optional) == FALSE) {
193 if (update_action_flags(then, pe_action_optional | pe_action_clear)) {
194 changed |= pe_graph_updated_then;
195 }
196 }
197 if (changed) {
198 pe_rsc_trace(then->rsc, "implies right: %s then %s: changed", first->uuid, then->uuid);
199 } else {
200 crm_trace("implies right: %s then %s", first->uuid, then->uuid);
201 }
202 }
203
204 if ((type & pe_order_restart) && then->rsc) {
205 enum pe_action_flags restart = (pe_action_optional | pe_action_runnable);
206
207 processed = TRUE;
208 changed |=
209 then->rsc->cmds->update_actions(first, then, node, flags, restart,
210 pe_order_restart);
211 if (changed) {
212 pe_rsc_trace(then->rsc, "restart: %s then %s: changed", first->uuid, then->uuid);
213 } else {
214 crm_trace("restart: %s then %s", first->uuid, then->uuid);
215 }
216 }
217
218 if (type & pe_order_implies_first) {
219 processed = TRUE;
220 if (first->rsc) {
221 changed |=
222 first->rsc->cmds->update_actions(first, then, node, flags,
223 pe_action_optional, pe_order_implies_first);
224
225 } else if (is_set(flags, pe_action_optional) == FALSE) {
226 if (update_action_flags(first, pe_action_runnable | pe_action_clear)) {
227 changed |= pe_graph_updated_first;
228 }
229 }
230
231 if (changed) {
232 pe_rsc_trace(then->rsc, "implies left: %s then %s: changed", first->uuid, then->uuid);
233 } else {

Callers 1

update_actionFunction · 0.85

Calls 2

is_setFunction · 0.85
update_action_flagsFunction · 0.85

Tested by

no test coverage detected