Change:
When sizeLimit is specified subsequent invocations will fail with the message: No error should be raised. Create a pod with emptyDir and sizeLimit with FSQuotaMonitoring enabled, MountVolume.SetUp is called again only if the first iteration takes longer then the actual reconciler loop interval (100ms). No response <detailsversion.Info{Major:"1", Minor:"27+", GitVersion:"v1.27.0-beta.0.87+", GitCommit:"", GitTreeState:"clean", BuildDate:"2023-04-10T09:05:56Z", GoVersion:"go1.20.2", Compiler:"gc", Platform:"linux/amd64"} </details<detailsSelf-managed cluster in Azure </details<detailsNAME="Red Hat Enterprise Linux" VERSION="9.1 (Plow)" ID="rhel" IDLIKE="fedora" VERSIONID="9.1" Linux test-master-0 6.3.0-rc3 SMP PREEMPTDYNAMIC Thu Apr 6 20:44:15 UTC 2023 x8664 x8664 x8664 GNU/Linux </details<detailsContainerd 1.6.15 </details<detailsCNI: CANAL 3.24.1 </details
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig node
May you please share more information? Which version of Kubernetes you are using? OS version etc.
The problem occurs with the latest master branch, I updated the initial post with versions.
Thank you.

Discussion:
} // When enforcing quotas are enabled, we'll condition this // on their being disabled also. <del> if ibytes > 0 { ibytes = -1 </del> <ins> fsbytes := ibytes if fsbytes > 0 { fsbytes = -1 </ins> } <del> if err = setQuotaOnDir(path, id, ibytes); err == nil { </del> <ins> if err = setQuotaOnDir(path, id, fsbytes); err == nil { </ins> quotaPodMap[id] = internalPodUid quotaSizeMap[id] = ibytes podQuotaMap[internalPodUid] = id

dirPodMap[path] = internalPodUid podUidMap[internalPodUid] = externalPodUid podDirCountMap[internalPodUid]++ <del> klog.V(4).Infof("Assigning quota ID %d (%d) to %s", id, ibytes, path) </del> <ins> klog.V(4).Infof("Assigning quota ID %d (request limit %d, actual limit %d) to %s", id, ibytes, fsbytes, path) </ins> return nil } removeProjectID(path, id)

} type quotaTestCase struct { <ins> name                             string </ins> path                             string poduid                           types.UID bytes                            int64

var quotaTestCases = []quotaTestCase{ { <ins> "SupportsQuotaOnQuotaVolume", </ins> "/quota1/a", "", 1024, "Supports", "", "", true, true, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, }, { <ins> "AssignQuotaFirstTime", </ins> "/quota1/a", "", 1024, "Set", projects1, projid1, true, true, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, }, { <ins> "AssignQuotaFirstTime", </ins> "/quota1/b", "x", 1024, "Set", projects2, projid2, true, true, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, }, { <ins> "AssignQuotaFirstTime", </ins> "/quota2/b", "x", 1024, "Set", projects3, projid3, true, true, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }, { <ins> "AssignQuotaSecondTimeWithSameSize", </ins> "/quota1/b", "x", 1024, "Set", projects3, projid3, <ins> true, true, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, { "AssignQuotaSecondTimeWithDifferentSize", "/quota2/b", "x", 2048, "Set", projects3, projid3, </ins> true, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, { <ins> "ClearQuotaFirstTime", </ins> "/quota1/b", "", 1024, "Clear", projects4, projid4, true, true, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, }, { <ins> "SupportsQuotaOnNonQuotaVolume", </ins> "/noquota/a", "", 1024, "Supports", projects4, projid4, false, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, { <ins> "ClearQuotaFirstTime", </ins> "/quota1/a", "", 1024, "Clear", projects5, projid5, true, true, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, }, { <ins> "ClearQuotaSecondTime", </ins> "/quota1/a", "", 1024, "Clear", projects5, projid5, true, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, { <ins> "ClearQuotaFirstTime", </ins> "/quota2/b", "", 1024, "Clear", "", "", true, true, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, },

supports, err := fakeSupportsQuotas(testcase.path) if err != nil { fail = true <del> t.Errorf("Case %v (%s, %v) Got error in fakeSupportsQuotas: %v", seq, testcase.path, true, err) </del> <ins> t.Errorf("Case %v (%s, %s, %v) Got error in fakeSupportsQuotas: %v", seq, testcase.name, testcase.path, true, err) </ins> } if supports != testcase.supportsQuota { fail = true <del> t.Errorf("Case %v (%s, %v) fakeSupportsQuotas got %v, expect %v", seq, testcase.path, true, supports, testcase.supportsQuota) </del> <ins> t.Errorf("Case %v (%s, %s, %v) fakeSupportsQuotas got %v, expect %v", seq, testcase.name, testcase.path, true, supports, testcase.supportsQuota) </ins> } return fail case "Set":

case "GetInodes": _, err = GetInodes(testcase.path) default: <del> t.Errorf("Case %v (%s, %v) unknown operation %s", seq, testcase.path, true, testcase.op) </del> <ins> t.Errorf("Case %v (%s, %s, %v) unknown operation %s", seq, testcase.name, testcase.path, true, testcase.op) </ins> return true } if err != nil && testcase.expectsSetQuota { fail = true <del> t.Errorf("Case %v (%s, %v) %s expected to clear quota but failed %v", seq, testcase.path, true, testcase.op, err) </del> <ins> t.Errorf("Case %v (%s, %s, %v) %s expected to clear quota but failed %v", seq, testcase.name, testcase.path, true, testcase.op, err) </ins> } else if err == nil && !testcase.expectsSetQuota { fail = true <del> t.Errorf("Case %v (%s, %v) %s expected not to clear quota but succeeded", seq, testcase.path, true, testcase.op) </del> <ins> t.Errorf("Case %v (%s, %s, %v) %s expected not to clear quota but succeeded", seq, testcase.name, testcase.path, true, testcase.op) </ins> } return fail }

switch testcase.op { case "Supports": if supports, _ = fakeSupportsQuotas(testcase.path); supports { <del> t.Errorf("Case %v (%s, %v) supports quotas but shouldn't", seq, testcase.path, false) </del> <ins> t.Errorf("Case %v (%s, %s, %v) supports quotas but shouldn't", seq, testcase.name, testcase.path, false) </ins> return true } return false

case "GetInodes": _, err = GetInodes(testcase.path) default: <del> t.Errorf("Case %v (%s, %v) unknown operation %s", seq, testcase.path, false, testcase.op) </del> <ins> t.Errorf("Case %v (%s, %s, %v) unknown operation %s", seq, testcase.name, testcase.path, false, testcase.op) </ins> return true } if err == nil { <del> t.Errorf("Case %v (%s, %v) %s: supports quotas but shouldn't", seq, testcase.path, false, testcase.op) </del> <ins> t.Errorf("Case %v (%s, %s, %v) %s: supports quotas but shouldn't", seq, testcase.name, testcase.path, false, testcase.op) </ins> return true } return false

compareProjectsFiles(t, testcase, projectsFile, projidFile, enabled) if len(podQuotaMap) != expectedPodQuotaCount { fail = true <del> t.Errorf("Case %v (%s, %v) podQuotaCount mismatch: got %v, expect %v", seq, testcase.path, enabled, len(podQuotaMap), expectedPodQuotaCount) </del> <ins> t.Errorf("Case %v (%s, %s, %v) podQuotaCount mismatch: got %v, expect %v", seq, testcase.name, testcase.path, enabled, len(podQuotaMap), expectedPodQuotaCount) </ins> } if len(dirQuotaMap) != expectedDirQuotaCount { fail = true <del> t.Errorf("Case %v (%s, %v) dirQuotaCount mismatch: got %v, expect %v", seq, testcase.path, enabled, len(dirQuotaMap), expectedDirQuotaCount) </del> <ins> t.Errorf("Case %v (%s, %s, %v) dirQuotaCount mismatch: got %v, expect %v", seq, testcase.name, testcase.path, enabled, len(dirQuotaMap), expectedDirQuotaCount) </ins> } if len(quotaPodMap) != expectedQuotaPodCount { fail = true <del> t.Errorf("Case %v (%s, %v) quotaPodCount mismatch: got %v, expect %v", seq, testcase.path, enabled, len(quotaPodMap), expectedQuotaPodCount) </del> <ins> t.Errorf("Case %v (%s, %s, %v) quotaPodCount mismatch: got %v, expect %v", seq, testcase.name, testcase.path, enabled, len(quotaPodMap), expectedQuotaPodCount) </ins> } if len(dirPodMap) != expectedDirPodCount { fail = true <del> t.Errorf("Case %v (%s, %v) dirPodCount mismatch: got %v, expect %v", seq, testcase.path, enabled, len(dirPodMap), expectedDirPodCount) </del> <ins> t.Errorf("Case %v (%s, %s, %v) dirPodCount mismatch: got %v, expect %v", seq, testcase.name, testcase.path, enabled, len(dirPodMap), expectedDirPodCount) </ins> } if len(devApplierMap) != expectedDevApplierCount { fail = true <del> t.Errorf("Case %v (%s, %v) devApplierCount mismatch: got %v, expect %v", seq, testcase.path, enabled, len(devApplierMap), expectedDevApplierCount) </del> <ins> t.Errorf("Case %v (%s, %s, %v) devApplierCount mismatch: got %v, expect %v", seq, testcase.name, testcase.path, enabled, len(devApplierMap), expectedDevApplierCount) </ins> } if len(dirApplierMap) != expectedDirApplierCount { fail = true <del> t.Errorf("Case %v (%s, %v) dirApplierCount mismatch: got %v, expect %v", seq, testcase.path, enabled, len(dirApplierMap), expectedDirApplierCount) </del> <ins> t.Errorf("Case %v (%s, %s, %v) dirApplierCount mismatch: got %v, expect %v", seq, testcase.name, testcase.path, enabled, len(dirApplierMap), expectedDirApplierCount) </ins> } if len(podDirCountMap) != expectedPodDirCountCount { fail = true <del> t.Errorf("Case %v (%s, %v) podDirCountCount mismatch: got %v, expect %v", seq, testcase.path, enabled, len(podDirCountMap), expectedPodDirCountCount) </del> <ins> t.Errorf("Case %v (%s, %s, %v) podDirCountCount mismatch: got %v, expect %v", seq, testcase.name, testcase.path, enabled, len(podDirCountMap), expectedPodDirCountCount) </ins> } if len(quotaSizeMap) != expectedQuotaSizeCount { fail = true <del> t.Errorf("Case %v (%s, %v) quotaSizeCount mismatch: got %v, expect %v", seq, testcase.path, enabled, len(quotaSizeMap), expectedQuotaSizeCount) </del> <ins> t.Errorf("Case %v (%s, %s, %v) quotaSizeCount mismatch: got %v, expect %v", seq, testcase.name, testcase.path, enabled, len(quotaSizeMap), expectedQuotaSizeCount) </ins> } if len(supportsQuotasMap) != expectedSupportsQuotasCount { fail = true <del> t.Errorf("Case %v (%s, %v) supportsQuotasCount mismatch: got %v, expect %v", seq, testcase.path, enabled, len(supportsQuotasMap), expectedSupportsQuotasCount) </del> <ins> t.Errorf("Case %v (%s, %s, %v) supportsQuotasCount mismatch: got %v, expect %v", seq, testcase.name, testcase.path, enabled, len(supportsQuotasMap), expectedSupportsQuotasCount) </ins> } if len(backingDevMap) != expectedBackingDevCount { fail = true <del> t.Errorf("Case %v (%s, %v) BackingDevCount mismatch: got %v, expect %v", seq, testcase.path, enabled, len(backingDevMap), expectedBackingDevCount) </del> <ins> t.Errorf("Case %v (%s, %s, %v) BackingDevCount mismatch: got %v, expect %v", seq, testcase.name, testcase.path, enabled, len(backingDevMap), expectedBackingDevCount) </ins> } if len(mountpointMap) != expectedMountpointCount { fail = true <del> t.Errorf("Case %v (%s, %v) MountpointCount mismatch: got %v, expect %v", seq, testcase.path, enabled, len(mountpointMap), expectedMountpointCount) </del> <ins> t.Errorf("Case %v (%s, %s, %v) MountpointCount mismatch: got %v, expect %v", seq, testcase.name, testcase.path, enabled, len(mountpointMap), expectedMountpointCount) </ins> } if fail { <del> logAllMaps(fmt.Sprintf("%v %s", seq, testcase.path)) </del> <ins> logAllMaps(fmt.Sprintf("%v %s %s", seq, testcase.name, testcase.path)) </ins> } } os.Remove(projectsFile)