mon: fix fs set down to adjust max_mds only when cluster is not down#58582
mon: fix fs set down to adjust max_mds only when cluster is not down#58582
fs set down to adjust max_mds only when cluster is not down#58582Conversation
91e42fd to
57709f6
Compare
src/mon/FSCommands.cc
Outdated
|
|
||
| ss << fsp->get_mds_map().get_fs_name(); | ||
|
|
||
| if (!is_down && fsp->get_mds_map().get_old_max_mds() == 0) { |
There was a problem hiding this comment.
| if (!is_down && fsp->get_mds_map().get_old_max_mds() == 0) { | |
| if (!is_down && fsp->get_mds_map().get_max_mds() > 0) { |
would work, no?
|
This looks be to intentional, cephfs-admin-docs say: If this behaviour is to be changed then the docs would also need to be updated. 4e9ffff brought in this documentation. |
|
So, when a CephFS cluster is taken down using Lines 604 to 608 in 5969c11 It first records the old and then So, now when Lines 609 to 612 in 5969c11 old It looks to me that this functionality is correct, it doesn't always set the EDIT: Please discard this, the issue being here is when the |
|
There was a problem hiding this comment.
I couldn't reproduce the bug this PR is trying to fix, it doesn't exist. ceph fs set a down true successfully brought down the 2 active MDSs FS had and ceph fs set a down false successfully brought FS up with same number of active MDSs.
EDIT
@littlebees Was this bug seen in one of the release branches?
EDIT 2
The bug is reproducible on a new cluster when ceph fs set a down false is run without running ceph fs set a down true in the past.
Ugh! Seeing this Dhairya's comment now since the page was refreshed while posting my review. Agreed +1. |
I think the bug that this change is fixing is when |
|
My bad, I understand this now. You're right. |
|
this can be easily reproduced, better have a test case included as well. |
57709f6 to
860153b
Compare
dparmar18
left a comment
There was a problem hiding this comment.
this can be easily reproduced, it'd be great to have a test case.
860153b to
257d6a5
Compare
|
jenkins test api |
|
jenkins test make check |
batrick
left a comment
There was a problem hiding this comment.
Sorry, I disagree with the error message change. We shouldn't suggest the operator bring the fs down just so that this command will succeed. That doesn't make sense.
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 <chungfengz@synology.com>
Fixes: https://tracker.ceph.com/issues/66960 Signed-off-by: chungfengz <chungfengz@synology.com>
257d6a5 to
f8becaa
Compare
|
This PR is under test in https://tracker.ceph.com/issues/67214. |
Applying
fs set down falseon an up cluster will set the cluster's max_mds to 1, regardless of the cluster's current max_mds.fs set down falseshould only change max_mds when the cluster was set to down. Otherwise, the cluster should remain unchanged.Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e