-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Fix mountOptions in iSCSI and FC volume plugins #89172
Conversation
Do not mount volumes in WaitForAttach(), mount them in MountDevice() instead. They will get proper mount options this way.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsafrane 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 |
ab63f85
to
3ac39a2
Compare
/retest |
/assign |
pkg/volume/iscsi/iscsi_util.go
Outdated
if err = util.persistISCSI(b); err != nil { | ||
// Return transient error so kubelet calls Unmount / Unmap when the pod | ||
// is deleted. | ||
return "", types.NewTransientOperationFailure(err.Error()) |
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.
Also may be some tests for that?
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.
There is no unit test for whole AttachDisk()
function and adding one extends scope of this PR in order of magnitude.
5f33ad4
to
5f7c254
Compare
/retest |
5f7c254
to
1a900a7
Compare
pkg/volume/iscsi/iscsi_util.go
Outdated
return globalPDPathOperation(b)(b, devicePath, util) | ||
|
||
if err = util.persistISCSI(b); err != nil { | ||
// Return transient error so kubelet calls Unmount / Unmap when the pod |
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 comment is invalid.
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.
Fixed
Do not mount volumes in WaitForAttach(), mount them in MountDevice() instead. They will get proper mount options this way.
1a900a7
to
58129fd
Compare
/lgtm |
/retest Review the full test history for this PR. Silence the bot with an |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Move mounting of volumes from
WaitForAttach()
toMountDevice
. This way, mountOptions are correctly applied.Fixes #89171
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: