High: pengine: Bug #5007, Fixes use of colocation constraints with multi-state resources
Colocation constraints for multi-state resources only worked when those
constraints used INFINITY scores.
Any score other than INFINITY used for a colocation constraint was
effectively useless as it would result in the score for that resource on
all the other nodes to be set to -INFINITY. This had the side effect of
not allowing a resource to start when multiple colocation constraints
were used with scores other than INFINITY.
For example, the following colocation constraints would cancel each
other out.
score 1001 IP_ADDR with MS_DB with role MASTER
score 100 IP_ADDR with MS_DB with role SLAVE
The first constraint sets IP_ADDR's score as -INFINITY on all nodes
other than those marked as Master for the MS_DB multi-state resource.
The second constraint does the opposite, and sets IP_ADDR's score as
-INFINITY on all nodes not marked as SLAVE.
The result is IP_ADDR never starts. This patch fixes this by allowing
scores to be properly calculated for multi-state resource colocations
not involving INFINITY scores. I have also added a regression test to
verify the results.