From 72b3fdcc8e6806391a3f0507c386186f74d7a9f5 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Tue, 13 Jun 2017 11:32:42 +0100 Subject: [PATCH] Add reload support to init file All services except the API service support the use of SIGHUP to reload config files without shutting down network sockets (and perhaps other things). This patch adds support for reloading the services instead of just restarting it to assist with improving rolling upgrades. Change-Id: Id95cae40f736ea2c84200955fccdb44ea3bc1dd8 --- templates/cinder-systemd-init.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/cinder-systemd-init.j2 b/templates/cinder-systemd-init.j2 index 72395822..9a044faf 100644 --- a/templates/cinder-systemd-init.j2 +++ b/templates/cinder-systemd-init.j2 @@ -15,6 +15,9 @@ ExecStart={{ program_override }} {{ program_config_options|default('') }} --log- {% else %} ExecStart={{ cinder_bin }}/{{ item.service_name }} {{ program_config_options|default('') }} --log-file=/var/log/cinder/{{ item.service_name }}.log {% endif %} +{% if item.service_name != "cinder-api" %} +ExecReload=/bin/kill -HUP $MAINPID +{% endif %} # Give a reasonable amount of time for the server to start up/shut down TimeoutSec=120