-
Notifications
You must be signed in to change notification settings - Fork 808
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
support volume partition #824
support volume partition #824
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AndyXiangLi 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 |
/test pull-aws-ebs-csi-driver-external-test-latest |
1 similar comment
/test pull-aws-ebs-csi-driver-external-test-latest |
/test pull-aws-ebs-csi-driver-e2e-single-az |
Pull Request Test Coverage Report for Build 1815
💛 - Coveralls |
pkg/driver/node_linux.go
Outdated
return findNvmeVolume(nvmeName) | ||
nvmeDevicePath, err := findNvmeVolume(nvmeName) | ||
if err != nil { | ||
//Return the nvmeDevicePath just for logging purpose |
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 callers never read the returned string though.
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.
u r right... It is logging devicePath, will return empty string then
Can we add an e2e test otherwise lgtm |
2ff385f
to
d2c5233
Compare
/test pull-aws-ebs-csi-driver-migration-test-latest |
d2c5233
to
ca18caf
Compare
ca18caf
to
4caa358
Compare
partition := "" | ||
if part, ok := req.GetVolumeContext()[VolumeAttributePartition]; ok { | ||
if part != "0" { | ||
partition = part |
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.
should we validate it? Check that it's an integer? and not something crazy/malicious with weird paths and whatnot.
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.
Yeah, parse to int makes sense to me, is there any special rule for windows partition validation? should that be same?
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.
You can leave it same, I'll test it out later.
I think I will make the windows findDevicePath implementation ignore the partition arg. From my understanding, the windows mount code will always mount the first partition so it doesn't matter what partition is set to. https://github.com/kubernetes-csi/csi-proxy/blob/d47b9ecde8f020dd9d5eb2df3e56bf2f10a3f4a3/internal/os/volume/api.go#L87 (similarly, fstype gets ignored in windows world)
4caa358
to
9bcdfd3
Compare
/lgtm |
Is this a bug fix or adding new feature?
Fixes #812
What is this PR about? / Why do we need it?
Add volume partition support when stage&publish volumes to sync with in-tree driver
What testing is done?
unit test
e2e test