Skip to content

Commit 925dcf9

Browse files
Increase backup wait time and delete timeouts in node-backup (#3662)
--------- Signed-off-by: Oriol Muñoz <oriol.munoz@digitalasset.com>
1 parent 3b59f60 commit 925dcf9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

cluster/scripts/node-backup.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ source "${TOOLS_LIB}/libcli.source"
1111
source "${SPLICE_ROOT}/cluster/scripts/utils.source"
1212

1313
RUN_ID=$(date +%s)
14+
WAIT_FOR_BACKUP_RETRIES=450
1415

1516
##### PVC Backup & Restore
1617

@@ -54,7 +55,10 @@ function wait_for_pvc_backup() {
5455
_info "Backup of $description PVC ready!"
5556
break
5657
else
57-
(( i++ )) && (( i > 300 )) && _error "Timed out waiting for backup of $description PVC"
58+
(( i++ )) && (( i > WAIT_FOR_BACKUP_RETRIES )) && {
59+
# kubectl delete volumesnapshot -n "$namespace" "$backupName";
60+
_error "Timed out waiting for backup of $description PVC";
61+
}
5862
sleep 5
5963
_info "still waiting..."
6064
fi
@@ -148,7 +152,10 @@ function wait_for_cloudsql_backup() {
148152
_info "Backup of $description ready! Backup ID: $id "
149153
break
150154
else
151-
(( i++ ))&& (( i > 300 )) &&_error "Timed out waiting for backup of $description db"
155+
(( i++ ))&& (( i > WAIT_FOR_BACKUP_RETRIES )) && {
156+
# gcloud sql backups delete "$id" --instance "$db_id" --quiet;
157+
_error "Timed out waiting for backup of $description db";
158+
}
152159
sleep 5
153160
_info "still waiting..."
154161
fi

0 commit comments

Comments
 (0)