Commit 8ca71abc authored by Alain Takoudjou's avatar Alain Takoudjou

runner: always keep slapproxy running

Start slapproxy at runner startup and when instance is removed in webrunner. This fix resiliency problem when proxy.db file does not exist.

/reviewed-on !36
parent cf15a299
......@@ -12,7 +12,7 @@ import urlparse
from slapos.htpasswd import HtpasswdFile
from slapos.runner.process import setHandler
import sys
from slapos.runner.utils import runInstanceWithLock
from slapos.runner.utils import runInstanceWithLock, startProxy
from slapos.runner.views import *
from slapos.runner.gittools import cloneRepo, switchBranch
from git import GitCommandError
......@@ -147,6 +147,9 @@ def serve(config):
except GitCommandError, e:
app.logger.warning('Error while cloning default repository: %s' % str(e))
# Start slapproxy here when runner is starting'Stating slapproxy...')
startProxy(app.config)'Running slapgrid...')
if app.config['auto_deploy_instance'] in TRUE_VALUES:
import thread
......@@ -473,6 +473,7 @@ def removeCurrentInstance(config):
if stopProxy(config):
return "Something went wrong when trying to stop slapproxy."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment