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

The controller shouldn't requeue not found pods #128

Closed
haouc opened this issue Sep 21, 2022 · 0 comments
Closed

The controller shouldn't requeue not found pods #128

haouc opened this issue Sep 21, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@haouc
Copy link
Contributor

haouc commented Sep 21, 2022

What would you like to be enhanced:
The controller shouldn't requeue pods which are not found. Not found will remain as not-found till cache updates and requeue them.
The similar improvement in controller runtime can be referenced at kubernetes-sigs/controller-runtime#377

{"level":"error","timestamp":"2022-09-13T18:23:20.282Z","logger":"vpc.amazonaws.com/pod-eni-worker","msg":"re-queuing job","job":{"Operation":"Create","UID":"","PodName":"hello-world-7c4b75bf8c-tzzp8","PodNamespace":"default","RequestCount":1,"NodeName":""},"retry count":1,"error":"failed to find pod default/hello-world-7c4b75bf8c-tzzp8","stacktrace":"github.com/aws/amazon-vpc-resource-controller-k8s/pkg/worker.(*worker).processNextItem\n\t/workspace/pkg/worker/worker.go:154\ngit.luolix.top/aws/amazon-vpc-resource-controller-k8s/pkg/worker.(*worker).runWorker\n\t/workspace/pkg/worker/worker.go:132"}
{"level":"error","timestamp":"2022-09-13T18:24:19.143Z","logger":"vpc.amazonaws.com/pod-eni-worker","msg":"re-queuing job","job":{"Operation":"Create","UID":"","PodName":"hello-world-7c4b75bf8c-tzzp8","PodNamespace":"default","RequestCount":1,"NodeName":""},"retry count":3,"error":"failed to find pod default/hello-world-7c4b75bf8c-tzzp8","stacktrace":"github.com/aws/amazon-vpc-resource-controller-k8s/pkg/worker.(*worker).processNextItem\n\t/workspace/pkg/worker/worker.go:154\ngit.luolix.top/aws/amazon-vpc-resource-controller-k8s/pkg/worker.(*worker).runWorker\n\t/workspace/pkg/worker/worker.go:132"}
{"level":"error","timestamp":"2022-09-13T18:25:09.442Z","logger":"vpc.amazonaws.com/pod-eni-worker","msg":"re-queuing job","job":{"Operation":"Create","UID":"","PodName":"hello-world-7c4b75bf8c-tzzp8","PodNamespace":"default","RequestCount":1,"NodeName":""},"retry count":4,"error":"failed to find pod default/hello-world-7c4b75bf8c-tzzp8","stacktrace":"github.com/aws/amazon-vpc-resource-controller-k8s/pkg/worker.(*worker).processNextItem\n\t/workspace/pkg/worker/worker.go:154\ngit.luolix.top/aws/amazon-vpc-resource-controller-k8s/pkg/worker.(*worker).runWorker\n\t/workspace/pkg/worker/worker.go:132"}
{"level":"error","timestamp":"2022-09-13T18:25:59.743Z","logger":"vpc.amazonaws.com/pod-eni-worker","msg":"exceeded maximum retries","job":{"Operation":"Create","UID":"","PodName":"hello-world-7c4b75bf8c-tzzp8","PodNamespace":"default","RequestCount":1,"NodeName":""},"max retries":5,"error":"failed to find pod default/hello-world-7c4b75bf8c-tzzp8","stacktrace":"github.com/aws/amazon-vpc-resource-controller-k8s/pkg/worker.(*worker).processNextItem\n\t/workspace/pkg/worker/worker.go:149\ngit.luolix.top/aws/amazon-vpc-resource-controller-k8s/pkg/worker.(*worker).runWorker\n\t/workspace/pkg/worker/worker.go:132"}

Why is the change needed and what use case will it solve:
This behavior will add deleted pods into queue till reaching the max retry. In large and high churning rate cluster, this can worsen queue performance unnecessarily.

@haouc haouc added the enhancement New feature or request label Sep 21, 2022
@haouc haouc closed this as completed Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant