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

[RFC] rewrite RBD provisioning to use go-ceph instead of rbd command #729

Closed
wants to merge 16 commits into from

Conversation

nixpanic
Copy link
Member

@nixpanic nixpanic commented Dec 4, 2019

Describe what this PR does

This is a PR that should not be merged as is, but is used for Request For Comments.

There is a need to extend go-ceph with certain functions so that the current RBD provisioner can be rewritten to use the librbd.so library directly. This should increase performance.

Initial changes, and planned work, in no particular order:

  • implement createVolume()
  • implement deleteVolume(), foreground only, not as a background task
  • re-use connection for multiple RBD images/operations with the same parameters (StorageClass)
  • more object oriented programming, there is already a rbdVolume object that can have functions
  • implement cloning
  • implement snapshots
  • ...

The changes in the branch used to create this PR depend on a work-in-progress version of go-ceph. Hopefully it will be possible to merge parts of this [RFC] PR when go-ceph functionality gets merged,

Related issues

See-also: #449

@nixpanic nixpanic added the DNM DO NOT MERGE label Dec 4, 2019
@nixpanic nixpanic force-pushed the wip/rbd/go-ceph branch 2 times, most recently from cf0ba84 to 7d7963f Compare December 4, 2019 11:40
@humblec
Copy link
Collaborator

humblec commented Dec 4, 2019

@nixpanic thanks ! one question, instead of referring to your fork of ceph-go, cant we refer directly to go-ceph master branch? is it the case that, there are unmerged PRs in master against your fork ?

@nixpanic
Copy link
Member Author

nixpanic commented Dec 4, 2019

There are currently changes under review in the go-ceph project that this PR takes advantage of. Hence the Godep.toml points to the wip/for-ceph-csi branch in my repository instead of the master branch upstream.

@nixpanic nixpanic force-pushed the wip/rbd/go-ceph branch 5 times, most recently from 4d8d98e to 5d2fe62 Compare December 4, 2019 13:50
pkg/rbd/rbd_util.go Outdated Show resolved Hide resolved
pkg/rbd/rbd_util.go Outdated Show resolved Hide resolved
@nixpanic nixpanic force-pushed the wip/rbd/go-ceph branch 3 times, most recently from c7770e4 to 6722436 Compare December 5, 2019 11:46
pkg/rbd/rbd_util.go Outdated Show resolved Hide resolved
@humblec humblec added release-2.0.0 v2.0.0 release Priority-0 highest priority issue labels Dec 11, 2019
@humblec
Copy link
Collaborator

humblec commented Dec 17, 2019

@nixpanic as we are tracking this for 2.0.0 , can you please refresh the subjected issue/PR if you have any update ?

@nixpanic
Copy link
Member Author

nixpanic commented Jan 7, 2020

A cleaned-up version, using the upstream available go-ceph API is available at #777. That PR only implements CreateVolume, this PR will get updated with more functionality while go-ceph gets extended.

@nixpanic nixpanic removed Priority-0 highest priority issue release-2.0.0 v2.0.0 release labels Jan 7, 2020
@nixpanic nixpanic force-pushed the wip/rbd/go-ceph branch 2 times, most recently from aee8423 to 2cee603 Compare January 17, 2020 14:58
@nixpanic nixpanic force-pushed the wip/rbd/go-ceph branch 3 times, most recently from 5d7c4e4 to 1ab621e Compare January 27, 2020 15:57
Make it easier to open an rbd.Image by hiding the rados.IOContext for
functions that only need operate on an rbd.Image.

Signed-off-by: Niels de Vos <[email protected]>
Reduce the number of calls to the 'rbd' command, and replace it with the
go-ceph API.

While at it, modernize the calls to the functions to be more object
oriented.

Signed-off-by: Niels de Vos <[email protected]>
@nixpanic nixpanic added the component/rbd Issues related to RBD label Apr 18, 2020
@mergify
Copy link
Contributor

mergify bot commented May 21, 2020

This pull request now has conflicts with the target branch. Could you please resolve conflicts and force push the corrected changes? 🙏

@nixpanic
Copy link
Member Author

nixpanic commented Jun 3, 2020

The majority of calls has been replaced by a go-ceph implementation. Follow the Use go-ceph for volume management operations project for an updated status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/rbd Issues related to RBD DNM DO NOT MERGE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants