-
Notifications
You must be signed in to change notification settings - Fork 115
feat: inode to path reverse resolution in the cephfs driver #5222
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
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
I don't know why "github.com/rs/zerolog/log" is imported, however every time I try to save to file it adds it automatically, so not sure if I have done something wrong with the logging. |
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.
A first pass with some suggestions
b01e033
to
5b8ba55
Compare
Keep in mind, for this to work on the production cluster, we will need a key that has access to these commands. |
OK, before merging: please add a changelog in |
e8ebcc9
to
2a978f6
Compare
As discussed, let's just include some logic to return |
31044cf
to
295433b
Compare
295433b
to
922bc30
Compare
A proof of concept for the inode to path reverse resolution in the cephfs driver.
The main function is
GetPathByID
which does the following:getFSStatus()
&parseActiveMDS()
)opaque_id
to aninteger
(to be seen if needed in the future, for testing it was required)dumpInode()
&extractPathFromInodeOutput()
)The path we get from the mds is the full path on the ceph cluster e.g.
/volumes/_nogroup/rasmus/welander
, however Reva mounts at the root/volumes/_nogroup/rasmus
, so the corresponding cephfs driver path is/rasmus/welander
.Note: this proof of concept uses a powerful admin key to the ceph cluster, which will need to be generated for the production ceph cluster with the required permissions, and has only been tested on a test ceph cluster.
Line 215 - 224 should be removed since it's only there for testing purposes.