Skip to content
Snippets Groups Projects
Commit 9828ee07 authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Merge branch 'mailroom_restart' into 'master'

Mailroom restart

It is safe to restart mailroom every time GitLab restarts unicorn too so just add service restart if mailroom is enabled.

Fixes #1056

See merge request !622
parents 313611bd 887b9921
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,12 @@
# limitations under the License.
#
# IMPORTANT:
# When using template_symlink restarts property
# be aware that any additional "notifies :restart" outside of this property
# will be IGNORED.
# You must specify EITHER one restarts property OR multiple "notifies :restart"
define :template_symlink, :link_from => nil, :source => nil, :owner => nil, :group => nil, :mode => nil, :variables => nil, :helpers => nil, :notifies => nil, :restarts => [], :action => :create do
template params[:name] do
source params[:source]
......
......@@ -80,7 +80,8 @@
"unicorn",
"ci-unicorn",
"sidekiq",
"ci-sidekiq"
"ci-sidekiq",
"mailroom"
].each do |dummy|
service dummy do
supports []
......
......@@ -109,6 +109,7 @@
dependent_services = []
dependent_services << "service[unicorn]" if OmnibusHelper.should_notify?("unicorn")
dependent_services << "service[sidekiq]" if OmnibusHelper.should_notify?("sidekiq")
dependent_services << "service[mailroom]" if node['gitlab']['mailroom']['enable']
redis_not_listening = OmnibusHelper.not_listening?("redis")
postgresql_not_listening = OmnibusHelper.not_listening?("postgresql")
......@@ -238,9 +239,7 @@
)
)
restarts dependent_services
unless redis_not_listening
notifies :run, 'execute[clear the gitlab-rails cache]'
end
notifies :run, 'execute[clear the gitlab-rails cache]' unless redis_not_listening
end
template_symlink File.join(gitlab_rails_etc_dir, "rack_attack.rb") do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment