mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
Merge PR #58582 into main
* refs/pull/58582/head: test: add a test for `fs set down` on online cluster mon: fix `fs set down` to adjust max_mds only when cluster is not down Reviewed-by: Dhairya Parmar <dparmar@redhat.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
commit
95dffdcbbd
@ -976,6 +976,11 @@ function test_mon_mds()
|
||||
ceph fs set $FS_NAME cluster_down true
|
||||
ceph fs set $FS_NAME cluster_down false
|
||||
|
||||
ceph fs set $FS_NAME max_mds 2
|
||||
ceph fs get $FS_NAME | expect_true grep -P -q 'max_mds\t2'
|
||||
ceph fs set $FS_NAME down false
|
||||
ceph fs get $FS_NAME | expect_true grep -P -q 'max_mds\t2'
|
||||
|
||||
ceph mds compat rm_incompat 4
|
||||
ceph mds compat rm_incompat 4
|
||||
|
||||
|
@ -598,6 +598,11 @@ int FileSystemCommandHandler::set_val(Monitor *mon, FSMap& fsmap, MonOpRequestRe
|
||||
|
||||
ss << fsp->get_mds_map().get_fs_name();
|
||||
|
||||
if (!is_down && fsp->get_mds_map().get_max_mds() > 0) {
|
||||
ss << " is already online";
|
||||
return 0;
|
||||
}
|
||||
|
||||
modify_filesystem(fsmap, fsv,
|
||||
[is_down](auto&& fs)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user