Merge pull request #28203 from ping035627/ping035627-0629

Automatic merge from submit-queue

Add error log for Run function in server.go

When clientcmd.BuildConfigFromFlags and os.Hostname return error, there are no log information in Run function, neither did the upper function(main of scheduler), add it, I suggest.
This commit is contained in:
k8s-merge-robot
2016-06-29 21:03:05 -07:00
committed by GitHub

View File

@@ -76,6 +76,7 @@ func Run(s *options.SchedulerServer) error {
}
kubeconfig, err := clientcmd.BuildConfigFromFlags(s.Master, s.Kubeconfig)
if err != nil {
glog.Errorf("unable to build config from flags: %v", err)
return err
}
@@ -134,6 +135,7 @@ func Run(s *options.SchedulerServer) error {
id, err := os.Hostname()
if err != nil {
glog.Errorf("unable to get hostname: %v", err)
return err
}