WIP: initialization should take create conflict list possibility
This commit is contained in:
parent
9b4914c49e
commit
4d322f7e6b
|
@ -1501,14 +1501,38 @@ function Initialize {
|
||||||
for pid in "${pidArray[@]}"; do
|
for pid in "${pidArray[@]}"; do
|
||||||
pid=${pid%:*}
|
pid=${pid%:*}
|
||||||
if [ "$pid" == "$initiatorPid" ]; then
|
if [ "$pid" == "$initiatorPid" ]; then
|
||||||
Logger "Failed to create initialization files for initiator." "ERROR"
|
Logger "Failed to create initialization treeList files for initiator." "ERROR"
|
||||||
elif [ "$pid" == "$targetPid" ]; then
|
elif [ "$pid" == "$targetPid" ]; then
|
||||||
Logger "Failed to create initialization files for target." "ERROR"
|
Logger "Failed to create initialization treeList files for target." "ERROR"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
exit 1
|
exit 1
|
||||||
resumeTarget="${SYNC_ACTION[8]}"
|
resumeTarget="${SYNC_ACTION[8]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
timestampList "${INITIATOR[$__replicaDir]}" "${INITIATOR[$__type]}" "${INITIATOR[$__replicaDir]}${INITIATOR[$__stateDir]}/${INITIATOR[$__type]}${INITIATOR[$__treeAfterFile]}" "${INITIATOR[$__replicaDir]}${INITIATOR[$__stateDir]}/${INITIATOR[$__type]}${INITIATOR[$__timestampCurrentFile]}" &
|
||||||
|
initiatorPid="$!"
|
||||||
|
|
||||||
|
timestampList "${TARGET[$__replicaDir]}" "${TARGET[$__type]}" "${INITIATOR[$__replicaDir]}${INITIATOR[$__stateDir]}/${TARGET[$__type]}${TARGET[$__treeAfterFile]}" "${INITIATOR[$__replicaDir]}${INITIATOR[$__stateDir]}/${TARGET[$__type]}${TARGET[$__timestampCurrentFile]}" &
|
||||||
|
targetPid="$!"
|
||||||
|
|
||||||
|
ExecTasks "$initiatorPid;$targetPid" "${FUNCNAME[0]}" false 0 0 $SOFT_MAX_EXEC_TIME $HARD_MAX_EXEC_TIME false $SLEEP_TIME $KEEP_LOGGING
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
IFS=';' read -r -a pidArray <<< "$(eval echo \"\$WAIT_FOR_TASK_COMPLETION_${FUNCNAME[0]}\")"
|
||||||
|
initiatorFail=false
|
||||||
|
targetFail=false
|
||||||
|
for pid in "${pidArray[@]}"; do
|
||||||
|
pid=${pid%:*}
|
||||||
|
if [ "$pid" == "$initiatorPid" ]; then
|
||||||
|
Logger "Failed to create initialization timestamp files for initiator." "ERROR"
|
||||||
|
elif [ "$pid" == "$targetPid" ]; then
|
||||||
|
Logger "Failed to create initialization timestamp files for target." "ERROR"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit 1
|
||||||
|
resumeTarget="${SYNC_ACTION[8]}"
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
###### Sync function in 9 steps
|
###### Sync function in 9 steps
|
||||||
|
|
Loading…
Reference in New Issue