From c88aef2d63a6b1dfb44f47eab6acb0475c951c70 Mon Sep 17 00:00:00 2001 From: Rodrigo Campos Date: Tue, 18 Feb 2025 17:10:56 +0100 Subject: [PATCH] Revert "Switch hard error to a WARNING for kernel version check" This reverts commit fd06dcd604102ef3b06b71501e8e12fb51c11fab. The revert is not to make it a hard error again, this revert is needed to revert cleanly the commit that added this as an error in the first place. Signed-off-by: Rodrigo Campos --- pkg/kubelet/kubelet_pods.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/kubelet/kubelet_pods.go b/pkg/kubelet/kubelet_pods.go index 7d24a90b0e7..b44e0576f83 100644 --- a/pkg/kubelet/kubelet_pods.go +++ b/pkg/kubelet/kubelet_pods.go @@ -138,8 +138,9 @@ func (kl *Kubelet) getKubeletMappings() (uint32, uint32, error) { features.UserNamespacesSupport, err) } if kernelVersion != nil && !kernelVersion.AtLeast(version.MustParseGeneric(utilkernel.UserNamespacesSupportKernelVersion)) { - klog.InfoS("WARNING: the kernel version is incompatible with the feature gate, which needs as a minimum kernel version", - "kernelVersion", kernelVersion, "feature", features.UserNamespacesSupport, "minKernelVersion", utilkernel.UserNamespacesSupportKernelVersion) + return 0, 0, fmt.Errorf( + "the kernel version (%s) is incompatible with the %s feature gate, which needs %s as a minimum kernel version", + kernelVersion, features.UserNamespacesSupport, utilkernel.UserNamespacesSupportKernelVersion) } }