Skip to content

Commit

Permalink
Add GOMAXPROCS in a few more places
Browse files Browse the repository at this point in the history
  • Loading branch information
lavalamp committed Feb 20, 2015
1 parent 17feadf commit 1e679f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/hyperkube/hyperkube.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"io/ioutil"
"os"
"path"
"runtime"

"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
Expand Down Expand Up @@ -175,8 +176,10 @@ func (hk *HyperKube) Run(args []string) error {

// RunToExit will run the hyperkube and then call os.Exit with an appropriate exit code.
func (hk *HyperKube) RunToExit(args []string) {
runtime.GOMAXPROCS(runtime.NumCPU())
err := hk.Run(args)
if err != nil {
fmt.Fprint(os.Stderr, err.Error())
os.Exit(1)
}
os.Exit(0)
Expand Down
3 changes: 3 additions & 0 deletions plugin/cmd/kube-scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
package main

import (
"runtime"

"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version/verflag"
"github.com/GoogleCloudPlatform/kubernetes/plugin/cmd/kube-scheduler/app"
Expand All @@ -25,6 +27,7 @@ import (
)

func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
s := app.NewSchedulerServer()
s.AddFlags(pflag.CommandLine)

Expand Down

0 comments on commit 1e679f0

Please sign in to comment.