diff options
author | Jonathan Abrahams <jonathan@mongodb.com> | 2016-08-11 14:14:30 -0400 |
---|---|---|
committer | Jonathan Abrahams <jonathan@mongodb.com> | 2016-08-11 14:15:23 -0400 |
commit | 953176fc951159a74f33ff6eac1d77d3d04ca95c (patch) | |
tree | 41feab43d719f5d2f430b4dd9e00738f0bef59de | |
parent | e14a61c7897ff33228b7e3a0c690031094d13b8e (diff) | |
download | mongo-953176fc951159a74f33ff6eac1d77d3d04ca95c.tar.gz |
SERVER-25562 Archive stdout.log with mongod.log for Jepsen task
-rw-r--r-- | etc/evergreen.yml | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml index 1cf22c234d8..998bdb09c45 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -713,27 +713,28 @@ post: script: | # For Jepsen tasks, archive the mongod log files. if [ -d jepsen ]; then - # Copy mongod.log from each LXC host for archive purposes. The log can reside in - # 1 of 2 places: + # Copy mongod.log & stdout.log from each LXC host for archive purposes. Note that + # stdout.log is also generated as a result of starting mongod. + # The logs can reside in 1 of 2 places: # If the task completed: /root # If the task failed to complete: /opt/mongodb - # There may be a mongod.log in both places, but the one in /opt/mongodb should override - # the one in /root, since the log in /root could be from a previous successful run. + # There may be logs in both places, but the ones in /opt/mongodb should override + # the ones in /root, since the logs in /root could be from a previous successful run. numVms=5 for i in $(seq 1 $numVms) do hostn=n$i - mongod_log=mongod-$hostn.log - for mongod_log_remote in /root/mongod.log /opt/mongodb/mongod.log + for log_dir in /root /opt/mongodb do - scp -q root@$hostn:$mongod_log_remote $mongod_log 2> /dev/null - if [ -f $mongod_log ]; then - echo "Copied $mongod_log_remote from $hostn to $mongod_log" - fi + for log in mongod.log stdout.log + do + outlog="$(echo $log | cut -f1 -d '.')-n$i.log" + scp -q root@$hostn:$log_dir/$log $outlog 2> /dev/null + if [ -f $outlog ]; then + echo "Copied $log_dir/$log from $hostn to $outlog" + fi + done done - if [ ! -f $mongod_log ]; then - echo "No mongod.log from $hostn copied to $mongod_log" - fi done fi - command: archive.targz_pack @@ -742,6 +743,7 @@ post: source_dir: "src" include: - "mongod*.log" + - "stdout*.log" - command: s3.put params: aws_key: ${aws_key} |