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

Function get_action_flags

pengine/graph.c:36–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34gboolean rsc_update_action(action_t * first, action_t * then, enum pe_ordering type);
35
36static enum pe_action_flags
37get_action_flags(action_t * action, node_t * node)
38{
39 enum pe_action_flags flags = action->flags;
40
41 if (action->rsc) {
42 flags = action->rsc->cmds->action_flags(action, NULL);
43
44 if (action->rsc->variant >= pe_clone && node) {
45
46 /* We only care about activity on $node */
47 enum pe_action_flags clone_flags = action->rsc->cmds->action_flags(action, node);
48
49 /* Go to great lengths to ensure the correct value for pe_action_runnable...
50 *
51 * If we are a clone, then for _ordering_ constraints, its only relevant
52 * if we are runnable _anywhere_.
53 *
54 * This only applies to _runnable_ though, and only for ordering constraints.
55 * If this function is ever used during colocation, then we'll need additional logic
56 *
57 * Not very satisfying, but its logical and appears to work well.
58 */
59 if (is_not_set(clone_flags, pe_action_runnable)
60 && is_set(flags, pe_action_runnable)) {
61 pe_rsc_trace(action->rsc, "Fixing up runnable flag for %s", action->uuid);
62 set_bit(clone_flags, pe_action_runnable);
63 }
64 flags = clone_flags;
65 }
66 }
67 return flags;
68}
69
70static char *
71convert_non_atomic_uuid(char *old_uuid, resource_t * rsc, gboolean allow_notify,

Callers 1

update_actionFunction · 0.85

Calls 2

is_not_setFunction · 0.85
is_setFunction · 0.85

Tested by

no test coverage detected