Skip to content

Commit 6bfce64

Browse files
mon: fix fs set down to adjust max_mds only when cluster is not down
Applying `fs set down false` on an up cluster will set the cluster's max_mds to 1, regardless of the cluster's current max_mds. `fs set down false` should only change max_mds when the cluster was set to down. Otherwise, the cluster should remain unchanged. Fixes: https://tracker.ceph.com/issues/66960 Signed-off-by: chungfengz <[email protected]>
1 parent 23ab2b7 commit 6bfce64

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/mon/FSCommands.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,11 @@ int FileSystemCommandHandler::set_val(Monitor *mon, FSMap& fsmap, MonOpRequestRe
598598

599599
ss << fsp->get_mds_map().get_fs_name();
600600

601+
if (!is_down && fsp->get_mds_map().get_max_mds() > 0) {
602+
ss << " is already online";
603+
return 0;
604+
}
605+
601606
modify_filesystem(fsmap, fsv,
602607
[is_down](auto&& fs)
603608
{

0 commit comments

Comments
 (0)