Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some more verbose logging around pod status. #4222

Merged
merged 1 commit into from
Feb 6, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions pkg/master/pod_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,15 @@ 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)
newStatus.Phase = api.PodUnknown
return newStatus, nil
}

// Assigned to an unhealthy node.
for _, condition := range nodeStatus.Conditions {
if condition.Kind == api.NodeReady && condition.Status == api.ConditionNone {
newStatus.Phase = api.PodUnknown
return newStatus, nil
}
if condition.Kind == api.NodeReachable && condition.Status == api.ConditionNone {
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)
newStatus.Phase = api.PodUnknown
return newStatus, nil
}
Expand All @@ -189,6 +187,7 @@ func (p *PodCache) computePodStatus(pod *api.Pod) (api.PodStatus, error) {
newStatus.HostIP = nodeStatus.HostIP

if err != nil {
glog.Errorf("error getting pod status: %v, setting status to unknown", err)
newStatus.Phase = api.PodUnknown
} else {
newStatus.Info = result.Status.Info
Expand Down