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

Pass additional flags to subpath mount to avoid flakes in certain conditions #104253

Merged

Conversation

mauriciopoppe
Copy link
Member

@mauriciopoppe mauriciopoppe commented Aug 9, 2021

What type of PR is this?

/kind bug
/sig storage

What this PR does / why we need it:

Pass additional flags to subpath mount to avoid flakes in certain conditions

Does this PR introduce a user-facing change?

Pass additional flags to subpath mount to avoid flakes in certain conditions

/cc @msau42 @jingxu97

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 9, 2021
@mauriciopoppe
Copy link
Member Author

/sig storage

@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 9, 2021
return mountArgs
}

// MakeMountArgsSensitive makes the arguments to the mount(8) command.
// sensitiveOptions is an extension of options except they will not be logged (because they may contain sensitive material)
func MakeMountArgsSensitive(source, target, fstype string, options []string, sensitiveOptions []string) (mountArgs []string, mountArgsLogStr string) {
func MakeMountArgsSensitive(source, target, fstype string, options []string, sensitiveOptions []string, mountFlags []string) (mountArgs []string, mountArgsLogStr string) {
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice to not have to change the function signature here too. Can we create a new interface with the new args?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added func MakeMountArgsSensitiveWithMountFlags(source, target, fstype string, options []string, sensitiveOptions []string, mountFlags []string)

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 10, 2021
@mauriciopoppe
Copy link
Member Author

/test pull-kubernetes-integration

@msau42
Copy link
Member

msau42 commented Aug 10, 2021

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 10, 2021
klog.V(5).Infof("bind mounting %q at %q", mountSource, bindPathTarget)
if err = mounter.MountSensitiveWithoutSystemd(mountSource, bindPathTarget, "" /*fstype*/, options, nil); err != nil {
if err = mounter.MountSensitiveWithoutSystemdWithMountFlags(mountSource, bindPathTarget, "" /*fstype*/, options, nil /* sensitiveOptions */, mountFlags); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to set fstype here?

Copy link
Contributor

Choose a reason for hiding this comment

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

how about unmount, does it need to add flag?

Copy link
Member

Choose a reason for hiding this comment

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

when bind mounting, fstype is not needed

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 11, 2021
@jsafrane
Copy link
Member

If you intend to backport this PR, please file release-note section in the first comment of this PR.

@jsafrane
Copy link
Member

/lgtm
/approve
/retest

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 11, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jsafrane, mauriciopoppe, msau42

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Aug 11, 2021
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Aug 11, 2021

@mauriciopoppe: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Rerun command
pull-kubernetes-e2e-gce-storage-slow 08bec6d link /test pull-kubernetes-e2e-gce-storage-slow

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@cpanato
Copy link
Member

cpanato commented Aug 16, 2021

/triage accepted
/priority important-soon

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 16, 2021
k8s-ci-robot added a commit that referenced this pull request Aug 16, 2021
…f-#104253-upstream-release-1.20

Automated cherry pick of #104253: Pass additional flags to subpath mount to avoid flakes in
k8s-ci-robot added a commit that referenced this pull request Aug 16, 2021
…f-#104253-upstream-release-1.21

Automated cherry pick of #104253: Pass additional flags to subpath mount to avoid flakes in
k8s-ci-robot added a commit that referenced this pull request Aug 16, 2021
…f-#104253-upstream-release-1.22

Automated cherry pick of #104253: Pass additional flags to subpath mount to avoid flakes in
haofan-ms pushed a commit to msazurestackworkloads/kubernetes that referenced this pull request Aug 25, 2021
…rry-pick-of-#104253-upstream-release-1.20

Automated cherry pick of kubernetes#104253: Pass additional flags to subpath mount to avoid flakes in
@mauriciopoppe mauriciopoppe deleted the subpath-additional-mount-flag branch October 5, 2021 21:23
Swizzmaster pushed a commit to Swizzmaster/kubernetes that referenced this pull request Feb 29, 2024
…ive options.

This patch is not reqd for 1.22 as Not required as EKS does not support v.1.22
and this change will be in the next patch release upstream 1.22.1
https://github.com/kubernetes/kubernetes/commits/v1.22.1

This patch is not available in 1.22.0 and EKS should not release 1.22.0 until thisp patch
is back-ported.

Pulled from Branch:
https://github.com/kubernetes/kubernetes/commits/release-1.21

Parent PR:

kubernetes#104253

cr: https://code.amazon.com/reviews/CR-55731908
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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. 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. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants