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:
parent
3cac5cbde0
commit
257ed54ddb
|
@ -42,17 +42,17 @@ dump_databases_to_directory() {
|
||||||
BACKUP_RETURN_CODE=$?
|
BACKUP_RETURN_CODE=$?
|
||||||
if [[ $BACKUP_RETURN_CODE != 0 ]]; then
|
if [[ $BACKUP_RETURN_CODE != 0 ]]; then
|
||||||
log ERROR $DB_NAME "There was an error backing up the databases." $LOG_FILE
|
log ERROR $DB_NAME "There was an error backing up the databases." $LOG_FILE
|
||||||
exit $BACKUP_RETURN_CODE
|
return $BACKUP_RETURN_CODE
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! [ -x "$(which etcdctl)" ]; then
|
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
|
SKIP_BACKUP=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$BACKUP_DIR" ]; then
|
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
|
SKIP_BACKUP=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -60,6 +60,6 @@ if [ $SKIP_BACKUP -eq 0 ]; then
|
||||||
# Call main program to start the database backup
|
# Call main program to start the database backup
|
||||||
backup_databases
|
backup_databases
|
||||||
else
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
HTK_REPO=${HTK_REPO:-"https://opendev.org/openstack/openstack-helm-infra.git"}
|
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)
|
TMP_DIR=$(mktemp -d)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue