Skip to content

OCPBUGS-55365: Regardless of Pool configuration wait on other sub-controllers to Render #5022

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions pkg/controller/kubelet-config/kubelet_config_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,14 +601,6 @@ func (ctrl *Controller) syncKubeletConfig(key string) error {
}

for _, pool := range mcpPools {
if pool.Spec.Configuration.Name == "" {
updateDelay := 5 * time.Second
// Previously we spammed the logs about empty pools.
// Let's just pause for a bit here to let the renderer
// initialize them.
time.Sleep(updateDelay)
return fmt.Errorf("Pool %s is unconfigured, pausing %v for renderer to initialize", pool.Name, updateDelay)
}
role := pool.Name
// Get MachineConfig
managedKey, err := getManagedKubeletConfigKey(pool, ctrl.client, cfg)
Expand Down
7 changes: 2 additions & 5 deletions pkg/controller/render/render_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,8 @@ func (ctrl *Controller) syncMachineConfigPool(key string) error {
return err
}

// If the Pool is unconfigured, let it generate the renderedMC before waiting. This prevents a deadlock between render controller and kubelet config controller.
if pool.Spec.Configuration.Name != "" {
if err := apihelpers.AreMCGeneratingSubControllersCompletedForPool(ctrl.crcLister.List, ctrl.mckLister.List, pool.Labels); err != nil {
return err
}
if err := apihelpers.AreMCGeneratingSubControllersCompletedForPool(ctrl.crcLister.List, ctrl.mckLister.List, pool.Labels); err != nil {
return err
}

mcs, err := ctrl.mcLister.List(selector)
Expand Down