Browse Source

Merge "build: remove link to failed log before creating" into stable/rocky

tags/7.1.0
Zuul 2 months ago
parent
commit
9070cac280
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      kolla/image/build.py

+ 9
- 3
kolla/image/build.py View File

@@ -1037,9 +1037,15 @@ class KollaWorker(object):
'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))
linkname = os.path.join(self.conf.logs_dir,
"000_FAILED_%s.log" % name)
try:
os.lstat(linkname)
os.remove(linkname)
except OSError:
pass

os.symlink("%s.log" % name, linkname)

if self.image_statuses_unmatched:
LOG.debug("=====================================")

Loading…
Cancel
Save