Skip to content

fix: route MongoDB PBM dataprotection through syncer#3110

Draft
gnolong wants to merge 12 commits into
release-1.1from
fix/mongodb-pbm-syncer-dataprotection
Draft

fix: route MongoDB PBM dataprotection through syncer#3110
gnolong wants to merge 12 commits into
release-1.1from
fix/mongodb-pbm-syncer-dataprotection

Conversation

@gnolong

@gnolong gnolong commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

This draft wires MongoDB PBM physical backup, physical restore, and PITR addon flows through the syncer dataprotection API for both sharding and replicaset topologies.

Changes include:

  • run config-server, shard, and replicaset PBM sidecars under syncer with the pbm-agent workload type, while keeping PBM agent MongoDB connections local to each pod
  • run mongos under syncer with the mongos workload type so it can participate in sharded restore coordination
  • copy syncerctl into the data volume so ActionSet jobs can call the target pod syncer service remotely
  • replace sharded and replicaset PBM physical backup/restore and PITR scripts with syncerctl backup, syncerctl restore, and syncerctl pitr calls
  • persist PBM restore storage configuration into the syncer restore coordinator ConfigMap
  • remove the old shard and replicaset restore-signal startup paths from PBM restore ActionSets
  • keep fallback metadata handling for existing backups that do not yet include replset mapping extras

Local Validation

  • bash -n for updated MongoDB dataprotection scripts
  • git diff --check
  • helm lint addons/mongodb
  • helm template kb-addon-mongodb addons/mongodb --namespace kb-system
  • SYNCER_TEST_TOPOLOGY=sharding SYNCER_TEST_RUN_E2E=true go test ./test/e2e/mongodb -run TestShardingFullBackupRestore -count=1 -v -timeout 45m
  • SYNCER_TEST_TOPOLOGY=sharding SYNCER_TEST_RUN_E2E=true go test ./test/e2e/mongodb -run TestShardingPITR -count=1 -v -timeout 45m
  • SYNCER_TEST_TOPOLOGY=replicaset SYNCER_TEST_RUN_E2E=true go test ./test/e2e/mongodb -run TestReplicaSetFullBackupRestore -count=1 -v -timeout 45m
  • SYNCER_TEST_TOPOLOGY=replicaset SYNCER_TEST_RUN_E2E=true go test ./test/e2e/mongodb -run TestReplicaSetPITR -count=1 -v -timeout 45m

@codecov-commenter

codecov-commenter commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (36eb2a3) to head (fe1414c).
⚠️ Report is 1 commits behind head on release-1.1.

Additional details and impacted files
@@             Coverage Diff             @@
##           release-1.1   #3110   +/-   ##
===========================================
  Coverage         0.00%   0.00%           
===========================================
  Files               73      73           
  Lines             9383    9383           
===========================================
  Misses            9383    9383           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gnolong gnolong added the nopick Not auto cherry-pick when PR merged label Jul 8, 2026
@gnolong gnolong changed the title fix: route MongoDB shard PBM dataprotection through syncer fix: route MongoDB PBM dataprotection through syncer Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nopick Not auto cherry-pick when PR merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants