aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rumba/storyboard.py19
1 files changed, 6 insertions, 13 deletions
diff --git a/rumba/storyboard.py b/rumba/storyboard.py
index 61dd8cc..1d6858e 100644
--- a/rumba/storyboard.py
+++ b/rumba/storyboard.py
@@ -275,21 +275,16 @@ class Server(SBEntity):
def run(self):
for node in self.nodes:
- logfile = "/tmp/%s_server.log" % self.ap
- script = r'nohup "$@" > %s 2>&1 & echo "$!"' % (logfile,)
run_cmd = self.ap + (
(" " + self.options) if self.options is not None else ""
)
- cmd_1 = "echo '%s' > startup.sh && chmod a+x startup.sh" \
- % (script,)
- cmd_2 = "./startup.sh %s" % (run_cmd,)
+ cmd_2 = "./startup.sh %s %s" % ('server_' + self.id, run_cmd)
logger.debug(
- 'Starting server %s on node %s with logfile %s.',
- self.id, node.name, logfile
+ 'Starting server %s on node %s.',
+ self.id, node.name
)
try:
- node.execute_command(cmd_1)
- self.pids[node] = (node.execute_command(cmd_2))
+ self.pids[node] = node.execute_command(cmd_2)
except ssh_support.SSHException:
logger.warn('Could not start server %s on node %s.',
self.id, node.name)
@@ -664,8 +659,6 @@ class StoryBoard(SBEntity):
self._build_nodes_lists()
logger.debug('Server nodes are: %s.',
[x.name for x in self.server_nodes])
- logger.debug('Client nodes are: %s.',
- [x.name for x in self.client_nodes])
logger.debug('Command list is: %s.', {x: [(y.name, z)
for y, z in t]
for (x, t)
@@ -673,8 +666,8 @@ class StoryBoard(SBEntity):
self.start_time = time.time()
script = r'logname="$1"; shift; nohup "${@}" ' \
r'> /tmp/${logname}.rumba.log 2>&1 & echo "$!"'
- logger.debug("Writing utility startup script on client nodes.")
- for node in self.client_nodes:
+ logger.debug("Writing utility startup script on nodes.")
+ for node in self.node_map.values():
node.execute_command(
"echo '%s' > startup.sh && chmod a+x startup.sh" % (script,)
)