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

Function child_ordering_constraints

pengine/clone.c:734–779  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

732}
733
734static void
735child_ordering_constraints(resource_t * rsc, pe_working_set_t * data_set)
736{
737 char *key = NULL;
738 action_t *stop = NULL;
739 action_t *start = NULL;
740 action_t *last_stop = NULL;
741 action_t *last_start = NULL;
742 GListPtr gIter = rsc->children;
743 gboolean active_only = TRUE; /* change to false to get the old behavior */
744 clone_variant_data_t *clone_data = NULL;
745
746 get_clone_variant_data(clone_data, rsc);
747
748 if (clone_data->ordered == FALSE) {
749 return;
750 }
751
752 for (; gIter != NULL; gIter = gIter->next) {
753 resource_t *child = (resource_t *) gIter->data;
754
755 key = stop_key(child);
756 stop = find_rsc_action(child, key, active_only, NULL);
757 free(key);
758
759 key = start_key(child);
760 start = find_rsc_action(child, key, active_only, NULL);
761 free(key);
762
763 if (stop) {
764 if (last_stop) {
765 /* child/child relative stop */
766 order_actions(stop, last_stop, pe_order_optional);
767 }
768 last_stop = stop;
769 }
770
771 if (start) {
772 if (last_start) {
773 /* child/child relative start */
774 order_actions(last_start, start, pe_order_optional);
775 }
776 last_start = start;
777 }
778 }
779}
780
781void
782clone_create_actions(resource_t * rsc, pe_working_set_t * data_set)

Callers 1

clone_create_actionsFunction · 0.85

Calls 2

find_rsc_actionFunction · 0.85
order_actionsFunction · 0.85

Tested by

no test coverage detected