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

Fix mountOptions in iSCSI and FC volume plugins #89172

Merged
merged 2 commits into from
Mar 26, 2020

Conversation

jsafrane
Copy link
Member

What type of PR is this?
/kind bug

What this PR does / why we need it:
Move mounting of volumes from WaitForAttach() to MountDevice. This way, mountOptions are correctly applied.

Fixes #89171

Does this PR introduce a user-facing change?:

Fixed mountOptions in iSCSI and FibreChannel volume plugins.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


Do not mount volumes in WaitForAttach(), mount them in MountDevice()
instead. They will get proper mount options this way.
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 17, 2020
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 17, 2020
@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 17, 2020
@jsafrane
Copy link
Member Author

/retest

pkg/volume/fc/fc_util.go Show resolved Hide resolved
pkg/volume/iscsi/iscsi_util.go Outdated Show resolved Hide resolved
@gnufied
Copy link
Member

gnufied commented Mar 24, 2020

/assign

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())
Copy link
Member

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?

Copy link
Member Author

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.

@jsafrane
Copy link
Member Author

/retest

return globalPDPathOperation(b)(b, devicePath, util)

if err = util.persistISCSI(b); err != nil {
// Return transient error so kubelet calls Unmount / Unmap when the pod
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is invalid.

Copy link
Member Author

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.
@gnufied
Copy link
Member

gnufied commented Mar 26, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 26, 2020
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iSCSI PV is mounted without mountOptions
4 participants