Update runner to work with new slapos node supervisorctl command.

parent 2e1c556b
...@@ -454,7 +454,7 @@ def getSlapStatus(config): ...@@ -454,7 +454,7 @@ def getSlapStatus(config):
def svcStopAll(config): def svcStopAll(config):
"""Stop all Instance processes on this computer""" """Stop all Instance processes on this computer"""
try: try:
return Popen([config['supervisor'], config['configuration_file_path'], return Popen([config['slapos'], 'node', 'supervisorctl', '--cfg', config['configuration_file_path'],
'shutdown']).communicate()[0] 'shutdown']).communicate()[0]
except: except:
pass pass
...@@ -475,7 +475,7 @@ def removeInstanceRoot(config): ...@@ -475,7 +475,7 @@ def removeInstanceRoot(config):
def getSvcStatus(config): def getSvcStatus(config):
"""Return all Softwares Instances process Information""" """Return all Softwares Instances process Information"""
result = Popen([config['supervisor'], config['configuration_file_path'], result = Popen([config['slapos'], 'node', 'supervisorctl', '--cfg', config['configuration_file_path'],
'status']).communicate()[0] 'status']).communicate()[0]
regex = "(^unix:.+\.socket)|(^error:)|(^watchdog).*$" regex = "(^unix:.+\.socket)|(^error:)|(^watchdog).*$"
supervisord = [] supervisord = []
...@@ -495,7 +495,7 @@ def getSvcTailProcess(config, process): ...@@ -495,7 +495,7 @@ def getSvcTailProcess(config, process):
Returns: Returns:
a string that contains the log of the process. a string that contains the log of the process.
""" """
return Popen([config['supervisor'], config['configuration_file_path'], return Popen([config['slapos'], 'node', 'supervisorctl', '--cfg', config['configuration_file_path'],
"tail", process]).communicate()[0] "tail", process]).communicate()[0]
...@@ -514,7 +514,7 @@ def svcStartStopProcess(config, process, action): ...@@ -514,7 +514,7 @@ def svcStartStopProcess(config, process, action):
'EXITED': 'start', 'EXITED': 'start',
'STOP': 'stop' 'STOP': 'stop'
} }
return Popen([config['supervisor'], config['configuration_file_path'], return Popen([config['slapos'], 'node', 'supervisorctl', '--cfg', config['configuration_file_path'],
cmd[action], process]).communicate()[0] cmd[action], process]).communicate()[0]
......
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