Commit 554abbd7 authored by Nicolas Wavrant's avatar Nicolas Wavrant

runner: never remove slapproxy's database

parent 4407749e
...@@ -324,13 +324,6 @@ def stopProxy(config): ...@@ -324,13 +324,6 @@ def stopProxy(config):
return sup_process.stopProcess(config, "slapproxy") return sup_process.stopProcess(config, "slapproxy")
def removeProxyDb(config):
"""Remove Slapproxy database, this is used to initialize proxy for example when
configuring new Software Release"""
if os.path.exists(config['database_uri']):
os.unlink(config['database_uri'])
def isSoftwareRunning(config): def isSoftwareRunning(config):
""" """
Return True if slapos is still running and false if slapos if not Return True if slapos is still running and false if slapos if not
...@@ -548,11 +541,6 @@ def removeCurrentInstance(config): ...@@ -548,11 +541,6 @@ def removeCurrentInstance(config):
# Stop all processes # Stop all processes
svcStopAll(config) svcStopAll(config)
if stopProxy(config):
removeProxyDb(config)
startProxy(config)
else:
return "Something went wrong when trying to stop slapproxy."
# Remove Instance directory and data related to the instance # Remove Instance directory and data related to the instance
try: try:
...@@ -664,11 +652,7 @@ def newSoftware(folder, config, session): ...@@ -664,11 +652,7 @@ def newSoftware(folder, config, session):
pass pass
with open(os.path.join(basedir, ".project"), 'w') as f: with open(os.path.join(basedir, ".project"), 'w') as f:
f.write(folder + "/") f.write(folder + "/")
#Clean sapproxy Database #Stop running process and remove existing instance
stopProxy(config)
removeProxyDb(config)
startProxy(config)
#Stop runngin process and remove existing instance
logger.warning("User created a new SR. Removing all instances...") logger.warning("User created a new SR. Removing all instances...")
removeCurrentInstance(config) removeCurrentInstance(config)
session['title'] = getProjectTitle(config) session['title'] = getProjectTitle(config)
......
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