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

Function should_dump_input

pengine/graph.c:835–945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

833}
834
835static gboolean
836should_dump_input(int last_action, action_t * action, action_wrapper_t * wrapper)
837{
838 int type = wrapper->type;
839
840 type &= ~pe_order_implies_first_printed;
841 type &= ~pe_order_implies_then_printed;
842 type &= ~pe_order_optional;
843
844 wrapper->state = pe_link_not_dumped;
845 if (last_action == wrapper->action->id) {
846 crm_trace( "Input (%d) %s duplicated for %s",
847 wrapper->action->id, wrapper->action->uuid, action->uuid);
848 wrapper->state = pe_link_dup;
849 return FALSE;
850
851 } else if (wrapper->type == pe_order_none) {
852 crm_trace( "Input (%d) %s suppressed for %s",
853 wrapper->action->id, wrapper->action->uuid, action->uuid);
854 return FALSE;
855
856 } else if (is_set(wrapper->action->flags, pe_action_runnable) == FALSE
857 && type == pe_order_none && safe_str_neq(wrapper->action->uuid, CRM_OP_PROBED)) {
858 crm_trace( "Input (%d) %s optional (ordering) for %s",
859 wrapper->action->id, wrapper->action->uuid, action->uuid);
860 return FALSE;
861
862 } else if (is_set(action->flags, pe_action_pseudo)
863 && (wrapper->type & pe_order_stonith_stop)) {
864 crm_trace( "Input (%d) %s suppressed for %s",
865 wrapper->action->id, wrapper->action->uuid, action->uuid);
866 return FALSE;
867
868 } else if (wrapper->type == pe_order_load) {
869 crm_trace("check load filter %s.%s -> %s.%s",
870 wrapper->action->uuid, wrapper->action->node ? wrapper->action->node->details->uname : "",
871 action->uuid, action->node ? action->node->details->uname : "");
872
873 if (action->rsc && safe_str_eq(action->task, RSC_MIGRATE)) {
874 /* Remove the orders like :
875 * "load_stopped_node2" -> "rscA_migrate_to node1"
876 * which were created from: pengine/native.c: MigrateRsc()
877 * order_actions(other, then, other_w->type);
878 */
879 wrapper->type = pe_order_none;
880 return FALSE;
881
882 } else if (wrapper->action->node == NULL || action->node == NULL
883 || wrapper->action->node->details != action->node->details) {
884 /* Check if the actions are for the same node, ignore otherwise */
885 crm_trace("load filter - node");
886 wrapper->type = pe_order_none;
887 return FALSE;
888
889 } else if(is_set(wrapper->action->flags, pe_action_optional)) {
890 /* Check if the pre-req is optional, ignore if so */
891 crm_trace("load filter - optional");
892 wrapper->type = pe_order_none;

Callers 1

Calls 4

is_setFunction · 0.85
safe_str_neqFunction · 0.85
is_not_setFunction · 0.85
should_dump_actionFunction · 0.85

Tested by

no test coverage detected