From 450585cd35ee6b3beafb1bb3f1baadb224eae7c2 Mon Sep 17 00:00:00 2001 From: Philip Guyton Date: Thu, 17 Aug 2023 16:35:24 +0100 Subject: [PATCH] Improve rockstor.service re robustness #2657 Interact better with supervisord by not overriding shutdown. - Adds ExecStop instructing supervisord accordingly. - Adds ExecReload (for completeness as unused). - systemd's charge in this service is supervisord only, limit our KillMode to 'process' accordingly. This avoids and additional 1 minute timeout during our AT update script execution. Note that we currently run supervisord in foreground mode. --- conf/rockstor.service | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf/rockstor.service b/conf/rockstor.service index 9319ad126..2008cb3fe 100644 --- a/conf/rockstor.service +++ b/conf/rockstor.service @@ -7,6 +7,10 @@ Requires=rockstor-pre.service Environment="DJANGO_SETTINGS_MODULE=settings" WorkingDirectory=/opt/rockstor ExecStart=/root/.local/bin/poetry run supervisord -c /opt/rockstor/etc/supervisord.conf +ExecStop=/root/.local/bin/poetry run supervisorctl shutdown +ExecReload=/root/.local/bin/poetry run supervisorctl reload +# Generally not recommended but used here to honour supervisord's remit re process management. +KillMode=process [Install] WantedBy=multi-user.target