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

kubelet: Fix fs quota monitoring on volumes #115314

Merged
merged 1 commit into from Mar 10, 2023

Conversation

alex-matei
Copy link
Contributor

@alex-matei alex-matei commented Jan 25, 2023

What type of PR is this?

Add one of the following kinds:
/kind bug

What this PR does / why we need it:

File system quota monitoring setup fails on subsequent invocations, each time quota setup is invoked a new random UID is generated for each pod and compared with the previously stored UID.
This PR fixes it by keeping track of mapping between internal uid generated for a pod and actual external pod uid.
If there is already a quota project id associated with the folder it uses that instead of returning an error.
If quota is already set on a folder and the quota is the same it does an early exit.

Which issue(s) this PR fixes:

Fixes #114506, #112081, #115309

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. 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-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 25, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @alex-matei. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Jan 25, 2023
@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 Jan 25, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Jan 25, 2023
@alex-matei alex-matei force-pushed the fix-quota-monitoring branch 3 times, most recently from d66244b to 6bc2b34 Compare January 25, 2023 16:14
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. 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. labels Jan 25, 2023
@pacoxu
Copy link
Member

pacoxu commented Jan 27, 2023

/cc

@pacoxu
Copy link
Member

pacoxu commented Jan 28, 2023

I tried to fix it at #112624.

  • Have you tested your fix?

@alex-matei
Copy link
Contributor Author

Hi @pacoxu, I tested the fix and it works, I modified AssignQuota to be idempotent.

@pacoxu
Copy link
Member

pacoxu commented Jan 30, 2023

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 30, 2023
@pacoxu
Copy link
Member

pacoxu commented Feb 27, 2023

/retest

File system quota monitoring setup fails on subsequent invocations,
each time quota setup is invoked a new random UID is generated for
each pod and compared with the previously stored UID for the folder.
Fix it by keeping track of mapping between internal uid generated
for a pod and actual external pod uid.

Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 27, 2023
@alex-matei
Copy link
Contributor Author

alex-matei commented Feb 27, 2023

Rebased on top of master to see if it fixes the failing tests.

Edit: I looked at the job history and it doesn't seem related, those tests failed continuously since December.

@jsafrane
Copy link
Member

jsafrane commented Mar 7, 2023

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alex-matei, jsafrane

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 Mar 7, 2023
@pacoxu
Copy link
Member

pacoxu commented Mar 10, 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 Mar 10, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 0fe1ca01e09ff7fa3475a1c3c70221cae3bff01c

@pacoxu
Copy link
Member

pacoxu commented Mar 10, 2023

/retest-required
/skip

@k8s-ci-robot
Copy link
Contributor

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

Test name Commit Details Required Rerun command
pull-kubernetes-node-kubelet-serial-crio-cgroupv1 b011f38559fb727e103474ec957178fbc12e59af link false /test pull-kubernetes-node-kubelet-serial-crio-cgroupv1
pull-kubernetes-node-kubelet-serial-crio-cgroupv2 b011f38559fb727e103474ec957178fbc12e59af link false /test pull-kubernetes-node-kubelet-serial-crio-cgroupv2
pull-kubernetes-unit b225d6c link unknown /test pull-kubernetes-unit
pull-kubernetes-e2e-gce b225d6c link unknown /test pull-kubernetes-e2e-gce

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.

@pacoxu
Copy link
Member

pacoxu commented Mar 10, 2023

/test pull-kubernetes-e2e-gce

@pacoxu
Copy link
Member

pacoxu commented Mar 10, 2023

/test pull-kubernetes-unit

@k8s-ci-robot k8s-ci-robot merged commit ba7f4e2 into kubernetes:master Mar 10, 2023
SIG Node PR Triage automation moved this from Needs Approver to Done Mar 10, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.27 milestone Mar 10, 2023
@pacoxu
Copy link
Member

pacoxu commented Mar 16, 2023

Should this be cherry-picked to v1.26 and v1.25?

@alex-matei
Copy link
Contributor Author

I think it would be useful.

k8s-ci-robot added a commit that referenced this pull request Apr 4, 2023
#115314-upstream-release-1.24

Automated cherry pick of #112624: fsquota: only generate pod uuid is nil
#115314: kubelet: Fix fs quota monitoring on volumes
k8s-ci-robot added a commit that referenced this pull request Apr 4, 2023
#115314-upstream-release-1.26

Automated cherry pick of #112624: fsquota: only generate pod uuid is nil
#115314: kubelet: Fix fs quota monitoring on volumes
k8s-ci-robot added a commit that referenced this pull request Apr 4, 2023
#115314-upstream-release-1.25

Automated cherry pick of #112624: fsquota: only generate pod uuid is nil
#115314: kubelet: Fix fs quota monitoring on volumes
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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. size/M Denotes a PR that changes 30-99 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.

failed attempt to reassign project ID
6 participants