-
Notifications
You must be signed in to change notification settings - Fork 38.8k
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
Feature: Implements Raw Block Volume Support for in-tree vSphere plugin #68761
Conversation
9a87a71
to
9bd0cf5
Compare
/test pull-kubernetes-e2e-gce-100-performance |
@fanzhangio: You must be a member of the kubernetes/kubernetes-milestone-maintainers github team to set the milestone. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@vladimirvivien Could you plz take a look at this PR ? |
Hi @fanzhangio
Take a look at gce_pd_block to get an idea what is needed |
9bd0cf5
to
85e1b27
Compare
04b1d6e
to
44a06bf
Compare
"k8s.io/kubernetes/pkg/volume/util/volumepathhandler" | ||
) | ||
|
||
var _ volume.BlockVolumePlugin = &vsphereVolumePlugin{} |
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.
The existing vsphere volume plugin already support creating/attaching/detaching/deleting block volumes. Could you explain what is the additional functionality specific to vSphere are we getting for block volumes with this PR?
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.
@SandeepPissay I think this PR is for raw block device support.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#raw-block-volume-support
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.
Thanks @divyenpatel ! Yes, it is raw block volume support. I am going to modify the PR title for more clarity. @SandeepPissay
e2e0900
to
691f756
Compare
/lgtm |
@SandeepPissay @divyenpatel PTAL, this PR needs approval. Thanks. |
blkUtil := volumepathhandler.NewBlockVolumePathHandler() | ||
globalMapPathUUID, err := blkUtil.FindGlobalMapPathUUIDFromPod(pluginDir, mapPath, podUID) | ||
if err != nil { | ||
return nil, err |
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.
Would be good for debugging if we can print error before returning.
glog.Errorf("Failed to find GlobalMapPathUUID from Pod: %s with error: %+v", podUID, err)
return nil, err
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.
OK
func (plugin *vsphereVolumePlugin) newBlockVolumeMapperInternal(spec *volume.Spec, podUID types.UID, manager vdManager, mounter mount.Interface) (volume.BlockVolumeMapper, error) { | ||
volumeSource, _, err := getVolumeSource(spec) | ||
if err != nil { | ||
return nil, err |
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.
log error before return.
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.
Done
@fanzhangio can you please provide testing details? |
691f756
to
6c8dd1a
Compare
Hi @divyenpatel, here is E2E test by steps:
|
YAMLs Persistent Volume Claim requesting a Raw Block Volume
Create Storage Class
Persistent Volume
|
@fanzhangio I do not see in the diff, following check is removed pkg/volume/vsphere_volume/vsphere_volume.go
|
- add raw block volume support for vsphere volume provisioner - set VolumeMode and any FSType in vsphere volume dynamic provision if feature BlockVolume enabled - implement BlockVolumePlugin, BlockVolumeMapper, BlockVolumeUnmapper interfaces. - add tests for vsphere block volume
6c8dd1a
to
dcb3a5f
Compare
/test pull-kubernetes-integration |
/assign @divyenpatel |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: divyenpatel, fanzhangio The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
/kind feature |
/test pull-kubernetes-e2e-gce |
VolumeMode
in PV specBlockVolumePlugin
,BlockVolumeMapper
,BlockVolumeUnmapper
interfaces.What this PR does / why we need it:
vSphere should support raw block volume support
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#raw-block-volume-support
Which issue(s) this PR fixes:
Fixes #68762
Special notes for your reviewer:
Release note: