From 823d899e9e94c84f2087ea40238b3420fe13dd82 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 21 Jan 2024 15:51:44 -0600 Subject: [PATCH] r/minio: Start more reliably on boot The MinIO service often fails to start from a cold boot. Delaying starting the service until the network is online, plus increasing the startup timeout, should help with this. If not, enabling auto restart will let systemd try to start the service again if it still fails to come up on time. --- roles/minio/templates/minio.container.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/minio/templates/minio.container.j2 b/roles/minio/templates/minio.container.j2 index dcc7295..7f173b3 100644 --- a/roles/minio/templates/minio.container.j2 +++ b/roles/minio/templates/minio.container.j2 @@ -1,7 +1,7 @@ [Unit] Description=MinIO Object Storage -Wants=network.target -After=network.target +Wants=network-online.target +After=network-online.target [Container] Image={{ minio_container_image }}:{{ minio_version }} @@ -16,6 +16,8 @@ NoNewPrivileges=yes [Service] ExecReload=/bin/kill -HUP $MAINPID +TimeoutStartSec=5min +Restart=always MemoryDenyWriteExecute=yes PrivateTmp=yes ProtectClock=yes