Browse code

Merge "Fix worlddump log collection"

Zuul authored on 2019/09/14 00:17:18
Showing 2 changed files
... ...
@@ -233,6 +233,7 @@
233 233
         '{{ devstack_log_dir }}/devstacklog.txt': logs
234 234
         '{{ devstack_log_dir }}/devstacklog.txt.summary': logs
235 235
         '{{ devstack_log_dir }}/tcpdump.pcap': logs
236
+        '{{ devstack_log_dir }}/worlddump-latest.txt': logs
236 237
         '{{ devstack_full_log}}': logs
237 238
         '{{ stage_dir }}/verify_tempest_conf.log': logs
238 239
         '{{ stage_dir }}/apache': logs
... ...
@@ -25,6 +25,7 @@ from distutils import spawn
25 25
 import fnmatch
26 26
 import os
27 27
 import os.path
28
+import shutil
28 29
 import subprocess
29 30
 import sys
30 31
 
... ...
@@ -248,6 +249,14 @@ def main():
248 248
         compute_consoles()
249 249
         guru_meditation_reports()
250 250
         var_core()
251
+    # Singular name for ease of log retrieval
252
+    copyname = os.path.join(opts.dir, 'worlddump')
253
+    if opts.name:
254
+        copyname += '-' + opts.name
255
+    copyname += '-latest.txt'
256
+    # We make a full copy to deal with jobs that may or may not
257
+    # gzip logs breaking symlinks.
258
+    shutil.copyfile(fname, copyname)
251 259
 
252 260
 
253 261
 if __name__ == '__main__':