Devstack forum doesn't start cleanly after make pull

Description

We often see devstack forums errors like this after pulling a new forum image:

1 2 ConnectionError at /courses/course-v1:Test+10004000+1/discussion/forum/ HTTPConnectionPool(host='edx.devstack.forum', port=4567): Max retries exceeded with url: /api/v1/users/9?complete=True&request_id=301282af-91e9-4771-ab5e-b7e4723ac8bb (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fe1fc36d6d0>: Failed to establish a new connection: [Errno 111] Connection refused',))

How to reproduce

1 2 3 4 5 make down make pull # see that you have a new forum image make dev.up make forum-logs

See that the ruby app did not start cleanly:

1 2 3 4 5 6 7 8 9 10 11 12 docker-compose logs -f --tail=500 forum Attaching to edx.devstack.forum edx.devstack.forum | /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/spec_set.rb:88:in `block in materialize': Could not find rake-12.0.0 in any of the sources (Bundler::GemNotFound) edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/spec_set.rb:82:in `map!' edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/spec_set.rb:82:in `materialize' edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/definition.rb:170:in `specs' edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/definition.rb:237:in `specs_for' edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/definition.rb:226:in `requested_specs' edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:108:in `block in definition_method' edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:20:in `setup' edx.devstack.forum | from /edx/app/forum/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/bundler.rb:107:in `setup' edx.devstack.forum | from app.rb:5:in `<main>'

Workaround

1 2 3 4 make forum-shell source forum/ruby_env && source forum/devstack_forum_env cd forum/cs_comments_service bundle install

...and then restart the forum container.

Note that I've seen this happen even when having the most recent version of cs_comments_service checked out in my devstack directory. Brian Beggs and I have taken a quick, informal look at this before - it looked like the ansible forum scripts did the right thing, but maybe it needs another look. The problem is that a bundle install never happened in the freshly pulled image.

Requirements
Determine where we need to fix this, either in configuration or in devstack, and then fix it.

Steps to Reproduce

None

Current Behavior

None

Expected Behavior

None

Reason for Variance

None

Release Notes

None

User Impact Summary

None

Status

Assignee

Unassigned

Reporter

Alex Dusenbery

Reach

None

Impact

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Category of Work

None

Stakeholders

None

Priority

CAT-3
Configure