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

Add heketi support #54

Closed
wants to merge 5 commits into from
Closed

Add heketi support #54

wants to merge 5 commits into from

Conversation

jarrpa
Copy link
Contributor

@jarrpa jarrpa commented Sep 18, 2018

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.

@ghost ghost assigned jarrpa Sep 18, 2018
@ghost ghost added the in progress label Sep 18, 2018
@centos-ci
Copy link
Collaborator

Can one of the admins verify this patch?

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]>
@@ -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

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.

const (
GD2DefaultInsecure = false

ServerKindUnknown GlusterServerKind = ""
ServerKindGD2 GlusterServerKind = "glusterd2"

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.

@jarrpa
Copy link
Contributor Author

jarrpa commented Sep 27, 2018

Closing this in favor of #64.

@jarrpa jarrpa closed this Sep 27, 2018
@ghost ghost removed the in progress label Sep 27, 2018
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 this pull request may close these issues.

3 participants