integ/filesystem/drbd/drbd-tools/centos/patches/0007-Update-OCF-to-attempt-connect-in-certain-states.patch
Scott Little 18f91ec6be Relocate drbd-tools to stx-integ/filesystem/drbd/drbd-tools
Move content from stx-gplv2 into stx-integ

Packages will be relocated to

stx-integ:
    base/
        bash
        cgcs-users
        cluster-resource-agents
        dpkg
        haproxy
        libfdt
        netpbm
        rpm

    database/
        mariadb

    filesystem/
        iscsi-initiator-utils

    filesystem/drbd/
        drbd-tools

    kernel/kernel-modules/
        drbd
        integrity
        intel-e1000e
        intel-i40e
        intel-i40evf
        intel-ixgbe
        intel-ixgbevf
        qat17
        tpmdd

    ldap/
        ldapscripts

    networking/
        iptables
        net-tools

Change-Id: Ibf3a0fc29dc2e6a0eeb02c98ff053bdb0443a9f0
Story: 2002801
Task: 22687
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-08-01 15:31:55 -04:00

41 lines
1.4 KiB
Diff

From 5677e262d5b3f5ecc114f1aace4ffd77a7772282 Mon Sep 17 00:00:00 2001
From: Don Penney <don.penney@windriver.com>
Date: Tue, 21 Feb 2017 12:37:02 -0500
Subject: [PATCH] Update OCF to attempt connect in certain states
---
scripts/drbd.ocf | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf
index 0e26ea9..84332b0 100644
--- a/scripts/drbd.ocf
+++ b/scripts/drbd.ocf
@@ -415,8 +415,21 @@ drbd_condition() {
esac
;;
Outdated)
- rc=$OCF_DATA_OUTDATED
- ocf_log info "${OCF_RESKEY_drbd_resource} outdated"
+ case "${DRBD_CSTATE}" in
+ StandAlone)
+ rc=$OCF_DATA_STANDALONE
+ if [ $status -eq $OCF_SUCCESS ]
+ then
+ ocf_log info "${OCF_RESKEY_drbd_resource} outdated standalone, attempting to reconnect."
+ do_drbdadm -- --discard-my-data connect ${OCF_RESKEY_drbd_resource}
+ else
+ ocf_log info "${OCF_RESKEY_drbd_resource} outdated"
+ fi
+ ;;
+ *)
+ rc=$OCF_DATA_OUTDATED
+ ocf_log info "${OCF_RESKEY_drbd_resource} outdated"
+ esac
;;
Inconsistent)
case "${DRBD_CSTATE}" in
--
1.8.3.1