summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClark Boylan <clark.boylan@gmail.com>2015-10-26 23:17:38 -0700
committerClark Boylan <clark.boylan@gmail.com>2015-10-27 00:13:29 -0700
commita22fd5a2a92d32c1ee1a056c45422e441a8ed261 (patch)
tree2a910292463bfb3f7a36bba1779d91fe2c085991
parent957ecb6ceffd3180bc6c53b2abf77eddc3090b9d (diff)
Set higher nofile limit for node in init script
You must build additional pylons ... I mean we need more file descriptors. Set that in upstart directly since it does not respect limits.conf. This rewrites the upstart job to be more upstarty so that the limits can be applied without su undoing the work. Change-Id: Ibf670f07d75c4ffcf333c971d03c620f839b04d3
Notes
Notes (review): Code-Review+1: James E. Blair <corvus@inaugust.com> Code-Review+2: Jeremy Stanley <fungi@yuggoth.org> Workflow+1: Jeremy Stanley <fungi@yuggoth.org> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 27 Oct 2015 22:15:58 +0000 Reviewed-on: https://review.openstack.org/239599 Project: openstack-infra/puppet-ethercalc Branch: refs/heads/master
-rw-r--r--templates/upstart.erb7
1 files changed, 5 insertions, 2 deletions
diff --git a/templates/upstart.erb b/templates/upstart.erb
index f49ec6f..1281da7 100644
--- a/templates/upstart.erb
+++ b/templates/upstart.erb
@@ -12,15 +12,18 @@ respawn
12pre-start script 12pre-start script
13 chdir $EPHOME 13 chdir $EPHOME
14 mkdir $EPLOGS ||true 14 mkdir $EPLOGS ||true
15 chown $EPUSER:admin $EPLOGS ||true 15 chown -R $EPUSER:admin $EPLOGS ||true
16 chmod 0755 $EPLOGS ||true 16 chmod 0755 $EPLOGS ||true
17 chown -R $EPUSER:admin $EPHOME/var ||true 17 chown -R $EPUSER:admin $EPHOME/var ||true
18 bin/installDeps.sh >> $EPLOGS/error.log || { stop; exit 1; } 18 bin/installDeps.sh >> $EPLOGS/error.log || { stop; exit 1; }
19end script 19end script
20 20
21setuid <%= @ep_user %>
22setgid <%= @ep_user %>
23limit nofile 8192 16384
21script 24script
22 cd $EPHOME 25 cd $EPHOME
23 exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- /usr/local/bin/node --stack_size=1968 node_modules/ep_etherpad-lite/node/server.js \ 26 /usr/local/bin/node --stack_size=1968 node_modules/ep_etherpad-lite/node/server.js \
24 >> $EPLOGS/access.log \ 27 >> $EPLOGS/access.log \
25 2>> $EPLOGS/error.log 28 2>> $EPLOGS/error.log
26end script 29end script