-
Notifications
You must be signed in to change notification settings - Fork 759
Fix KMS configuration synchronization across cluster nodes #855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Co-authored-by: houseme <[email protected]>
Co-authored-by: houseme <[email protected]>
Copilot stopped work on behalf of
houseme due to an error
November 14, 2025 13:00
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
Contributor
|
@copilot fix |
Co-authored-by: houseme <[email protected]>
Contributor
Author
Copilot
AI
changed the title
[WIP] Fix KMS configuration changes on browser refresh
Fix KMS configuration synchronization across cluster nodes
Nov 15, 2025
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.
Type of Change
Related Issues
Fixes #841
Summary of Changes
This PR fixes a critical bug where KMS configuration was not synchronized across multiple servers in a cluster, causing the configuration to alternate between old and new values on browser refresh in multi-node setups behind nginx load balancers.
Root Cause:
.rustfs.sys/config/)Solution:
Added cluster-wide configuration persistence using the existing metadata storage system to ensure all nodes share the same KMS configuration state.
Main Changes
Added persistence functions in
rustfs/src/admin/handlers/kms_dynamic.rs:save_kms_config(): Serializes and saves KMS config to.rustfs.sys/config/kms_config.jsonload_kms_config(): Loads and deserializes KMS config from cluster storagesave_configandread_configutilities from ecstoreUpdated KMS configuration handlers:
ConfigureKmsHandler: Now persists configuration after successful in-memory configurationReconfigureKmsHandler: Now persists configuration after successful reconfigurationUpdated server initialization in
rustfs/src/main.rs:init_kms_system()now attempts to load persisted KMS configuration on startupFixed dependabot configuration:
Checklist
make pre-commit(cargo fmt, cargo check, cargo clippy)Impact
Testing:
cargo fmt --allapplied successfullycargo checkpasses without errorscargo clippy --all-targets --all-features -- -D warningspasses without warningsAdditional Notes
Benefits:
The fix is minimal and surgical, adding only the necessary persistence layer without changing the existing KMS functionality or API contracts.
Thank you for your contribution! Please ensure your PR follows the community standards (CODE_OF_CONDUCT.md) and sign the CLA if this is your first contribution.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.