ClusterLabs/pacemaker — pull request #383 by inouekazu (2013-11-01 09:45:08+00:00)
Title: Fix: Fencing: Apply correct score to the resource of group

This commit applies correct score, when choosing stonith device (resource) of __group__ to fence.
```
group gStonith3 F1 F2

fencing_topology \
vm3: F1 F2

primitive F1 stonith:external/libvirt \
meta target-role="Stopped" \
params hostlist="vm3" hypervisor_uri="qemu+ssh://bl460g1n6/system"

primitive F2 stonith:external/ssh \
meta target-role="Stopped" \
params hostlist="vm3"

location l1 gStonith3 \
rule -inf: #uname eq vm1 \
rule 100: #uname eq vm2 \
rule -inf: #uname eq vm3
```

In the current implementation, __F2__ on __vm1__ may be chosen.
```
$ grep cib_device_update /var/log/ha-log
Nov 1 17:55:21 vm1 stonith-ng[7963]: info: cib_device_update: Device F1 has been disabled on vm1: score=-INFINITY
Nov 1 17:55:21 vm1 stonith-ng[7963]: info: cib_device_update: Device F2 is allowed on vm1: score=0

$ for i in vm{1..2};do ssh $i 'grep "log_operation: .* Performing.* reset" /var/log/ha-log';done | sort
Nov 1 17:56:13 vm2 stonith-ng[22156]: warning: log_operation: F1:22258 [ Performing: stonith -t external/libvirt -T reset vm3 ]
Nov 1 17:56:51 vm2 stonith-ng[22156]: warning: log_operation: F2:22508 [ Performing: stonith -t external/ssh -T reset vm3 ]
Nov 1 17:57:00 vm2 stonith-ng[22156]: warning: log_operation: F1:22707 [ Performing: stonith -t external/libvirt -T reset vm3 ]
Nov 1 17:57:38 vm1 stonith-ng[7963]: warning: log_operation: F2:8790 [ Performing: stonith -t external/ssh -T reset vm3 ]
Nov 1 17:57:47 vm2 stonith-ng[22156]: warning: log_operation: F1:22973 [ Performing: stonith -t external/libvirt -T reset vm3 ]
Nov 1 17:58:25 vm2 stonith-ng[22156]: warning: log_operation: F2:23185 [ Performing: stonith -t external/ssh -T reset vm3 ]
Nov 1 17:58:34 vm2 stonith-ng[22156]: warning: log_operation: F1:23399 [ Performing: stonith -t external/libvirt -T reset vm3 ]
Nov 1 17:59:11 vm1 stonith-ng[7963]: warning: log_operation: F2:9316 [ Performing: stonith -t external/ssh -T reset vm3 ]
```

If this commit is applied, __F2__ on __vm1__ will not be chosen.
```
$ grep cib_device_update /var/log/ha-log
Nov 1 18:03:37 vm1 stonith-ng[12755]: info: cib_device_update: Device F1 has been disabled on vm1: score=-INFINITY
Nov 1 18:03:37 vm1 stonith-ng[12755]: info: cib_device_update: Device F2 has been disabled on vm1: score=-INFINITY
```