Another lock/unlock fix
This commit is contained in:
parent
52b31f7bca
commit
0aa2d49678
|
@ -6,7 +6,7 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance
|
||||||
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
||||||
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
||||||
PROGRAM_VERSION=1.2-dev-parallel
|
PROGRAM_VERSION=1.2-dev-parallel
|
||||||
PROGRAM_BUILD=2016082802
|
PROGRAM_BUILD=2016082803
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
# Execution order
|
# Execution order
|
||||||
|
@ -498,7 +498,7 @@ function _WriteLockFilesRemote {
|
||||||
local replica_type="${2}"
|
local replica_type="${2}"
|
||||||
__CheckArguments 2 $# ${FUNCNAME[0]} "$@" #__WITH_PARANOIA_DEBUG
|
__CheckArguments 2 $# ${FUNCNAME[0]} "$@" #__WITH_PARANOIA_DEBUG
|
||||||
|
|
||||||
local cmd=
|
local cmd
|
||||||
|
|
||||||
CheckConnectivity3rdPartyHosts
|
CheckConnectivity3rdPartyHosts
|
||||||
CheckConnectivityRemoteHost
|
CheckConnectivityRemoteHost
|
||||||
|
@ -533,6 +533,8 @@ function WriteLockFiles {
|
||||||
targetPid="$!"
|
targetPid="$!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
INITIATOR_LOCK_FILE_EXISTS=true
|
||||||
|
TARGET_LOCK_FILE_EXISTS=true
|
||||||
WaitForTaskCompletion "$initiatorPid;$targetPid" 720 1800 ${FUNCNAME[0]} true $KEEP_LOGGING
|
WaitForTaskCompletion "$initiatorPid;$targetPid" 720 1800 ${FUNCNAME[0]} true $KEEP_LOGGING
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
IFS=';' read -r -a pidArray <<< "$WAIT_FOR_TASK_COMPLETION"
|
IFS=';' read -r -a pidArray <<< "$WAIT_FOR_TASK_COMPLETION"
|
||||||
|
@ -1846,9 +1848,8 @@ if [ "$CONFLICT_PREVALANCE" == "" ]; then
|
||||||
CONFLICT_PREVALANCE=initiator
|
CONFLICT_PREVALANCE=initiator
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Always assume lock files exist and must be unlocked, unless WriteLockFiles says otherwise
|
INITIATOR_LOCK_FILE_EXISTS=false
|
||||||
INITIATOR_LOCK_FILE_EXISTS=true
|
TARGET_LOCK_FILE_EXISTS=false
|
||||||
TARGET_LOCK_FILE_EXISTS=true
|
|
||||||
|
|
||||||
FORCE_UNLOCK=0
|
FORCE_UNLOCK=0
|
||||||
no_maxtime=0
|
no_maxtime=0
|
||||||
|
|
Loading…
Reference in New Issue