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

Updated sysctl usage for cpu #10692

Merged
merged 1 commit into from
Oct 11, 2016

Conversation

johscheuer
Copy link

The determination of cpus fails on OSX and always return the default:

I0828 23:00:40.323360   98294 cmd.go:58] Executing local command:
I0828 23:00:40.323369   98294 cmd.go:59]   sysctl
I0828 23:00:40.323376   98294 cmd.go:61]   -n
I0828 23:00:40.323381   98294 cmd.go:61]   hw.ncpus
I0828 23:00:40.331770   98294 cmd.go:78] Error from execution: exit status 1
I0828 23:00:40.331822   98294 cmd.go:84] Errout:
sysctl: unknown oid 'hw.ncpus'

the command should be sysctl -n hw.ncpu but anyway this field is deprecated and shouldn't be used according to developer.apple. I assumed that we are checking the hardware cpus and replaced the command with sysctl -n hw.physicalcpu.

Tested on: Darwin Kernel Version 15.6.0

@csrwng
Copy link
Contributor

csrwng commented Aug 29, 2016

@johscheuer thx for fixing this. To preserve the intent of the original code, I think we want hw.logicalcpu though.

@johscheuer
Copy link
Author

@csrwng I changed it to hw.logicalcpu

@csrwng
Copy link
Contributor

csrwng commented Aug 29, 2016

LGTM

@johscheuer
Copy link
Author

@csrwng any action required from me?

@csrwng
Copy link
Contributor

csrwng commented Sep 15, 2016

@johscheuer No, we are waiting for 1.3 to be released. When it is, then merges will be allowed in origin again.

@csrwng
Copy link
Contributor

csrwng commented Oct 10, 2016

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 4412719

@openshift-bot
Copy link
Contributor

openshift-bot commented Oct 10, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/9850/) (Image: devenv-rhel7_5161)

@openshift-bot openshift-bot merged commit 8f6030a into openshift:master Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants