Merge pull request #21999 from yujuhong/log_more

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot 2016-02-26 05:51:07 -08:00
commit 93c005e37c

View File

@ -114,10 +114,10 @@ func (g *GenericPLEG) Start() {
} }
func generateEvent(podID types.UID, cid string, oldState, newState plegContainerState) *PodLifecycleEvent { func generateEvent(podID types.UID, cid string, oldState, newState plegContainerState) *PodLifecycleEvent {
glog.V(7).Infof("GenericPLEG: %v/%v: %v -> %v", podID, cid, oldState, newState)
if newState == oldState { if newState == oldState {
return nil return nil
} }
glog.V(4).Infof("GenericPLEG: %v/%v: %v -> %v", podID, cid, oldState, newState)
switch newState { switch newState {
case plegContainerRunning: case plegContainerRunning:
return &PodLifecycleEvent{ID: podID, Type: ContainerStarted, Data: cid} return &PodLifecycleEvent{ID: podID, Type: ContainerStarted, Data: cid}
@ -254,7 +254,7 @@ func (g *GenericPLEG) updateCache(pod *kubecontainer.Pod, pid types.UID) error {
if pod == nil { if pod == nil {
// The pod is missing in the current relist. This means that // The pod is missing in the current relist. This means that
// the pod has no visible (active or inactive) containers. // the pod has no visible (active or inactive) containers.
glog.V(8).Infof("PLEG: Delete status for pod %q", string(pid)) glog.V(4).Infof("PLEG: Delete status for pod %q", string(pid))
g.cache.Delete(pid) g.cache.Delete(pid)
return nil return nil
} }
@ -263,7 +263,7 @@ func (g *GenericPLEG) updateCache(pod *kubecontainer.Pod, pid types.UID) error {
// GetPodStatus(pod *kubecontainer.Pod) so that Docker can avoid listing // GetPodStatus(pod *kubecontainer.Pod) so that Docker can avoid listing
// all containers again. // all containers again.
status, err := g.runtime.GetPodStatus(pod.ID, pod.Name, pod.Namespace) status, err := g.runtime.GetPodStatus(pod.ID, pod.Name, pod.Namespace)
glog.V(8).Infof("PLEG: Write status for %s/%s: %+v (err: %v)", pod.Name, pod.Namespace, status, err) glog.V(4).Infof("PLEG: Write status for %s/%s: %+v (err: %v)", pod.Name, pod.Namespace, status, err)
g.cache.Set(pod.ID, status, err, timestamp) g.cache.Set(pod.ID, status, err, timestamp)
return err return err
} }