Commit 1f8e3ce6 authored by Flavio TARSETTI's avatar Flavio TARSETTI

Merge branch '107_gracefully_handle_docker_client_creation_failure' into 'master'

Gracefully handle docker client creation error

Closes beat.editor#282 and #107

See merge request !138
parents 7ab0f93a 33a9c256
Pipeline #49840 passed with stages
in 54 minutes and 22 seconds
......@@ -421,8 +421,14 @@ class Host(object):
return environments
try:
client = docker.from_env()
except Exception as e:
if self.raise_on_errors:
raise
else:
logger.error("Docker client creation failed {}".format(e))
return {}, {}
try:
databases = client.images.list(
filters={"label": ["beat.env.type=database"]}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment