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

🌱 clustercache: do not use RequeueAfter when hitting ErrClusterNotConnected #11736

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chrischdi
Copy link
Member

What this PR does / why we need it:

Follow-up to: #11272

Clustercache emits events once the connection is back, so no need to use RequeueAfter.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

/area clustercache

@k8s-ci-robot k8s-ci-robot added area/clustercache Issues or PRs related to the clustercachetracker cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 22, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from chrischdi. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@chrischdi
Copy link
Member Author

/hold

To do some scale test on-top

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 22, 2025
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 22, 2025
@chrischdi
Copy link
Member Author

chrischdi commented Jan 23, 2025

/hold cancel

Scale tests look good (500 clusters).

No increased provisioning times.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 23, 2025
@chrischdi chrischdi force-pushed the pr-clustercache-no-requeueafter-on-ErrClusterNotConnected branch from 33d78e1 to 5d109d8 Compare January 23, 2025 16:25
@sbueringer
Copy link
Member

/test pull-cluster-api-e2e-main

Comment on lines +806 to +808
log.V(5).Info("Waiting for Cluster connection to come up to drain the Node")
s.deletingReason = clusterv1.MachineDeletingDrainingNodeV1Beta2Reason
s.deletingMessage = "Waiting for Cluster connection to come up to drain the Node"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log.V(5).Info("Waiting for Cluster connection to come up to drain the Node")
s.deletingReason = clusterv1.MachineDeletingDrainingNodeV1Beta2Reason
s.deletingMessage = "Waiting for Cluster connection to come up to drain the Node"
  1. error shows up anyway because we propagate it up
  2. deletingReason / deletingMessage are overwritten one level higher

log.V(5).Info("Waiting for Cluster connection to come up to drain the Node")
s.deletingReason = clusterv1.MachineDeletingDrainingNodeV1Beta2Reason
s.deletingMessage = "Waiting for Cluster connection to come up to drain the Node"
return ctrl.Result{}, err
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return ctrl.Result{}, err
return ctrl.Result{}, errors.Wrapf(err, "failed to drain Node %s", nodeName)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clustercache Issues or PRs related to the clustercachetracker cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants