From 3eb8ef67a706632c6cc8c4b17686571d4e9dcfd0 Mon Sep 17 00:00:00 2001 From: Tongyao Si Date: Thu, 16 Feb 2023 15:52:42 +0000 Subject: [PATCH] check new runtime error --- pkg/addons/addons.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/addons/addons.go b/pkg/addons/addons.go index 42c96cbccb..c8d054613d 100644 --- a/pkg/addons/addons.go +++ b/pkg/addons/addons.go @@ -284,6 +284,9 @@ func EnableOrDisableAddon(cc *config.ClusterConfig, name string, val string) err crName := cc.KubernetesConfig.ContainerRuntime cr, err := cruntime.New(cruntime.Config{Type: crName, Runner: runner}) + if err != nil { + return errors.Wrap(err, "container runtime") + } runtimePaused, err := cluster.CheckIfPaused(cr, []string{"kube-system"}) if err != nil { return errors.Wrap(err, "check paused")