-
Notifications
You must be signed in to change notification settings - Fork 200
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
[Feat.]Raw Block Volume Support for LocalPV #1536
Conversation
path := bd.Spec.FileSystem.Mountpoint | ||
|
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.
this change is not required - as the blkpath is already returned by the function. Also, block path should be based on dev links - because after restart the path can change.
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.
path
is over-ridden blkPath
, below this function is called. blkPath is now based on dev links.
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.
Provided some comments
@@ -90,7 +93,7 @@ func (p *Provisioner) ProvisionBlockDevice(opts pvController.VolumeOptions, volu | |||
WithAnnotations(volAnnotations). | |||
WithReclaimPolicy(opts.PersistentVolumeReclaimPolicy). | |||
WithAccessModes(pvc.Spec.AccessModes). | |||
WithVolumeMode(fs). | |||
WithVolumeMode(volumeMode). | |||
WithCapacityQty(pvc.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)]). | |||
WithLocalHostPathFormat(path, fsType). |
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.
Why is the fsType
required here?
In Raw Block mode, only the path is required in LocalVolumeSource
.
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.
In case of block mode will FSType be ignored? Does path contain block path?
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.
Yes, path is over-ridden by the blkPath.
f35ed8e
to
6f82061
Compare
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.
Found some fixes!
P.S. share your ideas, feedbacks or issues with us at https://github.com/fixmie/feedback (this message will be removed after the beta stage).
When("remove finalizer", func() { | ||
It("finalizer should come back after provisioner restart", func() { | ||
bdcName := "bdc-pvc-" + string(pvcObj.GetUID()) | ||
bdcObj, err := ops.BDCClient.WithNamespace(string(artifacts.OpenebsNamespace)).Get(bdcName, |
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.
shadow: declaration of "err" shadows declaration at line 38 (from govet
)
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.
Suggested a few code changes for refactor. That will be good to take in this PR.
Overall the functionality looks good.
BDD logs for better visibility :
|
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.
LGTM.
Thanks for taking this up @rahulchheda
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.
Lgtm
Signed-off-by: Rahul M Chheda <[email protected]>
Signed-off-by: Rahul M Chheda <[email protected]>
- Added Builder Function for support & checking Block Device - Returned true, for support of the Block Device - Provided the path for the raw Block device, if provided Signed-off-by: Rahul M Chheda <[email protected]>
…upport, and some other minor changes highlighter below - Added containerBuilder function (funcName: WithVolumeDevices Builder) - Added pvcBuilder function (funcname: WithVolumeMode Builder) - Added 2 BDD TestCases : - [+ve] Basic Raw Block Volume Support - [-ve] If PVC volumeMode is "Block", but mountPath is provided in Deployment PodSpecTemplate Signed-off-by: Rahul M Chheda <[email protected]>
…ion/method Signed-off-by: Rahul M Chheda <[email protected]>
- localPv-provisioner removed if-else case for providing blockdevice path or mountPath - localPV-provisioner change PV volumeMode type to "Block", if PVC has it. - Added appropraite comments in the BDD Signed-off-by: Rahul M Chheda <[email protected]>
Signed-off-by: Rahul M Chheda <[email protected]>
Signed-off-by: Rahul M Chheda <[email protected]>
fc4629f
to
3cdd154
Compare
Signed-off-by: Rahul M Chheda <[email protected]>
3cdd154
to
69cb662
Compare
- Added Builder Function for support & checking Block Device - Returned true, for support of the Block Device - Provided the path for the raw Block device, if provided - Added containerBuilder function (funcName: WithVolumeDevices Builder) - Added pvcBuilder function (funcname: WithVolumeMode Builder) - Added 2 BDD TestCases : - [+ve] Basic Raw Block Volume Support - [-ve] If PVC volumeMode is "Block", but mountPath is provided in Deployment PodSpecTemplate Signed-off-by: Rahul M Chheda <[email protected]>
What this PR does / why we need it:
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
Checklist:
documentation
tagbreaking-changes
tagrequires-upgrade
tag