Update status.inc
This commit is contained in:
@@ -228,7 +228,9 @@ STATUS(){
|
|||||||
|
|
||||||
for NTYPE in "${ntypesel[@]}"; do
|
for NTYPE in "${ntypesel[@]}"; do
|
||||||
PH=${NTYPE}_HOSTS[0]
|
PH=${NTYPE}_HOSTS[0]
|
||||||
if [ -f ${NM_TMPFOLDER}/${!PH}.disable ] || [ -f ${NM_TMPFOLDER}/${!PH}.down ] || [ -f ${NM_TMPFOLDER}/${!PH}.skip ]; then
|
PHA=${NTYPE}_HOSTS
|
||||||
|
skip=0
|
||||||
|
if [ -f ${NM_TMPFOLDER}/${!PH}.disable ] || [ -f ${NM_TMPFOLDER}/${!PH}.down ]; then
|
||||||
if [ $(eval echo \${#${PHA}[@]}) -eq 2 ]; then
|
if [ $(eval echo \${#${PHA}[@]}) -eq 2 ]; then
|
||||||
skip=1
|
skip=1
|
||||||
else
|
else
|
||||||
@@ -332,7 +334,16 @@ It was down for $(SHOW_TIME $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${
|
|||||||
[ "${STATUS_ACTION}" != "check" ] && echo -en "${idsCL[LightCyan]} Cleaning up status checks... ${idsCL[Default]}"
|
[ "${STATUS_ACTION}" != "check" ] && echo -en "${idsCL[LightCyan]} Cleaning up status checks... ${idsCL[Default]}"
|
||||||
for NTYPE in "${ntypesel[@]}"; do
|
for NTYPE in "${ntypesel[@]}"; do
|
||||||
PH=${NTYPE}_HOSTS[0]
|
PH=${NTYPE}_HOSTS[0]
|
||||||
if [ ! -f ${NM_FOLDER}/${!PH}.down ]; then
|
PHA=${NTYPE}_HOSTS
|
||||||
|
skip=0
|
||||||
|
if [ -f ${NM_TMPFOLDER}/${!PH}.disable ] || [ -f ${NM_TMPFOLDER}/${!PH}.down ]; then
|
||||||
|
if [ $(eval echo \${#${PHA}[@]}) -eq 2 ]; then
|
||||||
|
skip=1
|
||||||
|
else
|
||||||
|
PH=${NODETYPE}_HOSTS[1]
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ ! -f ${NM_FOLDER}/${!PH}.down ] && [ ${skip} -eq 0 ]; then
|
||||||
PH_CMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${!PH}"
|
PH_CMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${!PH}"
|
||||||
var=${NTYPE}_REPL_CHECK[@]
|
var=${NTYPE}_REPL_CHECK[@]
|
||||||
if [ ! -z ${!var+x} ]; then
|
if [ ! -z ${!var+x} ]; then
|
||||||
@@ -354,7 +365,16 @@ It was down for $(SHOW_TIME $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${
|
|||||||
if [ ! -f ${NM_TMPFOLDER}/.replclean ] || [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/.replclean)) -ge 10800 ]; then
|
if [ ! -f ${NM_TMPFOLDER}/.replclean ] || [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/.replclean)) -ge 10800 ]; then
|
||||||
for NTYPE in "${NM_NODE_TYPES[@]}"; do
|
for NTYPE in "${NM_NODE_TYPES[@]}"; do
|
||||||
PH=${NTYPE}_HOSTS[0]
|
PH=${NTYPE}_HOSTS[0]
|
||||||
if [ ! -f ${NM_FOLDER}/${!PH}.down ]; then
|
PHA=${NTYPE}_HOSTS
|
||||||
|
skip=0
|
||||||
|
if [ -f ${NM_TMPFOLDER}/${!PH}.disable ] || [ -f ${NM_TMPFOLDER}/${!PH}.down ]; then
|
||||||
|
if [ $(eval echo \${#${PHA}[@]}) -eq 2 ]; then
|
||||||
|
skip=1
|
||||||
|
else
|
||||||
|
PH=${NODETYPE}_HOSTS[1]
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ ! -f ${NM_FOLDER}/${!PH}.down ] && [ ${skip} -eq 0 ]; then
|
||||||
var=${NTYPE}_REPL_CHECK[@]
|
var=${NTYPE}_REPL_CHECK[@]
|
||||||
if [ ! -z ${!var+x} ]; then
|
if [ ! -z ${!var+x} ]; then
|
||||||
PH_CMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${!PH}"
|
PH_CMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${!PH}"
|
||||||
@@ -923,7 +943,6 @@ REPLSTART(){
|
|||||||
PH=${NODETYPE}_HOSTS[0]
|
PH=${NODETYPE}_HOSTS[0]
|
||||||
PHA=${NODETYPE}_HOSTS
|
PHA=${NODETYPE}_HOSTS
|
||||||
skip=0
|
skip=0
|
||||||
# echo "HERE1: ${skip} - ${!PH}"
|
|
||||||
if [ -f ${NM_TMPFOLDER}/${!PH}.disable ] || [ -f ${NM_TMPFOLDER}/${!PH}.down ]; then
|
if [ -f ${NM_TMPFOLDER}/${!PH}.disable ] || [ -f ${NM_TMPFOLDER}/${!PH}.down ]; then
|
||||||
touch ${STATUSRUN_TMPFOLDER}/repl.${!PH}.skip
|
touch ${STATUSRUN_TMPFOLDER}/repl.${!PH}.skip
|
||||||
if [ $(eval echo \${#${PHA}[@]}) -eq 2 ]; then
|
if [ $(eval echo \${#${PHA}[@]}) -eq 2 ]; then
|
||||||
@@ -936,10 +955,8 @@ REPLSTART(){
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# echo "HERE2: ${skip} - ${!PH}"
|
|
||||||
|
|
||||||
if [ ${skip} -eq 0 ] && [ "${!PH}" != "" ]; then
|
if [ ${skip} -eq 0 ] && [ "${!PH}" != "" ]; then
|
||||||
# echo "not skipped"
|
|
||||||
PH_CMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${!PH}"
|
PH_CMD="ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${!PH}"
|
||||||
var=${NODETYPE}_REPL_CHECK[@]
|
var=${NODETYPE}_REPL_CHECK[@]
|
||||||
if [ ! -z ${!var+x} ]; then
|
if [ ! -z ${!var+x} ]; then
|
||||||
@@ -950,10 +967,7 @@ REPLSTART(){
|
|||||||
${PH_CMD} 'find '${NM_REPL_CHECK_LOC[${rcheck}]}' -iname "*.sync-conflict-*" -exec rm {} \;' &
|
${PH_CMD} 'find '${NM_REPL_CHECK_LOC[${rcheck}]}' -iname "*.sync-conflict-*" -exec rm {} \;' &
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
# else
|
|
||||||
# echo "skipped"
|
|
||||||
fi
|
fi
|
||||||
echo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
REMOVE_CONFLICT_SYNC_FILES(){
|
REMOVE_CONFLICT_SYNC_FILES(){
|
||||||
|
|||||||
Reference in New Issue
Block a user