aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Capitani <m.capitani@nextworks.it>2018-03-27 14:55:37 +0200
committerMarco Capitani <m.capitani@nextworks.it>2018-03-27 15:55:34 +0200
commit9f8e20ad37364e3f557b67e7a84e62d6f81aa387 (patch)
tree195c45566af56b4c0ce415ff747c6f14a3a0a064
parent75aacd73e2492e521c5c5af2290118d0c185c78c (diff)
downloadrumba-9f8e20ad37364e3f557b67e7a84e62d6f81aa387.tar.gz
rumba-9f8e20ad37364e3f557b67e7a84e62d6f81aa387.zip
storyboard: fix for putting logs into paths based on node name
fixes #43
-rw-r--r--rumba/storyboard.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/rumba/storyboard.py b/rumba/storyboard.py
index b0ae320..edf4f0c 100644
--- a/rumba/storyboard.py
+++ b/rumba/storyboard.py
@@ -651,16 +651,22 @@ class StoryBoard(SBEntity):
'Cannot fetch logs.'
% local_dir)
for node in self.server_nodes:
+ dst_dir = os.path.join(local_dir, node.name)
+ if not os.path.isdir(dst_dir):
+ os.mkdir(dst_dir)
logs_list = node.execute_command('ls /tmp/*_server.log')
logs_list = [x for x in logs_list.split('\n') if x != '']
logger.debug('Log list is:\n%s', logs_list)
- node.fetch_files(logs_list, local_dir)
+ node.fetch_files(logs_list, dst_dir)
for node in self.client_nodes:
+ dst_dir = os.path.join(local_dir, node.name)
+ if not os.path.isdir(dst_dir):
+ os.mkdir(dst_dir)
logs_list = node.execute_command('ls /tmp/*.rumba.log '
'|| echo ""')
logs_list = [x for x in logs_list.split('\n') if x != '']
logger.debug('Log list is:\n%s', logs_list)
- node.fetch_files(logs_list, local_dir)
+ node.fetch_files(logs_list, dst_dir)
def set_link_state(self, t, dif, state):
if self.experiment is None: