Uplift HTK stable commit (db-backup-restore)

1) Uplift helm-toolkit to include db-backup-restore error log string
   prefixes for the generation of alert

   https://review.opendev.org/c/openstack/openstack-helm-infra/+/823867

2) Error log string prefixes are added to etcd backup-restore as well

Change-Id: Iad51a3e55567d0861140a97c17a1b7d859e13938
This commit is contained in:
Sophie Huang 2022-01-11 21:14:39 +00:00
parent 3cac5cbde0
commit 257ed54ddb
2 changed files with 5 additions and 5 deletions

View File

@ -42,17 +42,17 @@ dump_databases_to_directory() {
BACKUP_RETURN_CODE=$?
if [[ $BACKUP_RETURN_CODE != 0 ]]; then
log ERROR $DB_NAME "There was an error backing up the databases." $LOG_FILE
exit $BACKUP_RETURN_CODE
return $BACKUP_RETURN_CODE
fi
}
if ! [ -x "$(which etcdctl)" ]; then
log ERROR $DB_NAME "etcdctl not available, Please use the correct image." $LOG_FILE
log ERROR $DB_NAME "etcdctl not available, Please use the correct image."
SKIP_BACKUP=1
fi
if [ ! -d "$BACKUP_DIR" ]; then
log ERROR $DB_NAME "$BACKUP_DIR doesn't exist, Backup will not continue" $LOG_FILE
log ERROR $DB_NAME "$BACKUP_DIR doesn't exist, Backup will not continue"
SKIP_BACKUP=1
fi
@ -60,6 +60,6 @@ if [ $SKIP_BACKUP -eq 0 ]; then
# Call main program to start the database backup
backup_databases
else
log ERROR $DB_NAME "etcd backup failed." $LOG_FILE
log ERROR $DB_NAME "Backup of the ${DB_NAME} database failed. etcd backup failed."
exit 1
fi

View File

@ -17,7 +17,7 @@
set -eux
HTK_REPO=${HTK_REPO:-"https://opendev.org/openstack/openstack-helm-infra.git"}
HTK_STABLE_COMMIT=${HTK_COMMIT:-"f4972121bcb41c8d74748917804d2b239ab757f9"}
HTK_STABLE_COMMIT=${HTK_COMMIT:-"11ac37056b1a45cdcdabe0aab239ab7fadd53b24"}
TMP_DIR=$(mktemp -d)