From 4807c9b34291e7f6f198d10abdf48c490fd7cc79 Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Sun, 29 Mar 2015 14:24:30 +0200 Subject: [PATCH] labs: fix apache2 restart race "sudo service apache2 restart" sometimes fails because apache is trying to grab a resource that another process is still holding onto. Stopping apache first and starting it afterwards seems to avoid that race. Change-Id: I55bfa125246fbf960b100682a3f4698f8c1d7e09 --- labs/scripts/setup_lbaas_controller.sh | 3 ++- labs/scripts/ubuntu/setup_horizon.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/labs/scripts/setup_lbaas_controller.sh b/labs/scripts/setup_lbaas_controller.sh index c0629c8a..4dee05a6 100755 --- a/labs/scripts/setup_lbaas_controller.sh +++ b/labs/scripts/setup_lbaas_controller.sh @@ -37,5 +37,6 @@ echo "Checking dashboard configuration." check_dashboard_settings echo "Reloading apache and memcached service." -sudo service apache2 restart +sudo service apache2 stop +sudo service apache2 start sudo service memcached restart diff --git a/labs/scripts/ubuntu/setup_horizon.sh b/labs/scripts/ubuntu/setup_horizon.sh index 2ba1cfe8..d7d52588 100755 --- a/labs/scripts/ubuntu/setup_horizon.sh +++ b/labs/scripts/ubuntu/setup_horizon.sh @@ -54,5 +54,6 @@ echo "Checking dashboard configuration." check_dashboard_settings echo "Reloading apache and memcached service." -sudo service apache2 restart +sudo service apache2 stop +sudo service apache2 start sudo service memcached restart