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
Pass additional flags to subpath mount to avoid flakes in certain conditions #104253
Conversation
/sig storage |
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) { |
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.
It would be nice to not have to change the function signature here too. Can we create a new interface with the new args?
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.
Added func MakeMountArgsSensitiveWithMountFlags(source, target, fstype string, options []string, sensitiveOptions []string, mountFlags []string)
de4c09a
to
38d5ccf
Compare
/test pull-kubernetes-integration |
/lgtm |
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 { |
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.
do we want to set fstype here?
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.
how about unmount, does it need to add flag?
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.
when bind mounting, fstype is not needed
38d5ccf
to
08bec6d
Compare
If you intend to backport this PR, please file |
/lgtm |
[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 |
@mauriciopoppe: The following test failed, say
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. |
/triage accepted |
…f-#104253-upstream-release-1.20 Automated cherry pick of #104253: Pass additional flags to subpath mount to avoid flakes in
…f-#104253-upstream-release-1.21 Automated cherry pick of #104253: Pass additional flags to subpath mount to avoid flakes in
…f-#104253-upstream-release-1.22 Automated cherry pick of #104253: Pass additional flags to subpath mount to avoid flakes in
…rry-pick-of-#104253-upstream-release-1.20 Automated cherry pick of kubernetes#104253: Pass additional flags to subpath mount to avoid flakes in
…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
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?
/cc @msau42 @jingxu97