Fix: scheduler: wait for probe actions to complete to prevent unnecessary restart/re-promote of dependent resources
This addresses the issue brought up from:
https://github.com/ClusterLabs/pacemaker/commit/faf44d811e4f5598dae085c61fdef410c8d18882#commitcomment-22262090
Given an ordering chain in a transition graph like:
A.probe -> A.start -> [...] -> B.start
, if B was already started, it would be scheduled to restart.
Previously, B would be directly stopped, which could turn out to be
unnecessary if A was probed being already started as well. Such
unnecessary restart could be very expensive for heavy workload.
With this commit, a new order will be created:
A.probe -> B.stop
So that any potential restart of B will wait for A.probe to complete. In
case that A is already started, transition will abort and restart of B
won't need to be performed any more.
Similarly for an ordering chain like:
A.probe -> A.start -> [...] -> B.promote
A new order will be created to prevent unnecessary re-promote:
A.probe -> B.demote