Merge pull request #108563 from ipochi/imran/update-e2e-lock-contention-test-to-remove-restart-kubelet

Remove the restart kubelet check from the test.
This commit is contained in:
Kubernetes Prow Robot 2022-03-09 21:49:35 -08:00 committed by GitHub
commit 9e5efebb4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,21 +67,9 @@ var _ = SIGDescribe("Lock contention [Slow] [Disruptive] [NodeSpecialFeature:Loc
ginkgo.By("verifying the kubelet is not healthy as there was a lock contention.")
// Once the lock is acquired, check if the kubelet is in healthy state or not.
// It should not be.
// It should not be as the lock contention forces the kubelet to stop.
gomega.Eventually(func() bool {
return kubeletHealthCheck(kubeletHealthCheckURL)
}, 10*time.Second, time.Second).Should(gomega.BeFalse())
ginkgo.By("releasing the lock on lock file i.e /var/run/kubelet.lock, triggering kubelet restart.")
// Release the lock.
err = unix.Flock(fd, unix.LOCK_UN)
framework.ExpectNoError(err)
// Releasing the lock triggers kubelet to re-acquire the lock and restart.
ginkgo.By("verifying the kubelet is healthy after restart.")
// Kubelet should report healthy state.
gomega.Eventually(func() bool {
return kubeletHealthCheck(kubeletHealthCheckURL)
}, 10*time.Second, time.Second).Should(gomega.BeTrue())
})
})