Merge pull request #31661 from mikedanese/log-fix-ds

Automatic merge from submit-queue

fix log message to include ds name

The pod name is never set because newPod is created a couple lines up without a name. Instead log the name and namespace of the ds which the pod is created from.

also bump the log level because reasons loop get's hit fairly often and does not indicate a bug.
This commit is contained in:
Kubernetes Submit Queue 2016-09-06 03:51:25 -07:00 committed by GitHub
commit 4260f4ed0b

View File

@ -708,10 +708,10 @@ func (dsc *DaemonSetsController) nodeShouldRunDaemonPod(node *api.Node, ds *exte
nodeInfo.SetNode(node) nodeInfo.SetNode(node)
fit, reasons, err := predicates.GeneralPredicates(newPod, nil, nodeInfo) fit, reasons, err := predicates.GeneralPredicates(newPod, nil, nodeInfo)
if err != nil { if err != nil {
glog.Warningf("GeneralPredicates failed on pod %s due to unexpected error: %v", newPod.Name, err) glog.Warningf("GeneralPredicates failed on ds '%s/%s' due to unexpected error: %v", ds.ObjectMeta.Namespace, ds.ObjectMeta.Name, err)
} }
for _, r := range reasons { for _, r := range reasons {
glog.V(2).Infof("GeneralPredicates failed on pod %s for reason: %v", newPod.Name, r.GetReason()) glog.V(4).Infof("GeneralPredicates failed on ds '%s/%s' for reason: %v", ds.ObjectMeta.Namespace, ds.ObjectMeta.Name, r.GetReason())
} }
return fit return fit
} }