From 8237011e222986aa0ac18e93766b272d0f247ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Fri, 10 Jul 2020 19:11:15 +0200 Subject: [PATCH] use the default (more aggressive) container restart policy --- defaults/main.yml | 6 ------ tasks/compose.yml | 5 +---- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 7b5f96b..cdd8e76 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -23,12 +23,6 @@ beacon_node_rpc_port: 9900 beacon_node_mem_limit: '{{ (ansible_memtotal_mb * 0.6) | int }}' beacon_node_mem_reserve: '{{ (ansible_memtotal_mb * 0.4) | int }}' -# container restart policy -beacon_node_restart_condition: 'on-failure' -beacon_node_restart_max_attempts: 3 -beacon_node_restart_delay_sec: 10 -beacon_node_restart_window_sec: 120 - # general container management compose_recreate: false diff --git a/tasks/compose.yml b/tasks/compose.yml index f44e0c5..b6a5455 100644 --- a/tasks/compose.yml +++ b/tasks/compose.yml @@ -22,10 +22,7 @@ reservations: memory: '{{ beacon_node_mem_reserve }}M' restart_policy: - condition: '{{ beacon_node_restart_condition }}' - max_attempts: '{{ beacon_node_restart_max_attempts }}' - delay: '{{ beacon_node_restart_delay_sec }}s' - window: '{{ beacon_node_restart_window_sec }}s' + condition: 'any' ports: - '127.0.0.1:{{ beacon_node_rpc_port }}:{{ beacon_node_rpc_port }}/tcp' - '{{ beacon_node_metrics_port }}:{{ beacon_node_metrics_port }}/tcp'