summaryrefslogtreecommitdiff
path: root/scripts/wsrep_sst_xtrabackup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/wsrep_sst_xtrabackup.sh')
-rw-r--r--scripts/wsrep_sst_xtrabackup.sh23
1 files changed, 5 insertions, 18 deletions
diff --git a/scripts/wsrep_sst_xtrabackup.sh b/scripts/wsrep_sst_xtrabackup.sh
index c6dad8d1791..b84aca4866e 100644
--- a/scripts/wsrep_sst_xtrabackup.sh
+++ b/scripts/wsrep_sst_xtrabackup.sh
@@ -97,8 +97,9 @@ get_keys()
fi
if [[ $encrypt -eq 0 ]];then
- if $MY_PRINT_DEFAULTS xtrabackup | grep -q encrypt;then
- wsrep_log_error "Unexpected option combination. SST may fail. Refer to http://www.percona.com/doc/percona-xtradb-cluster/manual/xtrabackup_sst.html "
+ if [ -n "$ealgo" -o -n "$ekey" -o -n "$ekeyfile" ]; then
+ wsrep_log_error "Options for encryption are specified, " \
+ "but encryption itself is disabled. SST may fail."
fi
return
fi
@@ -324,12 +325,6 @@ cleanup_joiner()
fi
}
-check_pid()
-{
- local pid_file="$1"
- [ -r "$pid_file" ] && ps -p $(cat "$pid_file") >/dev/null 2>&1
-}
-
cleanup_donor()
{
# Since this is invoked just after exit NNN
@@ -339,12 +334,11 @@ cleanup_donor()
fi
if [[ -n "$XTRABACKUP_PID" ]];then
- if check_pid "$XTRABACKUP_PID"
+ if check_pid "$XTRABACKUP_PID" 1
then
wsrep_log_error "xtrabackup process is still running. Killing... "
- kill_xtrabackup
+ cleanup_pid $CHECK_PID "$XTRABACKUP_PID"
fi
- rm -f "$XTRABACKUP_PID"
fi
rm -f "${DATA}/${IST_FILE}"
@@ -355,13 +349,6 @@ cleanup_donor()
fi
}
-kill_xtrabackup()
-{
- local PID=$(cat "$XTRABACKUP_PID")
- [ -n "$PID" -a $PID -ne 0 ] && kill $PID && (kill $PID && kill -9 $PID) || :
- rm -f "$XTRABACKUP_PID"
-}
-
# waits ~10 seconds for nc to open the port and then reports ready
# (regardless of timeout)
wait_for_listen()