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
osd: revamp {noup,nodown,noin,noout} related commands #27735
Conversation
retest this please |
src/mon/OSDMonitor.cc
Outdated
@@ -2442,25 +2442,12 @@ bool OSDMonitor::prepare_mark_me_down(MonOpRequestRef op) | |||
|
|||
bool OSDMonitor::can_mark_down(int i) | |||
{ | |||
if (osdmap.test_flag(CEPH_OSDMAP_NODOWN)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIXME: hrm, this is CEPH_OSDMAP_NODOWN, not CEPH_OSD_NODOWN
qa/workunits/cephtool/test.sh
Outdated
ceph osd add-noup $osd_0_device_class | ||
ceph osd add-nodown $osd_0_device_class | ||
ceph osd add-noin $osd_0_device_class | ||
ceph osd add-noout $osd_0_device_class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be a bit late, but I don't really like this syntax. I wonder if we should take the opportunity to switch to something more like:
ceph osd set-group <flag> <name>
ceph osd unset-group <flag> <name>
I don't love the 'group' part much either, tbh. But we usually do 'set' and 'unset' so it's weird to have 'add' and 'rm' here. And also weird to put the flag name as part of the command instead of as an argument.
21e1faa
to
05bd54f
Compare
@liewegas Ready for re-review. |
retest this please |
@liewegas Can you look? |
@liewegas Ping :-) |
@liewegas Are there any other comments that I should address first? Also please let me know if you are reluctant to accept these changes... |
The usage seems good to me. LGTM! (What follows is pure bike-shedding, feel free to ignore it) Perhaps set-flags and unset-flags rather than set-group and unset-group might be clearer? |
By itself, |
retest this please |
Makes sense. |
retest this please |
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
This works as a good supplement of ceph#27563. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
…ecated Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
…nd to new implementation Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
It does not make much sense to add this kind of restrictions as long as user is aware of what is going on. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
c58f207
to
199d92a
Compare
@liewegas make check passed now. Can we move forward with this now? I have some other bugs and improvements that depend on this. |
@xiexingguo @neha-ojha @jdurgin We have a decision to make here. If this targets octopus only, then we should change the encoding for OSDMap so that the new device flags are only encoded when the octopus feature is present. If we plan to backport this to nautilus, then that can stay the same. But... if we backport, we should make the old command format still work (e.g., |
Yes, I agree. In my opinion, we should probably backport it to nautilus and make sure the old commands still work. I'd be interested to know what others think, though. |
I'd love to prepare the nautilus backports:-)
They should (I just mark them as stale (deprecated) and there are still related tests, as you can see https://github.com/ceph/ceph/pull/27735/files#diff-9d634c21d02bca80a9ff0df5fd35acb9L1554 ) |
Backports for nautilus: #28400 |
This works as a good supplement of #27563.
Signed-off-by: xie xingguo xie.xingguo@zte.com.cn