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
This commit is contained in:
parent
a689846b10
commit
898f6b94ed
@ -76,7 +76,7 @@ set -x
|
|||||||
log_backup_error_exit() {
|
log_backup_error_exit() {
|
||||||
MSG=$1
|
MSG=$1
|
||||||
ERRCODE=$2
|
ERRCODE=$2
|
||||||
log ERROR "${DB_NAME}_backup" "${MSG}"
|
log ERROR "${DB_NAME}_backup" "${DB_NAMESPACE} namespace: ${MSG}"
|
||||||
rm -f $ERR_LOG_FILE
|
rm -f $ERR_LOG_FILE
|
||||||
rm -rf $TMP_DIR
|
rm -rf $TMP_DIR
|
||||||
exit $ERRCODE
|
exit $ERRCODE
|
||||||
@ -338,7 +338,7 @@ backup_databases() {
|
|||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
# This error should print first, then print the summary as the last
|
# This error should print first, then print the summary as the last
|
||||||
# thing that the user sees in the output.
|
# 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
|
set +x
|
||||||
echo "=================================================================="
|
echo "=================================================================="
|
||||||
echo "Local backup successful, but could not send to remote RGW."
|
echo "Local backup successful, but could not send to remote RGW."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user