Unverified Commit 6a33d1ba authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #66938 from sjenning/avoid-mount-delay

Automatic merge from submit-queue (batch tested with PRs 62901, 66562, 66938, 66927, 66926). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. kubelet: volumemanager: poll immediate when waiting for volume attachment Currently, `WaitForAttachAndMount()` introduces a 300ms minimum delay by using `wait.Poll()` rather than `wait.PollImmediate()`. This wait constitutes >99% of the total processing time for `syncPod()`. Changing this reduced `syncPod()` processing time for a simple busybox pod with one emptyDir volume from 302ms to 2ms. @derekwaynecarr @pmorie @smarterclayton @jsafrane /sig node /release-note-none
parents c7362af7 0413850d
...@@ -352,7 +352,7 @@ func (vm *volumeManager) WaitForAttachAndMount(pod *v1.Pod) error { ...@@ -352,7 +352,7 @@ func (vm *volumeManager) WaitForAttachAndMount(pod *v1.Pod) error {
// like Downward API, depend on this to update the contents of the volume). // like Downward API, depend on this to update the contents of the volume).
vm.desiredStateOfWorldPopulator.ReprocessPod(uniquePodName) vm.desiredStateOfWorldPopulator.ReprocessPod(uniquePodName)
err := wait.Poll( err := wait.PollImmediate(
podAttachAndMountRetryInterval, podAttachAndMountRetryInterval,
podAttachAndMountTimeout, podAttachAndMountTimeout,
vm.verifyVolumesMountedFunc(uniquePodName, expectedVolumes)) vm.verifyVolumesMountedFunc(uniquePodName, expectedVolumes))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment