From 63e5e4d65895616cce29d73e4cf08a876a6db83e Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 21 Nov 2018 10:28:05 +0100 Subject: [PATCH] build: exit if there is no Docker connection When user starts Kolla on system without Docker daemon running huge traceback is generated and then exit. Issue is because KollaWorker raises exception but no one catches it (then only call to it is in run_build() which assumes everything is ok). Change-Id: I68ea3f48c75b51dbbab3accbc531d2f73428c48f --- kolla/image/build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kolla/image/build.py b/kolla/image/build.py index 8e136b402b..eb5512dc06 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -744,7 +744,9 @@ class KollaWorker(object): or conf.save_dependency or conf.list_images or conf.list_dependencies): - raise e + LOG.error("Unable to connect to Docker, exiting") + LOG.info("Exception caught: {0}".format(e)) + sys.exit(1) def _get_images_dir(self): possible_paths = (