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

KEP-3756: Add volume reconstruction KEP #3763

Merged
merged 4 commits into from
Feb 8, 2023

Conversation

jsafrane
Copy link
Member

@jsafrane jsafrane commented Jan 20, 2023

Note to reviewers: We're going directly to beta, because we had alpha phase in #1710 and we realized that VolumeManager rework is useful outside of the SELinux feature.

/sig storage

@k8s-ci-robot k8s-ci-robot added sig/storage Categorizes an issue or PR as relevant to SIG Storage. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory labels Jan 20, 2023
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 20, 2023
@jsafrane jsafrane force-pushed the volume-reconstruction branch from 2c1f113 to a594368 Compare January 20, 2023 16:49
@jsafrane
Copy link
Member Author

cc @gnufied @msau42 @jingxu97

@jsafrane jsafrane force-pushed the volume-reconstruction branch from a594368 to b9eb98c Compare January 20, 2023 16:51
@jsafrane
Copy link
Member Author

Provisional PR: kubernetes/kubernetes#115268

@jsafrane jsafrane force-pushed the volume-reconstruction branch from b9eb98c to 1b39aa7 Compare January 24, 2023 16:51
@gnufied
Copy link
Member

gnufied commented Jan 24, 2023

Overall design looks good to me. The mechanism being proposed has already been reviewed while reviewing SELinux KEP and hence should be good to go.

lgtm

We needed to add
[a complex workaround](https://github.com/kubernetes/kubernetes/pull/110670)
to actually unmount a volume if it's initially in DSW, but user deletes all
Pods that need it before the volume reaches ASW.
Copy link
Member

Choose a reason for hiding this comment

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

Since this feature directly goes beta, we will have to test if this new mechanism fixes the bug PR#110670 fixes or at least co-exists without stomping on each others toes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do we have a e2e / integration test for #110670 ?

Copy link
Member

Choose a reason for hiding this comment

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

No I don't think I wrote any e2e for this one. We only have unit tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

We still have the unit test, I think.

@msau42
Copy link
Member

msau42 commented Jan 25, 2023

/assign @sunnylovestiramisu

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 25, 2023
@jsafrane jsafrane force-pushed the volume-reconstruction branch from d0ddbb0 to 3e58181 Compare January 25, 2023 16:49
@jsafrane jsafrane force-pushed the volume-reconstruction branch 3 times, most recently from f37da17 to 21a9280 Compare January 26, 2023 14:00
@jsafrane jsafrane changed the title Add draft of volume reconstruction KEP Add volume reconstruction KEP Jan 26, 2023
@jsafrane
Copy link
Member Author

I filed all mandatory chapters for beta (notice a new "Observability" chapter proposing some metrics), please let me know if I missed anything.

@jsafrane
Copy link
Member Author

And there are some TODO items, ideas would be welcome. (I'm going to dive to unit tests coverage).

@jsafrane
Copy link
Member Author

Lower unit test coverage of the new reconciler explained in the KEP, it will be fine once the new VolumeManager is enabled by default.

And add Ci flake investigation.
@jsafrane
Copy link
Member Author

/assign @deads2k
For PRR review.
We're going directly to beta, because we had alpha phase in #1710 and we realized that VolumeManager rework is useful outside of the SELinux feature and we will probably want to graduate it earlier.

@jsafrane jsafrane force-pushed the volume-reconstruction branch from f8891a1 to ac09b7c Compare January 31, 2023 12:40
@k8s-ci-robot k8s-ci-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 31, 2023
@jsafrane jsafrane changed the title Add volume reconstruction KEP KEP-3756: Add volume reconstruction KEP Jan 31, 2023
Both are for the old reconstruction code, we don't have a job that enables
alpha features + runs `[Disruptive]` tests.

Recent results:
Copy link
Member

Choose a reason for hiding this comment

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

Maybe the details of the test failures would be better tracked in a bug.

@msau42
Copy link
Member

msau42 commented Feb 1, 2023

/approve

@msau42
Copy link
Member

msau42 commented Feb 1, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 1, 2023
Comment on lines +437 to +451
* `orphaned_volumes_cleanup_errors_total`: nr. of reports
like `orphaned pod "<uid>" found, but XYZ failed`
([example](https://github.com/kubernetes/kubernetes/blob/4fac7486d41c033d6bba9dfeda2356e8189035cd/pkg/kubelet/kubelet_volumes.go#L215)).
These messages can be a symptom of failed reconstruction (e.g.
[#105536](https://github.com/kubernetes/kubernetes/issues/105536)).
Note that kubelet logs this periodically and bumping this metric periodically
would not be useful.
[`cleanupOrphanedPodDirs`](https://github.com/kubernetes/kubernetes/blob/4fac7486d41c033d6bba9dfeda2356e8189035cd/pkg/kubelet/kubelet_volumes.go#L168)
needs to be changed to collect errors found during
one `/var/lib/kubelet/pods/` check and report collected "nr of errors during
the last housekeeping sweep (every 2 seconds)".
* TODO: do we want to have a label to distinguish each error reason,
e.g. "Pod found, but volumes are still mounted on disk" from say
"orphaned pod %q found, but error occurred during reading of
volume-subpaths dir from disk"?
Copy link
Member Author

Choose a reason for hiding this comment

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

to expand on the TODO item with an example. cleanupOrphanedPodDirs can fail with:

  • Orphaned pod found, but volumes are not cleaned up
  • orphaned pod %q found, but error occurred during reading the pod dir from disk
  • Orphaned pod found, but failed to remove volumes subdir
  • orphaned pod %q found, but error occurred when trying to remove subdir %q: %v"
  • orphaned pod %q found, but error occurred when trying to remove the pod directory: %v
  • orphaned pod %q found, but failed to rmdir() volume at path %v: %v
  • orphaned pod %q found, but error occurred during reading of volume-subpaths dir from disk: %v
  • orphaned pod %q found, but error occurred when trying to remove the volumes dir: %v

And potentially many more. Do we want to have a label reason with some enumerated values that would allow users to distinguish each error from each other or is it useless?

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 8, 2023
@deads2k
Copy link
Contributor

deads2k commented Feb 8, 2023

thanks for the PRR updates. approving PRR

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, jsafrane, 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 8, 2023
@xing-yang
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 8, 2023
@k8s-ci-robot k8s-ci-robot merged commit 7e70c04 into kubernetes:master Feb 8, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.27 milestone Feb 8, 2023
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/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants