Fix issue with db backup error return code being eaten
The return code from the send_to_remote_server function are being eaten by an if statement and thus we never hit the elif section of code. Change-Id: Id3e256c991421ad6624713f65212abb4881240c1
This commit is contained in:
parent
418143f3e4
commit
4a490b894c
@ -15,7 +15,7 @@ apiVersion: v1
|
||||
appVersion: v1.0.0
|
||||
description: OpenStack-Helm Helm-Toolkit
|
||||
name: helm-toolkit
|
||||
version: 0.2.20
|
||||
version: 0.2.21
|
||||
home: https://docs.openstack.org/openstack-helm
|
||||
icon: https://www.openstack.org/themes/openstack/images/project-mascots/OpenStack-Helm/OpenStack_Project_OpenStackHelm_vertical.png
|
||||
sources:
|
||||
|
@ -210,12 +210,13 @@ store_backup_remotely() {
|
||||
while [[ $DONE == "false" ]]; do
|
||||
# Store the new archive to the remote backup storage facility.
|
||||
send_to_remote_server $FILEPATH $FILE
|
||||
SEND_RESULT="$?"
|
||||
|
||||
# Check if successful
|
||||
if [[ $? -eq 0 ]]; then
|
||||
if [[ $SEND_RESULT -eq 0 ]]; then
|
||||
log INFO "${DB_NAME}_backup" "Backup file ${FILE} successfully sent to RGW."
|
||||
DONE=true
|
||||
elif [[ $? -eq 2 ]]; then
|
||||
elif [[ $SEND_RESULT -eq 2 ]]; then
|
||||
# Temporary failure occurred. We need to retry if we have not timed out
|
||||
log WARN "${DB_NAME}_backup" "Backup file ${FILE} could not be sent to RGW due to connection issue."
|
||||
DELTA=$(( TIMEOUT_EXP - $(date +%s) ))
|
||||
|
@ -27,4 +27,5 @@ helm-toolkit:
|
||||
- 0.2.18 Make Rabbit-init job more robust
|
||||
- 0.2.19 Revoke all privileges for PUBLIC role in postgres dbs
|
||||
- 0.2.20 Modify the template of rbac_role to make secrets accessible
|
||||
- 0.2.21 Fix issue with db backup error return code being eaten
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user