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

How to call OSD BLACKLIST? #872

Closed
AmazingPangWei opened this issue Apr 23, 2023 · 4 comments · Fixed by #873
Closed

How to call OSD BLACKLIST? #872

AmazingPangWei opened this issue Apr 23, 2023 · 4 comments · Fixed by #873

Comments

@AmazingPangWei
Copy link

I'm pretty confused that there is not enough docs for learning go-ceph. I want to use it to add a osd blacklist, like ceph osd blacklist add , but I didn't see any docs or examples.

So, what is the proper way to do this?

@phlogistonjohn
Copy link
Collaborator

I'm sorry to hear that you find our docs insufficient.

We have not implemented any APIs specific to the ceph osd blocklist (nee blacklist) commands. However, almost all ceph cli commands are implemented by sending JSON commands to one of rados.MgrCommand or rados.MonCommand. Knowing what JSON to send is the sometimes tricky part because it's not clearly documented either, but can be determined by a sending a special JSON {"prefix": "get_command_descriptions"} to the API which dumps the list of "endpoints".

So you can either put in a request that we write Go APIs for these blocklist related ceph features or you can try writing something that makes use of rados APIs directly and then you don't need to wait for us to get to it.

See also #598 and #626

@phlogistonjohn
Copy link
Collaborator

phlogistonjohn commented Apr 23, 2023

I also just remembered that there's a librados C API related to this as well (this is not wrapped):
https://github.com/ceph/ceph/blob/d9e6e1de796bccd81bfbb50bc461c2d5ecb19c7f/src/include/rados/librados.h#L3736-L3743

I'm not clear on the relationship between the ceph command and the C-api (if they do the same thing) because I have not researched this topic much myself.

@AmazingPangWei
Copy link
Author

@phlogistonjohn Thanks for your reply. I just tested rados.MonCommand by sending {"prefix": "get_command_descriptions"}, and found ceph osd blocklist command successfully. You my friend, are a true hero.

I think it's a good way to mention this part to docs (such as hints.md), which is helpful for beginner, like me.

@phlogistonjohn
Copy link
Collaborator

@phlogistonjohn Thanks for your reply. I just tested rados.MonCommand by sending {"prefix": "get_command_descriptions"}, and found ceph osd blocklist command successfully. You my friend, are a true hero.

Thanks for the kind words.

I think it's a good way to mention this part to docs (such as hints.md), which is helpful for beginner, like me.

Yes, I agree. I will keep this issue open to serve as a TODO to document this and some related topics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants