Skip to content

Commit

Permalink
Better debugging log for investigating pod unknown status.
Browse files Browse the repository at this point in the history
  • Loading branch information
dchen1107 committed Feb 13, 2015
1 parent 20dc1c2 commit 1ce9993
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/master/pod_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func (p *PodCache) computePodStatus(pod *api.Pod) (api.PodStatus, error) {

// Assigned to non-existing node.
if err != nil || len(nodeStatus.Conditions) == 0 {
glog.V(5).Infof("node doesn't exist: %v %v, setting pod status to unknown", err, nodeStatus)
glog.V(5).Infof("node doesn't exist: %v %v, setting pod %q status to unknown", err, nodeStatus, pod.Name)
newStatus.Phase = api.PodUnknown
newStatus.Conditions = append(newStatus.Conditions, pod.Status.Conditions...)
return newStatus, nil
Expand All @@ -181,7 +181,7 @@ func (p *PodCache) computePodStatus(pod *api.Pod) (api.PodStatus, error) {
// Assigned to an unhealthy node.
for _, condition := range nodeStatus.Conditions {
if (condition.Kind == api.NodeReady || condition.Kind == api.NodeReachable) && condition.Status == api.ConditionNone {
glog.V(5).Infof("node status: %v, setting pod status to unknown", condition)
glog.V(5).Infof("node status: %v, setting pod %q status to unknown", condition, pod.Name)
newStatus.Phase = api.PodUnknown
newStatus.Conditions = append(newStatus.Conditions, pod.Status.Conditions...)
return newStatus, nil
Expand All @@ -191,7 +191,7 @@ func (p *PodCache) computePodStatus(pod *api.Pod) (api.PodStatus, error) {
result, err := p.containerInfo.GetPodStatus(pod.Status.Host, pod.Namespace, pod.Name)

if err != nil {
glog.Infof("error getting pod %s status: %v, retry later", pod.Name, err)
glog.V(5).Infof("error getting pod %s status: %v, retry later", pod.Name, err)
} else {
newStatus.HostIP = nodeStatus.HostIP
newStatus.Info = result.Status.Info
Expand Down

0 comments on commit 1ce9993

Please sign in to comment.