diff options
author | Stuart Mackie <wsmackie@juniper.net> | 2016-10-07 12:24:58 -0700 |
---|---|---|
committer | Stuart Mackie <wsmackie@juniper.net> | 2016-10-07 12:24:58 -0700 |
commit | 4faa7f927149a5c4ef7a03523f7bc14523cb9baa (patch) | |
tree | 0be55aa0809cc395e45baeae63db660b4e72fe83 /charms/trusty/contrail-webui/files/supervisor-webui.conf | |
parent | 82f1a7eb5535b30a95b1e71ff18c315d40d1e6f0 (diff) |
Charms for Contrail 3.1 with Mitaka
Change-Id: Id37f3b9743d1974e31fcd7cd9c54be41bb0c47fb
Signed-off-by: Stuart Mackie <wsmackie@juniper.net>
Diffstat (limited to 'charms/trusty/contrail-webui/files/supervisor-webui.conf')
-rw-r--r-- | charms/trusty/contrail-webui/files/supervisor-webui.conf | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/charms/trusty/contrail-webui/files/supervisor-webui.conf b/charms/trusty/contrail-webui/files/supervisor-webui.conf new file mode 100644 index 0000000..37b8e25 --- /dev/null +++ b/charms/trusty/contrail-webui/files/supervisor-webui.conf @@ -0,0 +1,36 @@ +description "Supervisord for VNC web-ui" + +start on runlevel [2345] +stop on runlevel [016] +limit core unlimited unlimited + +# Restart the process if it dies with a signal +# or exit code not given by the 'normal exit' stanza. +respawn + +# Give up if restart occurs 10 times in 90 seconds. +respawn limit 10 90 + +pre-start script + ulimit -s unlimited + ulimit -c unlimited + ulimit -d unlimited + ulimit -v unlimited + ulimit -n 4096 +end script + +script + supervisord --nodaemon -c /etc/contrail/supervisord_webui.conf || true + echo "supervisor-webui start failed...." + (lsof | grep -i supervisord_webui.sock) || true + pid=`lsof | grep -i supervisord_webui.sock | cut -d' ' -f3` || true + if [ "x$pid" != "x" ]; then + ps uw -p $pid + fi +end script + +pre-stop script + supervisorctl -s unix:///tmp/supervisord_webui.sock stop all + supervisorctl -s unix:///tmp/supervisord_webui.sock shutdown + /usr/bin/supervisor_killall /etc/contrail/supervisord_webui_files +end script |