From 898f6b94ed09f10dc76fc5b9aa460f1d44f2daa3 Mon Sep 17 00:00:00 2001 From: "Huang, Sophie (sh879n)" Date: Thu, 16 Jul 2020 21:18:46 +0000 Subject: [PATCH] Add namespace to database backup error logs Namespace is added to error logs generated by database backup main script for etcd, mariadb and postgresql database backups Change-Id: I63d00549327c27ec0590c1a9d05966015f480c92 --- .../templates/scripts/db-backup-restore/_backup_main.sh.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl b/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl index b94d41336..8f6fa5bc0 100755 --- a/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl +++ b/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl @@ -76,7 +76,7 @@ set -x log_backup_error_exit() { MSG=$1 ERRCODE=$2 - log ERROR "${DB_NAME}_backup" "${MSG}" + log ERROR "${DB_NAME}_backup" "${DB_NAMESPACE} namespace: ${MSG}" rm -f $ERR_LOG_FILE rm -rf $TMP_DIR exit $ERRCODE @@ -338,7 +338,7 @@ backup_databases() { if [[ $? -ne 0 ]]; then # This error should print first, then print the summary as the last # thing that the user sees in the output. - log ERROR "${DB_NAME}_backup" "Backup could not be sent to remote RGW." + log ERROR "${DB_NAME}_backup" "Backup ${TARBALL_FILE} could not be sent to remote RGW." set +x echo "==================================================================" echo "Local backup successful, but could not send to remote RGW."