1 From 5677e262d5b3f5ecc114f1aace4ffd77a7772282 Mon Sep 17 00:00:00 2001
2 From: Don Penney <don.penney@windriver.com>
3 Date: Tue, 21 Feb 2017 12:37:02 -0500
4 Subject: [PATCH] Update OCF to attempt connect in certain states
7 scripts/drbd.ocf | 17 +++++++++++++++--
8 1 file changed, 15 insertions(+), 2 deletions(-)
10 diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf
11 index 0e26ea9..84332b0 100644
12 --- a/scripts/drbd.ocf
13 +++ b/scripts/drbd.ocf
14 @@ -415,8 +415,21 @@ drbd_condition() {
18 - rc=$OCF_DATA_OUTDATED
19 - ocf_log info "${OCF_RESKEY_drbd_resource} outdated"
20 + case "${DRBD_CSTATE}" in
22 + rc=$OCF_DATA_STANDALONE
23 + if [ $status -eq $OCF_SUCCESS ]
25 + ocf_log info "${OCF_RESKEY_drbd_resource} outdated standalone, attempting to reconnect."
26 + do_drbdadm -- --discard-my-data connect ${OCF_RESKEY_drbd_resource}
28 + ocf_log info "${OCF_RESKEY_drbd_resource} outdated"
32 + rc=$OCF_DATA_OUTDATED
33 + ocf_log info "${OCF_RESKEY_drbd_resource} outdated"
37 case "${DRBD_CSTATE}" in