aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kolla/image/tasks.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/kolla/image/tasks.py b/kolla/image/tasks.py
index 27377a865..1fbfbd6b5 100644
--- a/kolla/image/tasks.py
+++ b/kolla/image/tasks.py
@@ -16,6 +16,7 @@ import os
import shutil
import tarfile
+import docker.errors
import git
import requests
from requests import exceptions as requests_exc
@@ -391,10 +392,16 @@ class BuildTask(EngineTask):
if image.status != Status.ERROR and self.conf.squash and \
self.conf.engine == engine.Engine.DOCKER.value:
self.squash()
- except engine.getEngineException(self.conf):
+
+ except engine.getEngineException(self.conf) as e:
image.status = Status.ERROR
+ if isinstance(e, docker.errors.BuildError):
+ for line in e.build_log:
+ if 'stream' in line:
+ self.logger.error(line['stream'].strip())
self.logger.exception('Unknown container engine '
'error when building')
+
except Exception:
image.status = Status.ERROR
self.logger.exception('Unknown error when building')