From 58613c2dcbd77255d814815fbe942f893528795c Mon Sep 17 00:00:00 2001 From: Antoine Cotten Date: Wed, 19 Oct 2022 18:02:55 +0200 Subject: [PATCH] fix(ext/fleet): Restart on failure It is expected that Elastic Agent fails when Kibana is not ready. To simplify the ergonomics of this extension, and avoid having to wait before starting it, restart the Fleet Server service (container) automatically on failures. Closes #763 --- extensions/fleet/README.md | 4 ---- extensions/fleet/fleet-compose.yml | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/extensions/fleet/README.md b/extensions/fleet/README.md index fa3f42d..c74e7e0 100644 --- a/extensions/fleet/README.md +++ b/extensions/fleet/README.md @@ -13,10 +13,6 @@ Fleet Server is the central component which allows connecting Elastic Agents to ## Usage -> **Note** -> Elastic Agent does not retry failed connections to Kibana upon the initial enrollment phase. Therefore, Kibana must be -> fully started before this extension can be run. - To include Fleet Server in the stack, run Docker Compose from the root of the repository with an additional command line argument referencing the `fleet-compose.yml` file: diff --git a/extensions/fleet/fleet-compose.yml b/extensions/fleet/fleet-compose.yml index bb4080e..81c0a39 100644 --- a/extensions/fleet/fleet-compose.yml +++ b/extensions/fleet/fleet-compose.yml @@ -19,6 +19,8 @@ services: ports: - '8220:8220' hostname: fleet-server + # Elastic Agent does not retry failed connections to Kibana upon the initial enrollment phase. + restart: on-failure networks: - elk depends_on: