Create symlinks for failed builds logs
This allows to know which image failed to build without having to parse the huge job-output.txt file. This commit creates a convenient 000_FAILED_image_name.log symlink to the relevant log files when kolla is configured to output to a log directory. This creates symlinks only for the parent image with error, i.e. it skips images that failed to build because of parent error. Change-Id: I05954e2335dc3fac469276809c91f9c87e3ecab2
This commit is contained in:
parent
59ec7c7cf2
commit
58742c212e
@ -1018,6 +1018,10 @@ class KollaWorker(object):
|
||||
'name': name,
|
||||
'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:
|
||||
LOG.debug("=====================================")
|
||||
|
@ -65,6 +65,12 @@
|
||||
sudo mv $f ${f/.log/.txt}
|
||||
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
|
||||
find logs/kolla_configs -type f -exec mv '{}' '{}'.txt \;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user