Skip to content

[feature](operator) Persist mutable FE BE and MS configuration - #524

Merged
morningman merged 2 commits into
apache:masterfrom
Al-assad:feature/runtime-config-persistence
Oct 20, 2026
Merged

morningman merged 2 commits into
apache:masterfrom
Al-assad:feature/runtime-config-persistence

Conversation

@Al-assad

@Al-assad Al-assad commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

What problem does this PR solve?

Persisted mutable FE/BE settings currently remain in the container filesystem unless their configuration directory is explicitly backed by storage. Pod replacement can therefore lose those settings, including cloud BE heartbeat configuration. MS also persists changes into its base configuration by default, and its entrypoint can overwrite that file from a ConfigMap on restart.

This change adds runtime configuration persistence for DorisCluster FE/BE and DorisDisaggregatedCluster FE/BE/MS:

  • New clusters automatically use suitable existing writable PVCs. Existing clusters retain their previous behavior across operator upgrades; an optional spec.runtimeConfigPersistence.enabled enables a verified migration.
  • Reuse log, FE metadata, or DCR BE data PVCs, with per-Pod directories and a recorded storage identity. Exclude cache roots, read-only storage, and emptyDir. No PVC templates or user ConfigMaps are changed.
  • Prepare base configuration using an init container with the main image. Point the kernel's mutable configuration settings at a separate persistent directory, preserving existing overrides and the image's normal entrypoint.
  • Provide a backup/review/apply migration tool that verifies workload and Pod identities, live source configuration, copied files, and migration markers before enabling the normal rollout.
  • Include CRD/deepcopy generation and operational documentation.

Clusters without suitable existing persistent storage remain unchanged in automatic mode and emit a warning. Explicit enablement requires suitable storage. This change does not provide kernel query admission before a new cloud BE receives its first heartbeat.

Release note

Preserve mutable FE, BE, and MS configuration across Pod replacement using existing safe PVCs. Existing clusters remain unchanged until explicitly migrated.

Check List (For Author)

  • Test
    • Unit Test
    • go test -race ./pkg/common/utils/runtimeconfig -count=1
    • go test ./pkg/controller/... ./pkg/common/utils/resource ./api/... -skip '^Test_ClearResources$' -count=1 -timeout=120s
    • go test ./pkg/common/utils/runtimeconfig ./pkg/controller ./pkg/common/utils/resource ./pkg/controller/sub_controller/disaggregated_cluster/... ./api/... -count=1 -timeout=120s
    • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tools/tests -v (5 tests)
    • go build ./cmd/operator ./cmd/dorisctl
    • go vet ./pkg/common/utils/runtimeconfig ./pkg/controller/...
    • make generate manifests; shell syntax and diff whitespace checks.
    • Validation limitation: the unfiltered local run stalled in the existing BE Test_ClearResources while waiting for informer cache synchronization and was stopped. The filtered controller suite passed; the FE suite also passed in the unfiltered run. No live Doris rolling-update/scale-out test was performed.
  • Behavior changed:
    • Yes. Automatic persistence for newly managed clusters with safe PVCs; existing clusters require explicit migration.
  • Does this need documentation?
    • Yes. Included in doc/operation/runtime_config_persistence.md.

DDC scale-down retains the PVC selected for runtime configuration while continuing to clean up cache PVCs. Scaling back to the same ordinal restores persisted overrides and migration markers. Regression tests cover retained configuration claims, cache cleanup, legacy behavior, and invalid storage metadata.

Preserve mutable runtime configuration on existing safe PVCs while keeping user ConfigMaps unchanged. Record compatibility defaults for existing clusters and provide a verified opt-in migration tool.
@morningman
morningman merged commit d4ae3df into apache:master Oct 20, 2026
3 checks passed
morningman pushed a commit that referenced this pull request Oct 20, 2026
…rsistence (#523, #524) (#526)

* [feature](operator) Persist mutable FE BE and MS configuration (#524)

* [feature](operator) Persist mutable FE BE and MS configuration

Preserve mutable runtime configuration on existing safe PVCs while keeping user ConfigMaps unchanged. Record compatibility defaults for existing clusters and provide a verified opt-in migration tool.

* Retain runtime configuration PVCs during compute group scale-down

(cherry picked from commit d4ae3df)

* [fix] Use MS state for disaggregated BE decommission (#523)

* fix: use MS state for disaggregated BE decommission

* Fix MS instance query colon compatibility

(cherry picked from commit 7c6de21)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants