Improving StopContainer failed log level

This commit is contained in:
Ke Zhang 2016-09-13 14:23:15 +08:00
parent 622c2bbd5e
commit 347293617f

View File

@ -1505,7 +1505,7 @@ func (dm *DockerManager) killContainer(containerID kubecontainer.ContainerID, co
}()
select {
case <-time.After(time.Duration(gracePeriod) * time.Second):
glog.V(2).Infof("preStop hook for container %q did not complete in %d seconds", name, gracePeriod)
glog.Warningf("preStop hook for container %q did not complete in %d seconds", name, gracePeriod)
case <-done:
glog.V(4).Infof("preStop hook for container %q completed", name)
}
@ -1530,7 +1530,7 @@ func (dm *DockerManager) killContainer(containerID kubecontainer.ContainerID, co
if err == nil {
glog.V(2).Infof("Container %q exited after %s", name, unversioned.Now().Sub(start.Time))
} else {
glog.V(2).Infof("Container %q termination failed after %s: %v", name, unversioned.Now().Sub(start.Time), err)
glog.Warningf("Container %q termination failed after %s: %v", name, unversioned.Now().Sub(start.Time), err)
}
ref, ok := dm.containerRefManager.GetRef(containerID)
if !ok {