From 9b26b13eae8c226791be3b26bf1d998b360f509b Mon Sep 17 00:00:00 2001 From: Yu Qi Zhang Date: Thu, 19 Feb 2026 17:18:40 -0500 Subject: [PATCH] Remove cleanUpDuplicatedMC call in node.config handling This function was originally intended to remove duplicate MCs that somehow was no longer tracked by the controller. I don't think it should be used in general, and this removal here was causing the controller to be confused and deleting valid 97-POOL-generated-kubeletconfig machineconfig objects, since the new controller hasn't yet had a chance to sync and stamp its controller version, causing multiple reboots. Looks like we did this change in https://github.com/openshift/machine-config-operator/pull/3563#issue-1589711695, and the behaviour seems to have changed since then, so I would expect this to be a safe change as the cgroups config is always being generated now. I would lean towards removing cleanUpDuplicatedMC entirely, but based on the comment, it looks like it is catching some unmanaged MC scenarios (e.g. deletion of a custom MCP), so will not do that for a backporting fix until we can sort that out. Note that 97-generated only applies for master/worker/arbiter pools, so I think that shouldn't be a problem. --- pkg/controller/kubelet-config/kubelet_config_nodes.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/controller/kubelet-config/kubelet_config_nodes.go b/pkg/controller/kubelet-config/kubelet_config_nodes.go index 4e4ccc37d8..fda57acd6a 100644 --- a/pkg/controller/kubelet-config/kubelet_config_nodes.go +++ b/pkg/controller/kubelet-config/kubelet_config_nodes.go @@ -72,9 +72,6 @@ func (ctrl *Controller) syncNodeConfigHandler(key string) error { err := fmt.Errorf("could not fetch Node: %w", err) return err } - if err := ctrl.cleanUpDuplicatedMC(managedNodeConfigKeyPrefix); err != nil { - return err - } // Fetch the controllerconfig cc, err := ctrl.ccLister.Get(ctrlcommon.ControllerConfigName)