diff options
| author | Marcin Juszkiewicz <marcin@juszkiewicz.com.pl> | 2018-11-21 10:28:05 +0100 |
|---|---|---|
| committer | Jon Schlueter <jschluet@redhat.com> | 2019-01-31 10:48:20 -0500 |
| commit | 63e5e4d65895616cce29d73e4cf08a876a6db83e (patch) | |
| tree | 6829a05ef42b0a868bc4370ded4d16bb57b9e5d5 /kolla | |
| parent | 7526cf4d6765b9950f4f5297bbd7d72f2150c4f4 (diff) | |
| download | kolla-63e5e4d65895616cce29d73e4cf08a876a6db83e.tar.gz kolla-63e5e4d65895616cce29d73e4cf08a876a6db83e.zip | |
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
Diffstat (limited to 'kolla')
| -rwxr-xr-x | kolla/image/build.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kolla/image/build.py b/kolla/image/build.py index 8e136b402..eb5512dc0 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 = ( |
