-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
GOMAXPROCS picks number of CPUs using sysconfig - Also updated Serverspec to 2.0 #52
Conversation
Current server spec installation will use 2.0 - which means i have to change spec_helper and matchers. Also consul uses the ui with an extra relative folder consul_ui - that had to be fixed for server spec to pass
Updated init.d script to use GOMAXPROCS on sysconfig - This can be changed on the attributes - best practice is to use same number as CPUs available
GOMAXPROCS picks up number of CPUs instead of leaving it as an attribute
sysconfig needs to trigger init instead of the service - calling immediately twice creates issues with the service already being restarted
@@ -0,0 +1 @@ | |||
export GOMAXPROCS=<%= @gomaxprocs %> |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
environment export should sit within init script not sysconfig
Fixed the two issues as requested, Thanks @johnbellone |
source 'consul-sysconfig.erb' | ||
mode 0755 | ||
variables( | ||
gomaxprocs: node['cpu']['total'] |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Also you'll need to rebase. Thanks for the work 🍺! |
Current server spec installation will use 2.0 - which means i have to change spec_helper and matchers. Also consul uses the ui with an extra relative folder consul_ui - that had to be fixed for server spec to pass cleaning up .gitignore clean up gitignore
Updated init.d script to use GOMAXPROCS on sysconfig - This can be changed on the attributes - best practice is to use same number as CPUs available Best Practice - Force Chef to setup number of CPUs GOMAXPROCS picks up number of CPUs instead of leaving it as an attribute Sysconfig triggers init.d template not the service sysconfig needs to trigger init instead of the service - calling immediately twice creates issues with the service already being restarted remove unused .gitignore2 file Init environment setup environment export should sit within init script not sysconfig moving cpu total variable into template instead of variables
Hi there, fixed the template as suggested. |
Conflicts: test/integration/default/serverspec/spec_helper.rb test/integration/ui/serverspec/spec_helper.rb
Great work! |
@johnbellone I'm having some issues rebasing the upstream merge commits ... could you help me with that? |
What are the issues that you're having? |
[detached HEAD 3396d3d] GOMAXPROCS used through sysconfig
Otherwise, please use 'git reset' nothing to commit, working directory clean On 17 October 2014 14:09, John Bellone notifications@github.com wrote:
|
. /etc/sysconfig/consul | ||
fi | ||
|
||
export GOMAXPROCS=${GOMAXPROCS:-2} |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
the rebase is giving us headaches - I can re-fork head and re-apply as one commit - what do you think? I'll send another pull request if you agree. |
I don't think the rebase is giving headaches - at least not to me - I am able to merge it. Could you just take care of the default value (per above comment)? |
Done. Thanks |
GOMAXPROCS picks number of CPUs using sysconfig - Also updated Serverspec to 2.0
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Current server spec installation will use 2.0 - which means i have to
change spec_helper and matchers.
Also consul uses the ui with an extra relative folder consul_ui - that
had to be fixed for server spec to pass