| 34 | gboolean rsc_update_action(action_t * first, action_t * then, enum pe_ordering type); |
| 35 | |
| 36 | static enum pe_action_flags |
| 37 | get_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 | |
| 70 | static char * |
| 71 | convert_non_atomic_uuid(char *old_uuid, resource_t * rsc, gboolean allow_notify, |
no test coverage detected