Merge pull request #10028 from azhao155/yzhao/fix/dockerEnvLog

Change exit to warning if can't restart docker in docker-env cmd
pull/10048/head
Medya Ghazizadeh 2020-12-23 18:00:19 -08:00 committed by GitHub
commit 3dac483db9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -194,7 +194,8 @@ func mustRestartDockerd(name string, runner command.Runner) {
if err := sysinit.New(runner).Reload("docker"); err != nil { if err := sysinit.New(runner).Reload("docker"); err != nil {
klog.Warningf("will try to restart dockerd because reload failed: %v", err) klog.Warningf("will try to restart dockerd because reload failed: %v", err)
if err := sysinit.New(runner).Restart("docker"); err != nil { if err := sysinit.New(runner).Restart("docker"); err != nil {
exit.Message(reason.RuntimeRestart, `The Docker service within '{{.name}}' is not active`, out.V{"name": name}) klog.Warningf("Couldn't restart docker inside minikbue within '%v' because: %v", name, err)
return
} }
// if we get to the point that we have to restart docker (instead of reload) // if we get to the point that we have to restart docker (instead of reload)
// will need to wait for apisever container to come up, this usually takes 5 seconds // will need to wait for apisever container to come up, this usually takes 5 seconds