Skip to content

Automated cherry pick of #102576: kubelet: do not call RemoveAll on volumes directory for#103828

Merged
k8s-ci-robot merged 2 commits into
kubernetes:release-1.20from
dobsonj:automated-cherry-pick-of-#102576-upstream-release-1.20
Aug 6, 2021
Merged

Automated cherry pick of #102576: kubelet: do not call RemoveAll on volumes directory for#103828
k8s-ci-robot merged 2 commits into
kubernetes:release-1.20from
dobsonj:automated-cherry-pick-of-#102576-upstream-release-1.20

Conversation

@dobsonj

@dobsonj dobsonj commented Jul 21, 2021

Copy link
Copy Markdown
Member

Cherry pick of #102576 on release-1.20.

#102576: kubelet: do not call RemoveAll on volumes directory for

For details on the cherry pick process, see the cherry pick requests page.

@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Jul 21, 2021
@k8s-ci-robot k8s-ci-robot added do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. 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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/kubelet labels Jul 21, 2021
@k8s-ci-robot k8s-ci-robot added area/test 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/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 21, 2021
@dobsonj

dobsonj commented Jul 22, 2021

Copy link
Copy Markdown
Member Author

I think the test failures are due to the --check-volume-lifecycle option in csi.go. This argument was added in hostpath 1.7.0, but k8s 1.21, 1.20, and 1.19 are using hostpath 1.4.0 where that argument is not supported.

@dobsonj dobsonj force-pushed the automated-cherry-pick-of-#102576-upstream-release-1.20 branch from 424a61e to 7947682 Compare July 22, 2021 17:47
@dobsonj

dobsonj commented Jul 22, 2021

Copy link
Copy Markdown
Member Author

/kind bug
/triage accepted
/priority important-soon
/release-note-none

@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. 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 do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/needs-kind Indicates a PR lacks a `kind/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 Jul 22, 2021
@dobsonj

dobsonj commented Jul 22, 2021

Copy link
Copy Markdown
Member Author

This PR backports the fix for issue #101911, which prevents data loss under the pod volumes directory if/when we hit certain race conditions during orphaned pod cleanup.

The changes in test/e2e/storage/drivers/csi.go from the original PR are not included because the --check-volume-lifecycle argument was introduced in hostpath 1.7.0, and k8s 1.20 is using hostpath 1.4.0 where that argument is not supported.

pkg/kubelet/kubelet_volumes.go required manual merging to account for logging differences. k8s 1.21+ uses structured logging (i.e. klog.ErrorS) while older releases use unstructured logging (i.e. klog.Errorf).

/cc @gnufied @msau42

@k8s-ci-robot k8s-ci-robot requested review from gnufied and msau42 July 22, 2021 22:53
@msau42

msau42 commented Jul 23, 2021

Copy link
Copy Markdown
Member

/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 Jul 23, 2021
@dobsonj

dobsonj commented Jul 23, 2021

Copy link
Copy Markdown
Member Author

/assign @thockin

@thockin

thockin commented Jul 26, 2021

Copy link
Copy Markdown
Member

Thanks!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 26, 2021

@cpanato cpanato left a comment

Copy link
Copy Markdown
Member

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 6, 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 6, 2021
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cpanato, dobsonj, msau42, thockin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@cpanato

cpanato commented Aug 6, 2021

Copy link
Copy Markdown
Member

/test pull-kubernetes-integration

@k8s-ci-robot k8s-ci-robot merged commit 1faeb9d into kubernetes:release-1.20 Aug 6, 2021
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 area/test 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-none Denotes a PR that doesn't merit a release note. 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/testing Categorizes an issue or PR as relevant to SIG Testing. 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

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants