diff --git a/kolla/image/build.py b/kolla/image/build.py index 551845562d..8abdad0ddb 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("=====================================") diff --git a/tests/playbooks/post.yml b/tests/playbooks/post.yml index 413d3f757e..9ed6128c53 100644 --- a/tests/playbooks/post.yml +++ b/tests/playbooks/post.yml @@ -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 \;