From bc10e22452b0d073ac65d014137684bd112a4e55 Mon Sep 17 00:00:00 2001 From: Marat Salakhutdinov Date: Tue, 13 Oct 2020 19:22:15 -0400 Subject: [COMMON] More generic Cassandra backup This patch will fix handling of the backup of cassandra installed with different than "cassandra" common name. Issue-ID: OOM-2596 Signed-off-by: Marat Salakhutdinov Change-Id: Ifff440af79d6626fdbd1c2948795f98aabd167d7 --- kubernetes/common/cassandra/templates/backup/cronjob.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kubernetes') diff --git a/kubernetes/common/cassandra/templates/backup/cronjob.yaml b/kubernetes/common/cassandra/templates/backup/cronjob.yaml index 1d1e4594da..cabe59f696 100644 --- a/kubernetes/common/cassandra/templates/backup/cronjob.yaml +++ b/kubernetes/common/cassandra/templates/backup/cronjob.yaml @@ -59,7 +59,7 @@ spec: curr_time=$1 echo "Clearing snapshots!!!" command="nodetool clearsnapshot -t $curr_time" - /app/exec.py -p "cassandra" -c "$command" + /app/exec.py -p "{{ include "common.name" . }}" -c "$command" } {{ $root := . }} curr_time=`date +%s` @@ -75,11 +75,11 @@ spec: echo "Executing cleanup!!" command="nodetool cleanup" - /app/exec.py -p "cassandra" -c "$command" + /app/exec.py -p "{{ include "common.name" . }}" -c "$command" echo "Cleaned Node!! Backing up database now!!!" command="nodetool snapshot -t $curr_time" - /app/exec.py -p "cassandra" -c "$command" + /app/exec.py -p "{{ include "common.name" . }}" -c "$command" retCode=$? if [ $retCode -ne 0 ]; then echo "Backup Failed!!!" -- cgit 1.2.3-korg