File pacemaker-extra-Dummy-stop-not-fail-if-monitor-is-in-progress.patch of Package pacemaker.14737
commit 14d5eb9bcf1a00612fbe952d945b07bbe3c44844
Author: Ken Gaillot <kgaillot@redhat.com>
Date: Mon Apr 17 19:04:58 2017 -0500
Test: extra: Dummy stop shouldn't fail if monitor is in progress
diff --git a/extra/resources/Dummy b/extra/resources/Dummy
index bab56e4a3..4a6884cd1 100644
--- a/extra/resources/Dummy
+++ b/extra/resources/Dummy
@@ -172,7 +172,7 @@ dummy_start() {
}
dummy_stop() {
- dummy_monitor
+ dummy_monitor --force
if [ $? -eq $OCF_SUCCESS ]; then
rm ${OCF_RESKEY_state}
fi
@@ -186,7 +186,7 @@ dummy_monitor() {
# That is THREE states, not just yes/no.
if [ $OCF_RESKEY_op_sleep -ne 0 ]; then
- if [ -f "${VERIFY_SERIALIZED_FILE}" ]; then
+ if [ "$1" = "" -a -f "${VERIFY_SERIALIZED_FILE}" ]; then
# two monitor ops have occurred at the same time.
# this is to verify a condition in the lrmd regression tests.
ocf_log err "$VERIFY_SERIALIZED_FILE exists already"