-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add heketi support #54
Conversation
Can one of the admins verify this patch? |
Signed-off-by: Jose A. Rivera <[email protected]>
Signed-off-by: Jose A. Rivera <[email protected]>
This commit allows for the use of the information in an incoming VolumeCreate request to initialize the REST clients to the Gluster servers. Since DeleteVolume() does not receive any volume attributes, we would have needed to fetch all PVs and search them for one that corresponds to the volume being deleted. To avoid this, we establish a cache of all previously connected GlusterFS servers which is updated on a VolumeCreate() for a non-existing volume and on a cache miss. Signed-off-by: Jose A. Rivera <[email protected]>
Signed-off-by: Jose A. Rivera <[email protected]>
Signed-off-by: Jose A. Rivera <[email protected]>
db01710
to
3ed7322
Compare
@@ -16,7 +16,7 @@ func RoundUpSize(volumeSizeBytes int64, allocationUnitBytes int64) int64 { | |||
return (volumeSizeBytes + allocationUnitBytes - 1) / allocationUnitBytes | |||
} | |||
|
|||
// RoundUpToGB rounds up given quantity upto chunks of GiB | |||
// RoundUpToGB rounds up given quantity upto chunks of GB |
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.
+1 Looking at the code above shows the use of Base 10 multipliers. It's very important that we be consistent here or we'll likely run into sizing bugs down the road.
pkg/glusterfs/client.go
Outdated
const ( | ||
GD2DefaultInsecure = false | ||
|
||
ServerKindUnknown GlusterServerKind = "" | ||
ServerKindGD2 GlusterServerKind = "glusterd2" |
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.
Style nit: When defining constants for a new type I think its a lot cleaner/clearer to start a new const (...) block, that only contains the constants for that type.
Closing this in favor of #64. |
Describe what this PR does
The main goal of this PR is to introduce Heketi/GD1 support to the CSI Driver. In order to accomplish this, some refactoring had to be done to remove some assumptions and abstract away the Gluster-related client pieces.
This is intended as an alternative to PR #1 and is meant to serve as an add-on to the discussions there.
Is there anything that requires special attention?
I tried to do my best to compartmentalize all my changes across various commits. Each commit is logically distinct, and I've tested them such that I believe each will produce a functional build as long as all its predecessors are present.