cluster(lb): fix load balancer stuck degraded during bootstrap#48
Open
mweibel wants to merge 1 commit into
Open
cluster(lb): fix load balancer stuck degraded during bootstrap#48mweibel wants to merge 1 commit into
mweibel wants to merge 1 commit into
Conversation
During initial cluster bootstrap the load balancer could get stuck in `degraded` or `error` and never recover on its own. Two things combined to cause this: - The health monitor was created before any control-plane node existed. With a monitor but no healthy members, the LB reports `degraded`/`error`. - The reconciler never requeued a non-running LB, so it never observed the LB recovering once the control-plane nodes came up. This was especially the case if it took a bit of time until control plane nodes were available. Changes: 1. Requeue every 10s while the LB is pending (`degraded`/`error`) 2. Defer creating the health monitor until the control plane is initialized (at least one control-plane node up). 3. Move health monitor reconciliation to the end of `reconcileNormal`, after the load balancer and floating IP, since it depends on both being set. Also fixes the `cloudscaleMachineToCluster` watch mapping, which filtered on the wrong label (`MachineControlPlaneNameLabel` instead of `MachineControlPlaneLabel`) and so never enqueued on control-plane machine changes.
a737632 to
944c5e1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
During initial cluster bootstrap the load balancer could get stuck in
degradedorerrorand never recover on its own. Two things combined to cause this:degraded/error.Changes:
degraded/error)reconcileNormal, after the load balancer and floating IP, since it depends on both being set.Also fixes the
cloudscaleMachineToClusterwatch mapping, which filtered on the wrong label (MachineControlPlaneNameLabelinstead ofMachineControlPlaneLabel) and so never enqueued on control-plane machine changes.