From bcaadd63d8739b528f0121775d6612aebd333a4f Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Wed, 23 Nov 2016 12:43:02 +0100 Subject: [PATCH] Apache reload issue when it is stopped Since 4b49e409f853104dae021dfca1a9342ec9ac4709 devstack started to use reload instead of restart. Using reload in devstack for a fresh install, does not makes too much sense unless multiple service plugin touches the same service configs. Systemd rejects to reload something, which was not loaded before. $ sudo /bin/systemctl reload httpd httpd.service is not active, cannot reload. We will switch to `reload-or-restart` action instead of `reload`, it is more likely the action what the previous patch wanted. Change-Id: I70d597fbe4a8923d937ba8432e29edefb27d1058 --- functions-common | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions-common b/functions-common index d5014fd80a..951010fdad 100644 --- a/functions-common +++ b/functions-common @@ -2310,11 +2310,12 @@ function stop_service { fi } -# Service wrapper to stop services +# Service wrapper to reload services +# If the service was not in running state it will start it # reload_service service-name function reload_service { if [ -x /bin/systemctl ]; then - sudo /bin/systemctl reload $1 + sudo /bin/systemctl reload-or-restart $1 else sudo service $1 reload fi