Handle kolla-build exception
kolla-build currently does not provide information if docker service is not running. Added exception handling. Change-Id: I1f167804b8b4d2ad9220281954ff7ea7162a9817 Closes-Bug:#1553912
This commit is contained in:
parent
4d0fb0b7f6
commit
5669f7e0ad
@ -73,8 +73,13 @@ class KollaRpmSetupUnknownConfig(Exception):
|
||||
|
||||
|
||||
def docker_client():
|
||||
docker_kwargs = docker.utils.kwargs_from_env()
|
||||
return docker.Client(version='auto', **docker_kwargs)
|
||||
try:
|
||||
docker_kwargs = docker.utils.kwargs_from_env()
|
||||
return docker.Client(version='auto', **docker_kwargs)
|
||||
except docker.errors.DockerException:
|
||||
LOG.exception('Can not communicate with docker service.'
|
||||
'Please check docker service is running without errors')
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
class PushThread(threading.Thread):
|
||||
|
Loading…
Reference in New Issue
Block a user