Merge "Create symlinks for failed builds logs"

This commit is contained in:
Zuul 2018-05-25 10:22:07 +00:00 committed by Gerrit Code Review
commit 046c5cc724
2 changed files with 10 additions and 0 deletions

View File

@ -1018,6 +1018,10 @@ class KollaWorker(object):
'name': name, 'name': name,
'status': status, 'status': status,
}) })
if self.conf.logs_dir and status == STATUS_ERROR:
os.symlink("%s.log" % name,
os.path.join(self.conf.logs_dir,
"000_FAILED_%s.log" % name))
if self.image_statuses_unmatched: if self.image_statuses_unmatched:
LOG.debug("=====================================") LOG.debug("=====================================")

View File

@ -65,6 +65,12 @@
sudo mv $f ${f/.log/.txt} sudo mv $f ${f/.log/.txt}
done done
# Update symlinks to new file names
for f in $(find logs -name "*FAILED*"); do
sudo mv ${f} ${f}.gz
sudo ln -sf ${f#*/000_FAILED_}.gz ${f}.gz
done
# append .txt to all kolla config file # append .txt to all kolla config file
find logs/kolla_configs -type f -exec mv '{}' '{}'.txt \; find logs/kolla_configs -type f -exec mv '{}' '{}'.txt \;