Skip to content
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

Merged
merged 1 commit into from Jan 6, 2018

Conversation

Projects
None yet
5 participants
@kungf
Copy link
Contributor

commented Dec 17, 2017

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

@kungf kungf force-pushed the kungf:list_bucket_osd branch from 22122f8 to 421a0cf Dec 17, 2017

roots.insert(i);
}
}

This comment has been minimized.

Copy link
@hjwsm1989

hjwsm1989 Dec 17, 2017

Contributor

roots is empty if the bucket doesn't exist?

This comment has been minimized.

Copy link
@kungf

kungf Dec 18, 2017

Author Contributor

@hjwsm1989 yes, nothing to show

@@ -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" ||

This comment has been minimized.

Copy link
@xiexingguo

xiexingguo Dec 18, 2017

Member

Seems by accident you changed the mode of this file to be executable ...

This comment has been minimized.

Copy link
@kungf

kungf Dec 18, 2017

Author Contributor

thanks, i change it to default

@kungf kungf force-pushed the kungf:list_bucket_osd branch from 421a0cf to ba50af3 Dec 18, 2017

@kungf

This comment has been minimized.

Copy link
Contributor Author

commented Dec 19, 2017

@liewegas need a review, please

@liewegas

This comment has been minimized.

Copy link
Member

commented Dec 19, 2017

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.)

@kungf

This comment has been minimized.

Copy link
Contributor Author

commented Dec 19, 2017

@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).
this pr cmd can do:

  1. show all osds in one bucket with status, the bucket can be host, rack, row, root ... ,
  2. can only show wanted status osds(like ceph osd tree up/down/destory),
@liewegas

This comment has been minimized.

Copy link
Member

commented Dec 19, 2017

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.)

@kungf

This comment has been minimized.

Copy link
Contributor Author

commented Dec 19, 2017

@liewegas it's also hard for me to choose a proper command name .
what about tree-in? tree-under is a little long, tree-in may be easier to knock the keyboard

@kungf kungf force-pushed the kungf:list_bucket_osd branch from ba50af3 to f92c56d Dec 20, 2017

mon/OSDMonitor: list osd tree in named bucket
Signed-off-by: kungf <yang.wang@easystack.cn>

@kungf kungf force-pushed the kungf:list_bucket_osd branch from f92c56d to 80fd071 Dec 20, 2017

@kungf

This comment has been minimized.

Copy link
Contributor Author

commented Dec 21, 2017

@liewegas cmd name was changed to tree-under, need a review, please

@liewegas
Copy link
Member

left a comment

looks good!

@yuriw

This comment has been minimized.

Copy link
Contributor

commented Jan 2, 2018

@yuriw yuriw merged commit 9389190 into ceph:master Jan 6, 2018

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.