-
Notifications
You must be signed in to change notification settings - Fork 59
Increase backup wait time and delete timeouts in node-backup #3662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ source "${TOOLS_LIB}/libcli.source" | |
| source "${SPLICE_ROOT}/cluster/scripts/utils.source" | ||
|
|
||
| RUN_ID=$(date +%s) | ||
| WAIT_FOR_BACKUP_RETRIES=450 | ||
|
|
||
| ##### PVC Backup & Restore | ||
|
|
||
|
|
@@ -54,7 +55,10 @@ function wait_for_pvc_backup() { | |
| _info "Backup of $description PVC ready!" | ||
| break | ||
| else | ||
| (( i++ )) && (( i > 300 )) && _error "Timed out waiting for backup of $description PVC" | ||
| (( i++ )) && (( i > WAIT_FOR_BACKUP_RETRIES )) && { | ||
| kubectl delete volumesnapshot -n "$namespace" "$backupName"; | ||
| _error "Timed out waiting for backup of $description PVC"; | ||
| } | ||
| sleep 5 | ||
| _info "still waiting..." | ||
| fi | ||
|
|
@@ -148,7 +152,10 @@ function wait_for_cloudsql_backup() { | |
| _info "Backup of $description ready! Backup ID: $id " | ||
| break | ||
| else | ||
| (( i++ ))&& (( i > 300 )) &&_error "Timed out waiting for backup of $description db" | ||
| (( i++ ))&& (( i > WAIT_FOR_BACKUP_RETRIES )) && { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did this time out too?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, but I'd rather mirror the behavior between both
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the consistency but sentences that contain both |
||
| gcloud sql backups delete "$id" --instance "$db_id" --quiet; | ||
| _error "Timed out waiting for backup of $description db"; | ||
| } | ||
| sleep 5 | ||
| _info "still waiting..." | ||
| fi | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we know we're allowed to
deletehere at all? If an operation is running then this will just fail too, won't it? But I guess that's fine because then we'll still retry?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm or will this script just die, because we're not capturing the error code of the
kubectl delete?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hopefully it works and it gets deleted, but otherwise you're correct, it will
exit 1and retryThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm and assuming the
deletenever works... will we loop forever here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_errorhas anexit 1inside, so either kubectl delete fails or _error exitsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it does... so fine then, not veto-ing if you feel confident about this.