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

Missing rbd API components: function rbd_read_iterate2 #279

Open
phlogistonjohn opened this issue May 11, 2020 · 8 comments
Open

Missing rbd API components: function rbd_read_iterate2 #279

phlogistonjohn opened this issue May 11, 2020 · 8 comments
Labels
ceph-libs Fix or enhancement needed in ceph libraries

Comments

@phlogistonjohn
Copy link
Collaborator

The rbd API implements function(s) below but go-ceph does not:

  • rbd_read_iterate2

This issue has been filed to track implementing this missing
functionality in the appropriate package within go-ceph.
Please refer to the Ceph C API for details about the function(s)
in question.

NOTE: This issue was generated by a script.
If the content is innacurate or wording seems a bit odd
please excuse the script and blame the creator @phlogistonjohn

@tareksha
Copy link

hi, any progress on this?

@phlogistonjohn
Copy link
Collaborator Author

No, generally you can assume something has not been investigated yet when there's no assignee, other comments or PR.

However, comments like yours help us know there is interest in a feature and help get things prioritized. By the way, what's your use case for this function?

@tareksha
Copy link

@phlogistonjohn We maintain many ceph clusters in the cloud. A dedicated component continuously exports selected RBD images for external long-term storage and imports them back when needed. The lack of rbd-cli-like "export" (both volume contents and metadata) forces us to fork rbd cli processes from go code. Since we have to fork the cli anyway we ended up not using go-ceph at all.
We really want to do it the right way and stop forking cli external processes from go code.

@phlogistonjohn
Copy link
Collaborator Author

I started looking into this and it doesn't look too challenging. In many ways it's similar to our existing diff iterate support.

However, what's not clear to me is why you need this particular call versus an existing api like Read/ReadAt. I'm guessing it could be related to hole detection but it'd be nice to know for sure if that's the use case. Regardless, we'll probably add it, but I'm nosy and like to know why someone picks one interface over another. :-)

@phlogistonjohn
Copy link
Collaborator Author

I've created a preliminary implementation at #624.
At this time I can't reproduce the behavior of hole detection that the function in ceph is noted to have. I'll look into that after the holidays.

In the meantime you may just want to look into using Read and/or ReadAt calls unless you strongly need hole detection at the ceph layer.

@tareksha
Copy link

Thanks for the quick response @phlogistonjohn !

@phlogistonjohn
Copy link
Collaborator Author

https://tracker.ceph.com/issues/3619

It appears that the sparse file "hole" detection does not work properly. And it has not for a while.

I can implement it without unit tests to verify hole detection works and "just hope" that ceph rbd team fixes the issue at some point. But I'm not clear if that's valuable to our users.
@tareqhs since you have interest in the API - how important is hole detection to your use case? Since the hole detection doesn't work would Read/ReadAt calls that are already in the library sufficient for your use? Or are you interested in this api for other reasons?

@phlogistonjohn
Copy link
Collaborator Author

It's been over two weeks since I checked up on the requirement to detect "holes".
Based on the non-response I think I will abandon PR #624 since without hole detection it adds very little value on top of the existing read and write calls available in the rbd package already. In addition, I'm going to relabel the issue so that we know the reason we're not wrapping it isn't lack of time/interest but ceph issues.
This doesn't mean that the issue will never be taken up again, but I do suggest that if there's interest in the api either discuss the lack of hole detection with the rbd team in ceph or explain why this API, without hole detection, is needed over existing APIs.

Thanks!

@phlogistonjohn phlogistonjohn added limitation The go-ceph API is incomplete or more limited than the ceph api ceph-libs Fix or enhancement needed in ceph libraries and removed enhancement limitation The go-ceph API is incomplete or more limited than the ceph api labels Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ceph-libs Fix or enhancement needed in ceph libraries
Projects
None yet
Development

No branches or pull requests

2 participants