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 #104340

Conversation

mauriciopoppe
Copy link
Member

@mauriciopoppe mauriciopoppe commented Aug 12, 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, supersedes #104254, the new strategy is to create another mount implementation only for subpath usage.

  • Copy the git history of mount_linux.go, mount_windows.go, mount.go to the subpath directory
  • Create a new MountInterface in subpath that includes the k8s.io/utils/mount interface, in addition it declares a new method MountSensitiveWithMountFlags that will be used only for subpath mount purposes
  • Make the subpath interface use the new MountInterface instead of k8s.io/utils/mount
  • When an instance of subpather is created instead of using the k8s.io/util/mount instance we use an instance of the new MountInterface
  • Finally use MountSensitiveWithMountFlags in subpath_linux.go:doBindSubpath()

Also I created a GCE cluster and verified it in the kubelet logs

Does this PR introduce a user-facing change?

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

/cc @msau42 @jingxu97 @jsafrane

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. labels Aug 12, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Aug 12, 2021
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. labels Aug 12, 2021
@mauriciopoppe mauriciopoppe force-pushed the subpath-additional-mount-flag-new-mounter-119 branch 2 times, most recently from 7faa5dc to eac4824 Compare August 12, 2021 18:37
@mauriciopoppe
Copy link
Member Author

/retest

@mauriciopoppe mauriciopoppe changed the title [WIP] Pass additional flags to subpath mount to avoid flakes in certain conditions Pass additional flags to subpath mount to avoid flakes in certain conditions Aug 12, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 12, 2021
@ehashman ehashman added this to Triage in SIG Node PR Triage Aug 12, 2021
@mauriciopoppe mauriciopoppe changed the title Pass additional flags to subpath mount to avoid flakes in certain conditions [WIP] Pass additional flags to subpath mount to avoid flakes in certain conditions Aug 13, 2021
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 13, 2021
@@ -0,0 +1,278 @@
// +build linux
Copy link
Member

Choose a reason for hiding this comment

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

We synced offline and potentially found a way to extend the mount interface without needing to copy the original implementations.

- The kubelet startup code will create a new Mounter instance
  that wraps the existing k8s.io/utils/mount instance
- Provided implementations for all the platforms
- Also adding an implementation for all the platforms
…lume/util/subpath/subpath_fake_mounter.go history.
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 16, 2021
@mauriciopoppe
Copy link
Member Author

hey @Random-Liu, I'd really appreciate a review on this PR, in summary the kubelet subpather is receiving a new mounter that wraps k8s.io/utils/mount

@mauriciopoppe
Copy link
Member Author

/cc @Random-Liu

@yujuhong
Copy link
Contributor

/approve

for the cmd/kubelet change.

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 16, 2021
@mauriciopoppe
Copy link
Member Author

hey @kubernetes/release-managers, could you please review this PR? thanks in advance!

@mauriciopoppe
Copy link
Member Author

hey @cpanato, I saw that you helped approving #104253, this PR is similar but for 1.19, do you mind taking a look please? thanks

@jsturtevant
Copy link
Contributor

/sig windows

@k8s-ci-robot k8s-ci-robot added the sig/windows Categorizes an issue or PR as relevant to SIG Windows. label Aug 21, 2021
@cpanato
Copy link
Member

cpanato commented Aug 21, 2021

looks like this was not cherry-picked using the process

@cpanato
Copy link
Member

cpanato commented Aug 21, 2021

/triage accepted

from parent PR:
/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 21, 2021
Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

from RelEng:
/lgtm

@cpanato cpanato added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Aug 21, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. label Aug 21, 2021
@cpanato cpanato moved this from Triage to Done in SIG Node PR Triage Aug 21, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 merged commit 3e061de into kubernetes:release-1.19 Aug 21, 2021
haofan-ms pushed a commit to msazurestackworkloads/kubernetes that referenced this pull request Aug 25, 2021
…ional-mount-flag-new-mounter-119

Pass additional flags to subpath mount to avoid flakes in certain conditions
haofan-ms added a commit to msazurestackworkloads/kubernetes that referenced this pull request Aug 26, 2021
Merge pull request kubernetes#104340 from mauriciopoppe/subpath-additional-moun…
@mauriciopoppe mauriciopoppe deleted the subpath-additional-mount-flag-new-mounter-119 branch October 5, 2021 21:23
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. area/kubelet cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. 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/node Categorizes an issue or PR as relevant to SIG Node. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/windows Categorizes an issue or PR as relevant to SIG Windows. 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
Development

Successfully merging this pull request may close these issues.

None yet

8 participants