-
Notifications
You must be signed in to change notification settings - Fork 203
K8SPXC-1647: Use extended exit codes for garbd #2076
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
base: main
Are you sure you want to change the base?
Conversation
| 0) | ||
| log 'INFO' 'Backup was finished successfully' | ||
| exit 0 | ||
| ;; | ||
| 100) | ||
| log 'ERROR' 'Backup was unsuccessful: Generic failure' | ||
| exit 1 | ||
| ;; | ||
| 101) | ||
| log 'ERROR' 'Backup was unsuccessful: Donor disappeared' | ||
| exit 1 | ||
| ;; | ||
| 102) | ||
| log 'ERROR' 'Backup was unsuccessful: SST request failure' | ||
| exit 1 | ||
| ;; | ||
| *) | ||
| log 'ERROR' "Backup was unsuccessful: garbd exited with ${GARBD_EXIT_CODE}" | ||
| exit 1 | ||
| ;; |
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.
[shfmt] reported by reviewdog 🐶
| 0) | |
| log 'INFO' 'Backup was finished successfully' | |
| exit 0 | |
| ;; | |
| 100) | |
| log 'ERROR' 'Backup was unsuccessful: Generic failure' | |
| exit 1 | |
| ;; | |
| 101) | |
| log 'ERROR' 'Backup was unsuccessful: Donor disappeared' | |
| exit 1 | |
| ;; | |
| 102) | |
| log 'ERROR' 'Backup was unsuccessful: SST request failure' | |
| exit 1 | |
| ;; | |
| *) | |
| log 'ERROR' "Backup was unsuccessful: garbd exited with ${GARBD_EXIT_CODE}" | |
| exit 1 | |
| ;; | |
| 0) | |
| log 'INFO' 'Backup was finished successfully' | |
| exit 0 | |
| ;; | |
| 100) | |
| log 'ERROR' 'Backup was unsuccessful: Generic failure' | |
| exit 1 | |
| ;; | |
| 101) | |
| log 'ERROR' 'Backup was unsuccessful: Donor disappeared' | |
| exit 1 | |
| ;; | |
| 102) | |
| log 'ERROR' 'Backup was unsuccessful: SST request failure' | |
| exit 1 | |
| ;; | |
| *) | |
| log 'ERROR' "Backup was unsuccessful: garbd exited with ${GARBD_EXIT_CODE}" | |
| exit 1 | |
| ;; |
| --address "gcomm://$NODE_NAME.$PXC_SERVICE?gmcast.listen_addr=tcp://0.0.0.0:4567" \ | ||
| --donor "$NODE_NAME" \ | ||
| --group "$PXC_SERVICE" \ | ||
| --options "$GARBD_OPTS" \ | ||
| --sst "xtrabackup-v2:$LOCAL_IP:4444/xtrabackup_sst//1" \ | ||
| --extended-exit-codes \ | ||
| --wait-for-recv-script-exit \ | ||
| --recv-script="/opt/percona/backup/run_backup.sh" |
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.
[shfmt] reported by reviewdog 🐶
| --address "gcomm://$NODE_NAME.$PXC_SERVICE?gmcast.listen_addr=tcp://0.0.0.0:4567" \ | |
| --donor "$NODE_NAME" \ | |
| --group "$PXC_SERVICE" \ | |
| --options "$GARBD_OPTS" \ | |
| --sst "xtrabackup-v2:$LOCAL_IP:4444/xtrabackup_sst//1" \ | |
| --extended-exit-codes \ | |
| --wait-for-recv-script-exit \ | |
| --recv-script="/opt/percona/backup/run_backup.sh" | |
| --address "gcomm://$NODE_NAME.$PXC_SERVICE?gmcast.listen_addr=tcp://0.0.0.0:4567" \ | |
| --donor "$NODE_NAME" \ | |
| --group "$PXC_SERVICE" \ | |
| --options "$GARBD_OPTS" \ | |
| --sst "xtrabackup-v2:$LOCAL_IP:4444/xtrabackup_sst//1" \ | |
| --extended-exit-codes \ | |
| --wait-for-recv-script-exit \ | |
| --recv-script="/opt/percona/backup/run_backup.sh" |
| --parallel="$(grep -c processor /proc/cpuinfo)" \ | ||
| $XBCLOUD_ARGS \ | ||
| "$BACKUP_PATH" 2>&1 \ | ||
| | (grep -v "error: http request failed: Couldn't resolve host name" || exit 1) & |
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.
[shfmt] reported by reviewdog 🐶
| | (grep -v "error: http request failed: Couldn't resolve host name" || exit 1) & | |
| | (grep -v "error: http request failed: Couldn't resolve host name" || exit 1) & |
commit: e995968 |
CHANGE DESCRIPTION
Problem:
Short explanation of the problem.
Cause:
Short explanation of the root cause of the issue if applicable.
Solution:
Short explanation of the solution we are providing with this PR.
TODO:
garbdsays/* Reserved 99 exit codes. recv-script should use exit codes 0 or > GARBD_EXIT_CODE_LAST*/. We need to use exit codes >200 if we have any failure in recv script that we want to distinguish.CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
compare/*-oc.yml)?Config/Logging/Testability