Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
3220ae83
Commit
3220ae83
authored
Feb 17, 2017
by
Robert Raposa
Committed by
GitHub
Feb 17, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3689 from edx/max/forums-block-on-validate
Sleep before attempting to restart forums
parents
c80bb060
6003f598
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
playbooks/roles/forum/defaults/main.yml
+4
-0
playbooks/roles/forum/templates/forum-supervisor.sh.j2
+8
-2
No files found.
playbooks/roles/forum/defaults/main.yml
View file @
3220ae83
...
...
@@ -40,6 +40,10 @@ FORUM_LISTEN_HOST: "0.0.0.0"
FORUM_LISTEN_PORT
:
"
4567"
FORUM_USE_TCP
:
false
# If forums fails to start because rake search:validate_index failed,
# wait this long before attempting to restart it
FORUM_RESTART_DELAY
:
60
forum_environment
:
RBENV_ROOT
:
"
{{
forum_rbenv_root
}}"
GEM_HOME
:
"
{{
forum_gem_root
}}"
...
...
playbooks/roles/forum/templates/forum-supervisor.sh.j2
View file @
3220ae83
...
...
@@ -6,7 +6,13 @@ cd {{ forum_code_dir }}
{
%
if
devstack %
}
{{
forum_rbenv_shims
}}
/ruby app.rb
{
%
elif
FORUM_USE_TCP %
}
{{
forum_binstubs_dir
}}
/unicorn
-c
config/unicorn_tcp.rb
{{
forum_binstubs_dir
}}
/unicorn
-c
config/unicorn_tcp.rb
-I
'.'
{
%
else
%
}
{{
forum_binstubs_dir
}}
/unicorn
-c
config/unicorn.rb
{{
forum_binstubs_dir
}}
/unicorn
-c
config/unicorn.rb
-I
'.'
{
% endif %
}
# If forums fails to start because elasticsearch isn't migrated, sleep so supervisord
# doesn't attempt to restart it immediately.
# 101 is the magic exit code forums uses to mean "rake search:validate_index failed"
exit_code
=
"
$?
"
[
"
$exit_code
"
-eq
101
]
&&
sleep
{{
FORUM_RESTART_DELAY
}}
&&
exit
"
$exit_code
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment