fix the bug that kubeadm tries to call 'docker info' even if the CRI socket was for another CR

This commit is contained in:
SataQiu 2020-09-10 14:05:36 +08:00
parent 53330f799a
commit c318973cec

View File

@ -125,7 +125,7 @@ func getInitConfigurationFromCluster(kubeconfigDir string, client clientset.Inte
// However, if newControlPlane == true, initcfg.NodeRegistration is not used at all and it's overwritten later on.
// Thus it's necessary to supply some default value, that will avoid the call to DetectCRISocket() and as
// initcfg.NodeRegistration is discarded, setting whatever value here is harmless.
initcfg.NodeRegistration.CRISocket = constants.DefaultDockerCRISocket
initcfg.NodeRegistration.CRISocket = "/var/run/unknown.sock"
}
return initcfg, nil
}