Skip to content

Conversation

hors
Copy link
Collaborator

@hors hors commented Aug 13, 2025

K8SPXC-1581 Powered by Pull Request Badge

CHANGE DESCRIPTION

  • Move --defaults-file extraction logic before innobackupex commands
  • Apply the same fix to both recovery-cloud.sh and recovery-pvc-joiner.sh
  • Ensure --defaults-file is first argument for both xtrabackup and innobackupex

This ensures consistency and prevents --defaults-file ordering errors
in both xtrabackup and innobackupex commands."

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 the size/S 10-29 lines label Aug 13, 2025
- Fix CS0052089: --defaults-file must be specified first on command line
- Extract --defaults-file from XB_EXTRA_ARGS and place as first argument
- Apply fix to both recovery-cloud.sh and recovery-pvc-joiner.sh
- Maintain backward compatibility for configurations without --defaults-file
- Support any order of arguments in containerOptions.args.xtrabackup

This resolves the error: '--defaults-file must be specified first on the command line'
when using --defaults-file in restore containerOptions configuration.
Resolved conflicts in backup scripts to include --defaults-file fix:
- Keep the --defaults-file extraction logic from main branch
- Apply the fix to both recovery-cloud.sh and recovery-pvc-joiner.sh
- Ensure --defaults-file is always the first argument in xtrabackup commands
@pull-request-size pull-request-size bot added size/M 30-99 lines and removed size/S 10-29 lines labels Sep 18, 2025
- Move --defaults-file extraction logic before innobackupex commands
- Apply the same fix to both recovery-cloud.sh and recovery-pvc-joiner.sh
- Ensure --defaults-file is first argument for both xtrabackup and innobackupex
- Update comment to reflect both utilities are supported

This ensures consistency and prevents --defaults-file ordering errors
in both xtrabackup and innobackupex commands.
# This fixes the issue where --defaults-file must be the first argument for xtrabackup and innobackupex
DEFAULTS_FILE=""
REMAINING_XB_ARGS=""
if [[ "$XB_EXTRA_ARGS" =~ --defaults-file=([^[:space:]]+) ]]; then
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
if [[ "$XB_EXTRA_ARGS" =~ --defaults-file=([^[:space:]]+) ]]; then
if [[ $XB_EXTRA_ARGS =~ --defaults-file=([^[:space:]]+) ]]; then

# This fixes the issue where --defaults-file must be the first argument for xtrabackup and innobackupex
DEFAULTS_FILE=""
REMAINING_XB_ARGS=""
if [[ "$XB_EXTRA_ARGS" =~ --defaults-file=([^[:space:]]+) ]]; then
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
if [[ "$XB_EXTRA_ARGS" =~ --defaults-file=([^[:space:]]+) ]]; then
if [[ $XB_EXTRA_ARGS =~ --defaults-file=([^[:space:]]+) ]]; then

@hors hors marked this pull request as ready for review September 24, 2025 15:08
@JNKPercona
Copy link
Collaborator

Test Name Result Time
affinity-8-0 passed 00:05:46
auto-tuning-8-0 passed 00:18:22
cross-site-8-0 passed 00:33:03
custom-users-8-0 passed 00:11:45
demand-backup-cloud-8-0 failure 00:16:34
demand-backup-encrypted-with-tls-8-0 failure 00:16:28
demand-backup-8-0 failure 00:16:20
demand-backup-flow-control-8-0 passed 00:09:59
demand-backup-parallel-8-0 passed 00:08:36
demand-backup-without-passwords-8-0 failure 00:13:45
haproxy-5-7 passed 00:13:33
haproxy-8-0 passed 00:13:08
init-deploy-5-7 passed 00:15:31
init-deploy-8-0 passed 00:16:08
limits-8-0 passed 00:11:38
monitoring-2-0-8-0 passed 00:21:46
monitoring-pmm3-8-0 passed 00:17:21
one-pod-5-7 passed 00:13:51
one-pod-8-0 passed 00:13:58
pitr-8-0 passed 00:42:32
pitr-gap-errors-8-0 passed 00:55:14
proxy-protocol-8-0 passed 00:09:19
proxysql-sidecar-res-limits-8-0 passed 00:08:34
pvc-resize-5-7 passed 00:14:24
pvc-resize-8-0 passed 00:14:42
recreate-8-0 passed 00:16:59
restore-to-encrypted-cluster-8-0 failure 00:16:05
scaling-proxysql-8-0 passed 00:08:08
scaling-8-0 passed 00:10:19
scheduled-backup-5-7 passed 01:02:41
scheduled-backup-8-0 passed 01:02:52
security-context-8-0 passed 00:25:59
smart-update1-8-0 passed 00:32:48
smart-update2-8-0 passed 00:37:23
storage-8-0 passed 00:10:19
tls-issue-cert-manager-ref-8-0 passed 00:08:25
tls-issue-cert-manager-8-0 passed 00:11:04
tls-issue-self-8-0 passed 00:13:31
upgrade-consistency-8-0 passed 00:10:54
upgrade-haproxy-5-7 passed 00:23:01
upgrade-haproxy-8-0 passed 00:23:54
upgrade-proxysql-5-7 passed 00:14:17
upgrade-proxysql-8-0 passed 00:14:24
users-5-7 passed 00:24:57
users-8-0 passed 00:26:17
validation-hook-8-0 passed 00:01:37
We run 46 out of 46 14:48:33

commit: 807c896
image: perconalab/percona-xtradb-cluster-operator:PR-2161-807c8964

@hors hors added this to the v1.19.0 milestone Oct 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M 30-99 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants