Browse Source

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
Marcin Juszkiewicz 4 months ago
parent
commit
63e5e4d658
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      kolla/image/build.py

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

@@ -744,7 +744,9 @@ class KollaWorker(object):
744 744
                     or conf.save_dependency
745 745
                     or conf.list_images
746 746
                     or conf.list_dependencies):
747
-                raise e
747
+                LOG.error("Unable to connect to Docker, exiting")
748
+                LOG.info("Exception caught: {0}".format(e))
749
+                sys.exit(1)
748 750
 
749 751
     def _get_images_dir(self):
750 752
         possible_paths = (

Loading…
Cancel
Save