Replace MinIO with SeaweedFS in xbstream_fifo_test.sh, fix keyring_file bugs - #11
Merged
Merged
Conversation
…le bugs - Swap start_minio() for start_seaweedfs(): runs SeaweedFS's S3 gateway via docker (chrislusf/seaweedfs), publishing container port 8333 as host 9000 so all existing xbcloud --s3-endpoint=http://localhost:9000 calls are unchanged. Generates an S3 identity config so the admin/password creds xbcloud already uses keep working. Readiness check polls the S3 port directly since SeaweedFS has no MinIO-style /minio/health/ready endpoint. cleanup_exit() now stops the seaweedfs container on script exit. - Restore test_scripts/pxb/kmip_helper.sh (present in test_scripts/pxb/old/ but never re-pathed after a prior reorg), which init_datadir() sources for the keyring_kmip scenarios. - Fix full_backup_and_restore(): $COMPRESS_OPTIONS was set by the compressed-backup scenario but never passed to xtrabackup --backup, so compression never actually happened. - Fix init_datadir(): component_keyring_file.cnf used the wrong JSON key (component_keyring_file_data instead of path), so the keyring component silently failed to initialize. - Fix incremental_backup_and_restore(): the xtrabackup --backup calls never passed keyring config, so encrypted backups failed to init the keyring component during backup (prepare already passed it correctly). Verified full/incremental/compressed/partition-table backups against SeaweedFS end to end. Encrypted (keyring_file) backup now gets past both keyring bugs but hits an unrelated InnoDB assertion crash inside xtrabackup itself (fil0fil.cc:10943) during incremental backup of an encrypted tablespace - a separate PXB issue to track, not a script bug. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
tplavcic
approved these changes
Sep 22, 2026
9 tasks
saikumar-vs
added a commit
that referenced
this pull request
Sep 22, 2026
hashicorp was commented out of KMIP_CONFIGS/DEFAULT_KMIP_CONFIGS and, even if enabled, KMIPHelper.setup_hashicorp() executed the downloaded hashicorp_kmip_setup.py (a real Python script, #!/usr/bin/env python3, argparse-based) via `bash -s`, which would have failed immediately with a syntax error. Fixed to invoke it via `python3 -`, matching how the retired bash kmip_helper.sh ran it. Enabling hashicorp in the shared KMIP_CONFIGS adds a `[hashicorp]` parametrized variant to every vault_type-parametrized test that reads from it (test_fifo_kmip_backup here, plus the existing test_kmip_component_backup and test_crash_backup_encrypted_kmip in inc_backup_load_tests.py). Added a VAULT_LICENSE environment-variable guard (pytest.skip when unset) at each of those three call sites, matching the existing FORTANIX_EMAIL/PASSWORD guard pattern, since hashicorp_kmip_setup.py requires a real HashiCorp Vault Enterprise license. Verified: xbstream_fifo_tests.py::test_fifo_kmip_backup[hashicorp] skips cleanly (no VAULT_LICENSE in this environment) instead of failing; full license-driven setup path still needs a real Vault Enterprise license to verify end-to-end, same limitation noted for the bash script in PR #11. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
saikumar-vs
added a commit
that referenced
this pull request
Sep 22, 2026
Adds FIFO-streamed cloud backup coverage to the Python test framework, following the conventions of innodb_myrocks_backup_tests.py and inc_backup_load_tests.py: - test_helper.py: additive FIFO_STREAM/FIFO_DIR constants and six new BackupTestHelper methods (take_fifo_backup_step, restore_fifo_backup_step, take_fifo_full_backup_and_restore, take_fifo_incremental_backup_and_restore, restore_datadir_from, cleanup_fifo_state). These stream xtrabackup/xbstream and xbcloud through named pipes as two concurrent processes (background + foreground), mirroring the bash script's xbcloud_put()/xbcloud_get(), rather than take_backup()'s "cloud" backup_type (a single shell pipe). No existing method was modified. - seaweedfs_helper.py: new SeaweedFSHelper class managing the local SeaweedFS S3-gateway docker container, ported from the already-fixed xbstream_fifo_test.sh start_seaweedfs()/cleanup_exit() shell logic (percona-qa/server-qa PR #11). - xbstream_fifo_tests.py: the actual test file, with a session-scoped seaweedfs fixture and 7 tests mirroring the bash script's scenarios (full, incremental, compressed, partition-table, keyring_file, keyring_kmip, xbcrypt-encrypted backup). - README.md: new section documenting env vars, how to run, and the test reference table, matching the existing per-file structure. Verified end-to-end against real PXB 8.4.0-7 / PS 8.4.10-10 builds and a live SeaweedFS container: all 7 tests pass (test_fifo_kmip_backup requires KMIP vault/license resources not available in this environment, so it wasn't run, matching the same gap noted in the bash-script PR). One transient SeaweedFS-readiness timeout and one missing --xtrabackup-plugin-dir in two tests' prepare_params were found and fixed during that verification. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
saikumar-vs
added a commit
that referenced
this pull request
Sep 22, 2026
hashicorp was commented out of KMIP_CONFIGS/DEFAULT_KMIP_CONFIGS and, even if enabled, KMIPHelper.setup_hashicorp() executed the downloaded hashicorp_kmip_setup.py (a real Python script, #!/usr/bin/env python3, argparse-based) via `bash -s`, which would have failed immediately with a syntax error. Fixed to invoke it via `python3 -`, matching how the retired bash kmip_helper.sh ran it. Enabling hashicorp in the shared KMIP_CONFIGS adds a `[hashicorp]` parametrized variant to every vault_type-parametrized test that reads from it (test_fifo_kmip_backup here, plus the existing test_kmip_component_backup and test_crash_backup_encrypted_kmip in inc_backup_load_tests.py). Added a VAULT_LICENSE environment-variable guard (pytest.skip when unset) at each of those three call sites, matching the existing FORTANIX_EMAIL/PASSWORD guard pattern, since hashicorp_kmip_setup.py requires a real HashiCorp Vault Enterprise license. Verified: xbstream_fifo_tests.py::test_fifo_kmip_backup[hashicorp] skips cleanly (no VAULT_LICENSE in this environment) instead of failing; full license-driven setup path still needs a real Vault Enterprise license to verify end-to-end, same limitation noted for the bash script in PR #11. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
start_minio()forstart_seaweedfs()in xbstream_fifo_test.sh: runs SeaweedFS's S3 gateway via docker (chrislusf/seaweedfs), publishing container port 8333 as host9000so every existingxbcloud --s3-endpoint=http://localhost:9000call is unchanged. Generates an S3 identity config so theadmin/passwordcredentialsxbcloudalready uses keep working. Readiness check polls the S3 port directly since SeaweedFS has no MinIO-style/minio/health/readyendpoint.cleanup_exit()now stops theseaweedfscontainer on script exit (success, error, or interrupt).test_scripts/pxb/kmip_helper.sh(it existed undertest_scripts/pxb/old/but was never re-pathed back after a prior file reorg), whichinit_datadir()sources for thekeyring_kmipscenarios.full_backup_and_restore():$COMPRESS_OPTIONSwas set by the compressed-backup scenario but never actually passed toxtrabackup --backup, so compression never happened.init_datadir():component_keyring_file.cnfused the wrong JSON key (component_keyring_file_datainstead ofpath), so the keyring component silently failed to initialize.incremental_backup_and_restore(): thextrabackup --backupcalls never passed keyring config, so encrypted backups failed to init the keyring component during backup (--preparealready passed it correctly).Test plan
$COMPRESS_OPTIONSfix (Test 3) — verified, confirmed real zstd compression in logscleanup_exit()stops the SeaweedFS container on exit — verified directly