Remove include of restore state from client state
- this causes issues in backup pipeline
- client.restore state will have to be called specifically
- fix server script permissions
- fix runner script condition
Fixes: PROD-32475
Change-Id: I071ec138ea5683f5f3c23ad02522d0070d1fd65e
(cherry picked from commit 4fa917913a3af0be07711941a953682f80b0ec82)
diff --git a/xtrabackup/client/init.sls b/xtrabackup/client/init.sls
index d9bb118..42c8047 100644
--- a/xtrabackup/client/init.sls
+++ b/xtrabackup/client/init.sls
@@ -65,8 +65,4 @@
- require:
- file: xtrabackup_client_runner_script
-{%- if client.restore_full_latest is defined %}
-include:
-- xtrabackup.client.restore
-{%- endif %}
{%- endif %}
diff --git a/xtrabackup/files/innobackupex-server-restore-call.sh b/xtrabackup/files/innobackupex-server-restore-call.sh
index 72fa8e3..313b823 100644
--- a/xtrabackup/files/innobackupex-server-restore-call.sh
+++ b/xtrabackup/files/innobackupex-server-restore-call.sh
@@ -26,7 +26,7 @@
if [ -z "$BEFORE_NEXT_FULL_INCR" ]; then
BEFORE_NEXT_FULL_INCR="Empty"
fi
- if [ $FULL = $FULL_INCR ]; then
+ if [ "$FULL" == "$FULL_INCR" ]; then
LATEST_FULL_INCR=$(find $BACKUPDIR/incr/$FULL_INCR -mindepth 1 -maxdepth 1 -type d -printf "%P\n" | sort -nr | head -1 | tail -1)
echo "$BACKUPDIR/incr/$FULL/$LATEST_FULL_INCR"
elif [ $FULL = $BEFORE_NEXT_FULL_INCR ]; then
diff --git a/xtrabackup/server.sls b/xtrabackup/server.sls
index 4f922cb..37214dd 100644
--- a/xtrabackup/server.sls
+++ b/xtrabackup/server.sls
@@ -72,6 +72,8 @@
xtrabackup_server_script:
file.managed:
+ - user: xtrabackup
+ - group: xtrabackup
- name: /usr/local/bin/innobackupex-runner.sh
- source: salt://xtrabackup/files/innobackupex-server-runner.sh
- template: jinja
@@ -93,6 +95,8 @@
xtrabackup_server_call_restore_script:
file.managed:
+ - user: xtrabackup
+ - group: xtrabackup
- name: /usr/local/bin/innobackupex-restore-call.sh
- source: salt://xtrabackup/files/innobackupex-server-restore-call.sh
- template: jinja