aboutsummaryrefslogtreecommitdiff
path: root/kolla
diff options
context:
space:
mode:
authorMartin André <m.andre@redhat.com>2018-05-07 15:55:59 +0200
committerMartin André <m.andre@redhat.com>2018-05-08 09:08:05 +0200
commit58742c212e0bdc5092ba6cc0da2fc8c5589bb172 (patch)
tree89490849b6f3f1398a2034777890785b175e48d2 /kolla
parent59ec7c7cf240da409c293e30ce7f0599542ad7a7 (diff)
downloadkolla-58742c212e0bdc5092ba6cc0da2fc8c5589bb172.tar.gz
kolla-58742c212e0bdc5092ba6cc0da2fc8c5589bb172.zip
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
Diffstat (limited to 'kolla')
-rwxr-xr-xkolla/image/build.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/kolla/image/build.py b/kolla/image/build.py
index cd59aa260..8f617c69e 100755
--- a/kolla/image/build.py
+++ b/kolla/image/build.py
@@ -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("=====================================")