Return preflightError if an error occurs when running the preflight

This commit is contained in:
navist2020 2022-04-18 15:13:45 +08:00
parent a750d8054a
commit 2a7e85bfdb

View File

@ -1063,7 +1063,7 @@ func RunRootCheckOnly(ignorePreflightErrors sets.String) error {
func RunPullImagesCheck(execer utilsexec.Interface, cfg *kubeadmapi.InitConfiguration, ignorePreflightErrors sets.String) error {
containerRuntime, err := utilruntime.NewContainerRuntime(utilsexec.New(), cfg.NodeRegistration.CRISocket)
if err != nil {
return err
return &Error{Msg: err.Error()}
}
checks := []Checker{