Merge pull request #94555 from SataQiu/fix-crisocket-warning-20200905

Fix the bug that kubeadm tries to call 'docker info' even if the CRI socket was for another CR
This commit is contained in:
Kubernetes Prow Robot 2020-09-14 09:41:12 -07:00 committed by GitHub
commit 5dd2676bf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}