Skip to content

Conversation

@egegunes
Copy link
Contributor

@egegunes egegunes commented May 14, 2025

K8SPXC-1647 Powered by Pull Request Badge

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:

  • garbd says /* 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.
  • If you kill the donor while files are being received from Donor and streamed to storage, recv script exits with 0. We need to address this in recv script.

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?
  • Are OpenShift compare files changed for E2E tests (compare/*-oc.yml)?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PXC version?
  • Does the change support oldest and newest supported Kubernetes version?

@pull-request-size pull-request-size bot added size/M 30-99 lines size/L 100-499 lines and removed size/M 30-99 lines labels May 14, 2025
--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) &
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
| (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) &

@hors hors added this to the v1.19.0 milestone Jul 29, 2025
--extended-exit-codes \
--wait-for-recv-script-exit \
--recv-script="/opt/percona/backup/run_backup.sh"
GARBD_EXIT_CODE=$?
Copy link
Collaborator

@hors hors Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@egegunes please make sure that it will work for PXC 5.7 as well

I did not find 5.7 in fixed versions :(
https://perconadev.atlassian.net/browse/PXC-4645

Comment on lines +134 to +141
--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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
--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"

Comment on lines +145 to +164
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
;;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
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
;;

@JNKPercona
Copy link
Collaborator

Test Name Result Time
auto-tuning-8-0 passed 00:19:14
allocator-8-0 passed 00:12:43
backup-storage-tls-8-0 passed 00:23:02
cross-site-8-0 passed 00:34:58
custom-users-8-0 passed 00:12:25
demand-backup-cloud-8-0 failure 00:18:47
demand-backup-encrypted-with-tls-8-0 passed 00:45:04
demand-backup-encrypted-with-tls-8-4 failure 00:27:44
demand-backup-8-0 failure 00:02:00
demand-backup-flow-control-8-0 passed 00:10:40
demand-backup-parallel-8-0 passed 00:08:49
demand-backup-without-passwords-8-0 passed 00:15:23
haproxy-5-7 passed 00:14:41
haproxy-8-0 passed 00:14:17
init-deploy-5-7 passed 00:16:25
init-deploy-8-0 passed 00:16:57
limits-8-0 passed 00:12:10
monitoring-2-0-8-0 passed 00:22:23
monitoring-pmm3-8-0 passed 00:17:18
one-pod-5-7 failure 00:19:41
one-pod-8-0 passed 00:16:17
pitr-8-0 passed 00:42:51
pitr-gap-errors-8-0 passed 00:55:34
proxy-protocol-8-0 passed 00:09:30
proxy-switch-8-0 passed 00:13:18
proxysql-sidecar-res-limits-8-0 passed 00:08:17
proxysql-scheduler-8-0 passed 00:15:42
pvc-resize-5-7 passed 00:15:17
pvc-resize-8-0 passed 00:14:54
recreate-8-0 passed 00:17:31
restore-to-encrypted-cluster-8-0 passed 00:26:50
restore-to-encrypted-cluster-8-4 passed 00:27:01
scaling-proxysql-8-0 passed 00:08:38
scaling-8-0 passed 00:10:58
scheduled-backup-5-7 failure 00:16:40
scheduled-backup-8-0 failure 00:17:43
security-context-8-0 passed 00:26:25
smart-update1-8-0 passed 00:31:01
smart-update2-8-0 passed 00:38:04
storage-8-0 passed 00:11:32
tls-issue-cert-manager-ref-8-0 passed 00:08:57
tls-issue-cert-manager-8-0 passed 00:09:24
tls-issue-self-8-0 passed 00:13:03
upgrade-consistency-8-0 passed 00:11:27
upgrade-haproxy-5-7 passed 00:23:56
upgrade-haproxy-8-0 passed 00:23:37
upgrade-proxysql-5-7 passed 00:13:23
upgrade-proxysql-8-0 passed 00:13:44
users-5-7 passed 00:25:51
users-8-0 passed 00:23:55
validation-hook-8-0 passed 00:02:00
Summary Value
Tests Run 51/51
Job Duration 02:55:17
Total Test Time 15:58:27

commit: ee1be0b
image: perconalab/percona-xtradb-cluster-operator:PR-2076-ee1be0ba

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L 100-499 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants