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

Function rsc_expand_action

pengine/graph.c:146–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146static action_t *
147rsc_expand_action(action_t * action)
148{
149 action_t *result = action;
150
151 if (action->rsc && action->rsc->variant >= pe_group) {
152 /* Expand 'start' -> 'started' */
153 char *uuid = NULL;
154 gboolean notify = FALSE;
155
156 if (action->rsc->parent == NULL) {
157 /* Only outter-most resources have notification actions */
158 notify = is_set(action->rsc->flags, pe_rsc_notify);
159 }
160
161 uuid = convert_non_atomic_uuid(action->uuid, action->rsc, notify, FALSE);
162 if (uuid) {
163 pe_rsc_trace(action->rsc, "Converting %s to %s %d", action->uuid, uuid,
164 is_set(action->rsc->flags, pe_rsc_notify));
165 result = find_first_action(action->rsc->actions, uuid, NULL, NULL);
166 if (result == NULL) {
167 crm_err("Couldn't expand %s", action->uuid);
168 result = action;
169 }
170 free(uuid);
171 }
172 }
173 return result;
174}
175
176static enum pe_graph_flags
177graph_update_action(action_t * first, action_t * then, node_t * node, enum pe_action_flags flags,

Callers 1

update_actionFunction · 0.85

Calls 3

is_setFunction · 0.85
convert_non_atomic_uuidFunction · 0.85
find_first_actionFunction · 0.85

Tested by

no test coverage detected