From 92a4ed5bb811c62263d72cf76b8cbd7a719fed3f Mon Sep 17 00:00:00 2001 From: Vladimir Kuklin Date: Thu, 10 Sep 2015 23:44:48 +0300 Subject: [PATCH] Add workaround for apache restart during deployment As figured out in the following launcpad bug https://bugs.launchpad.net/fuel/+bug/1493353 Apache2 is not very friendly to any types of restarts. This may lead to the issue when we restart apache to often during deployment and it gets into Byzantine unresponsive state along with keystone which breaks keystone providers operations. Change-Id: I11c52089e9598fc6d088c3478c90de3aa853652a Closes-bug: #1493372 Related-bug: #1493353 --- deployment/puppet/tweaks/manifests/apache_wrappers.pp | 2 +- tests/noop/spec/hosts/api-proxy/api-proxy_spec.rb | 2 +- tests/noop/spec/hosts/astute/service_token_off_spec.rb | 2 +- tests/noop/spec/hosts/ceph/radosgw_spec.rb | 2 +- tests/noop/spec/hosts/horizon/horizon_spec.rb | 2 +- tests/noop/spec/hosts/keystone/keystone_spec.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deployment/puppet/tweaks/manifests/apache_wrappers.pp b/deployment/puppet/tweaks/manifests/apache_wrappers.pp index 9206f6a357..f531b22787 100644 --- a/deployment/puppet/tweaks/manifests/apache_wrappers.pp +++ b/deployment/puppet/tweaks/manifests/apache_wrappers.pp @@ -12,7 +12,7 @@ class tweaks::apache_wrappers ( # as we have found that sometimes with mod_wsgi apache will crash on a # graceful restart - https://github.com/GrahamDumpleton/mod_wsgi/issues/81 Service <| name == $service_name or title == $service_name |> { - restart => 'apachectl graceful || apachectl restart', + restart => 'sleep 30 && apachectl graceful || apachectl restart', hasrestart => true, } } diff --git a/tests/noop/spec/hosts/api-proxy/api-proxy_spec.rb b/tests/noop/spec/hosts/api-proxy/api-proxy_spec.rb index 8f04b22fa1..64832c65fd 100644 --- a/tests/noop/spec/hosts/api-proxy/api-proxy_spec.rb +++ b/tests/noop/spec/hosts/api-proxy/api-proxy_spec.rb @@ -7,7 +7,7 @@ describe manifest do it { should contain_service('httpd').with( 'hasrestart' => true, - 'restart' => 'apachectl graceful || apachectl restart' + 'restart' => 'sleep 30 && apachectl graceful || apachectl restart' ) } end diff --git a/tests/noop/spec/hosts/astute/service_token_off_spec.rb b/tests/noop/spec/hosts/astute/service_token_off_spec.rb index f2aec92fa9..9bc2063ac8 100644 --- a/tests/noop/spec/hosts/astute/service_token_off_spec.rb +++ b/tests/noop/spec/hosts/astute/service_token_off_spec.rb @@ -20,7 +20,7 @@ describe manifest do :ensure => 'running', :name => service_name, :hasrestart => 'true', - :restart => 'apachectl graceful || apachectl restart' + :restart => 'sleep 30 && apachectl graceful || apachectl restart' ) end diff --git a/tests/noop/spec/hosts/ceph/radosgw_spec.rb b/tests/noop/spec/hosts/ceph/radosgw_spec.rb index 974e767311..fa35d45c2b 100644 --- a/tests/noop/spec/hosts/ceph/radosgw_spec.rb +++ b/tests/noop/spec/hosts/ceph/radosgw_spec.rb @@ -18,7 +18,7 @@ describe manifest do it { should contain_service('httpd').with( 'hasrestart' => true, - 'restart' => 'apachectl graceful || apachectl restart', + 'restart' => 'sleep 30 && apachectl graceful || apachectl restart', ) } diff --git a/tests/noop/spec/hosts/horizon/horizon_spec.rb b/tests/noop/spec/hosts/horizon/horizon_spec.rb index 789c5448fc..87955c4cf4 100644 --- a/tests/noop/spec/hosts/horizon/horizon_spec.rb +++ b/tests/noop/spec/hosts/horizon/horizon_spec.rb @@ -45,7 +45,7 @@ describe manifest do it { should contain_service('httpd').with( 'hasrestart' => true, - 'restart' => 'apachectl graceful || apachectl restart' + 'restart' => 'sleep 30 && apachectl graceful || apachectl restart' ) } diff --git a/tests/noop/spec/hosts/keystone/keystone_spec.rb b/tests/noop/spec/hosts/keystone/keystone_spec.rb index 00fb6eecf3..30a93943de 100644 --- a/tests/noop/spec/hosts/keystone/keystone_spec.rb +++ b/tests/noop/spec/hosts/keystone/keystone_spec.rb @@ -159,7 +159,7 @@ describe manifest do it { should contain_service('httpd').with( 'hasrestart' => true, - 'restart' => 'apachectl graceful || apachectl restart' + 'restart' => 'sleep 30 && apachectl graceful || apachectl restart' ) }