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

Consider not requeuing for objects that we are also watching #8735

Closed
sbueringer opened this issue May 24, 2023 · 5 comments · Fixed by #8743
Closed

Consider not requeuing for objects that we are also watching #8735

sbueringer opened this issue May 24, 2023 · 5 comments · Fixed by #8743
Assignees
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@sbueringer
Copy link
Member

sbueringer commented May 24, 2023

What would you like to be added (User Story)?

We have a few places where we are requeuing if external objects are not in the right state (i.e. not ready). As we are also watching those objects it's unnecessary to requeue as well.

I think it should be good for performance to avoid unnecessary requeues (less items in the queue, less reconciles). It also makes the logs less noisy.

I'm aware of the following places, but let's please also audit our code in general:

  • Machine controller requeues when BootstrapConfig/Infrastructure is not ready:
    return ctrl.Result{RequeueAfter: externalReadyWait}, nil
    • A bit above in the func we add a watch on BootstrapConfig in reconcileExternal
  • MachinePool controller requeues when BootstrapConfig/Infrastructure is not ready (~ same as above)

Let's start with a first PR to remove the requeue's we're already aware of and then do an audit.

Detailed Description

Anything else you would like to add?

No response

Label(s) to be applied

/kind cleanup
One or more /area label. See https://github.com/kubernetes-sigs/cluster-api/labels?q=area for the list of labels.

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 24, 2023
@sbueringer
Copy link
Member Author

@vincepri @fabriziopandini @CecileRobertMichon Not sure if I'm missing something

(cc @killianmuldoon @ykakarap @Jont828)

@killianmuldoon
Copy link
Contributor

Sounds like a good idea

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 24, 2023
@vincepri
Copy link
Member

The externalReadyWait was introduced before we had the externalTracker capability in the controllers, so this should make sense to me.

@CecileRobertMichon
Copy link
Contributor

+1

@fabriziopandini
Copy link
Member

+1 good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants