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
mon/OSDMonitor: list osd tree in named bucket #19564
Conversation
22122f8
to
421a0cf
Compare
roots.insert(i); | ||
} | ||
} | ||
|
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.
roots is empty if the bucket doesn't exist?
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.
@hjwsm1989 yes, nothing to show
src/mon/OSDMonitor.cc
Outdated
@@ -3497,6 +3497,7 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op) | |||
} | |||
else if (prefix == "osd dump" || | |||
prefix == "osd tree" || | |||
prefix == "osd tree-ls" || | |||
prefix == "osd ls" || |
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.
Seems by accident you changed the mode of this file to be executable
...
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.
thanks, i change it to default
421a0cf
to
ba50af3
Compare
@liewegas need a review, please |
Don't we already have 'ceph osd ls-tree ' that does exactly this? (There is also 'ceph osd crush ls ' that returns the immediate child items.) |
@liewegas ceph osd ls-tree only return osd id not with their status and weight, and ceph osd crush ls only return the the direct child items(children may also be bucket ). they don't show the osd status(up, down).
|
what about s/tree-ls/tree-under/ or tree-from? (The ls-tree vs tree-ls bugs me, and in the other cases 'ls' is always a raw list, not a table.) |
@liewegas it's also hard for me to choose a proper command name . |
ba50af3
to
f92c56d
Compare
Signed-off-by: kungf <yang.wang@easystack.cn>
f92c56d
to
80fd071
Compare
@liewegas cmd name was changed to tree-under, need a review, please |
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.
looks good!
easy to get osd status in named bucket.
eg.
"ceph osd tree-ls node-1" will only show osds in bucket node-1,
Signed-off-by: kungf yang.wang@easystack.cn
@yangdongsheng