Skip to content

Commit

Permalink
Merge pull request kubernetes#65188 from aveshagarwal/master-rhbz-155…
Browse files Browse the repository at this point in the history
…5057

Automatic merge from submit-queue (batch tested with PRs 65188, 65541, 65534). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Increase glog level of some scheduling errors.

In our production environments, we are noticing that for every scheduling error, we are logging 3 errors at following lines:

1. https://github.com/kubernetes/kubernetes/blob/master/pkg/scheduler/scheduler.go#L194

2. https://github.com/kubernetes/kubernetes/blob/master/pkg/scheduler/factory/factory.go#L1416

3. https://github.com/kubernetes/kubernetes/blob/master/pkg/scheduler/factory/factory.go#L1323

This PR increases log levels of the last 2 errors to V(3).Infof. We can discuss if it would be helpful to increase the log level of the first error too.

@kubernetes/sig-scheduling-pr-reviews 
@bsalamat @k82cn @liggitt @sjenning 

```release-note
None.
```
  • Loading branch information
Kubernetes Submit Queue authored Jun 30, 2018
2 parents a9be647 + c0cffb8 commit ea3451f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/scheduler/factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -1414,7 +1414,7 @@ type podConditionUpdater struct {
}

func (p *podConditionUpdater) Update(pod *v1.Pod, condition *v1.PodCondition) error {
glog.V(2).Infof("Updating pod condition for %s/%s to (%s==%s)", pod.Namespace, pod.Name, condition.Type, condition.Status)
glog.V(3).Infof("Updating pod condition for %s/%s to (%s==%s)", pod.Namespace, pod.Name, condition.Type, condition.Status)
if podutil.UpdatePodCondition(&pod.Status, condition) {
_, err := p.Client.CoreV1().Pods(pod.Namespace).UpdateStatus(pod)
return err
Expand Down
1 change: 0 additions & 1 deletion pkg/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ func (sched *Scheduler) Config() *Config {
func (sched *Scheduler) schedule(pod *v1.Pod) (string, error) {
host, err := sched.config.Algorithm.Schedule(pod, sched.config.NodeLister)
if err != nil {
glog.V(1).Infof("Failed to schedule pod: %v/%v", pod.Namespace, pod.Name)
pod = pod.DeepCopy()
sched.config.Error(pod, err)
sched.config.Recorder.Eventf(pod, v1.EventTypeWarning, "FailedScheduling", "%v", err)
Expand Down

0 comments on commit ea3451f

Please sign in to comment.