Repository navigation
fix(maintenance): keep one mds per active file system rank - #974
Open
abrahamperz wants to merge 2 commits into
Open
abrahamperz wants to merge 2 commits into
abrahamperz wants to merge 2 commits into
Conversation
Entering maintenance mode only required one MDS to remain on the other nodes. A cluster serving several CephFS file systems, or a file system with more than one active rank, needs an MDS for each active rank, so taking down a node could leave a file system without an MDS to fail over to. The non-OSD service check now reads the file system map and requires the sum of max_mds across all file systems to remain, with a floor of one so clusters without a file system behave as before. Assisted-by: claude-code:claude-opus-5-5 Signed-off-by: Abraham Perez <abraham1798@gmail.com>
Update the maintenance mode explanation to say that enough MDS services must remain for every active rank of every file system, and add a meta description to the page. Assisted-by: claude-code:claude-opus-5-5 Signed-off-by: Abraham Perez <abraham1798@gmail.com>
abrahamperz
force-pushed
the
abrahamperz/fix-maintenance-mds-per-filesystem
branch
from
November 26, 2026 05:51
3d05933 to
d335f85
Compare
abrahamperz
marked this pull request as ready for review
November 26, 2026 05:51
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.
Description
Entering maintenance mode checked that at least one MDS would remain on the other nodes. That is enough for a single file system with one active rank, but a cluster serving several CephFS file systems, or a file system with
max_mdsabove one, needs an MDS for every active rank. With the old check, putting a node into maintenance could leave a file system without an MDS to fail over to.I changed the non-OSD service check so it reads
ceph fs dumpand requires the sum ofmax_mdsacross all file systems to remain available besides the node going into maintenance. The requirement never drops below one, so clusters without a file system keep the previous behaviour. If the file system map cannot be read, the check fails instead of assuming one MDS is enough. The dry-run text now says the check covers the active ranks of every file system, and I updated the maintenance mode explanation page to match.Fixes #608
Type of change
How has this been tested?
I added unit tests in
microceph/ceph/operations_test.go:TestGetRequiredMdsscovers no file systems, one file system, two file systems, and a file system with several active ranks.TestCheckNonOsdSvcEnoughOpsFailMdsPerFilesystemrefuses maintenance when two file systems would be left with a single MDS.TestCheckNonOsdSvcEnoughOpsPassMdsPerFilesystemallows it when one MDS per file system remains.TestCheckNonOsdSvcEnoughOpsErrorFsDumpchecks that a failedceph fs dumpaborts the check.The existing
CheckNonOsdSvcEnoughOpsand dry-run plan tests were updated for the newceph fs dumpcall and dry-run text. I rango build ./...,go vet ./...andgo test ./ceph/...on Ubuntu 24.04 with Go 1.27.2, and all pass. The dry-run text keeps the prefix that the robot and shell maintenance tests match on.Contributor checklist
Please check that you have: