17175: Wait for seedDatabase before starting railsapi.
authorTom Clegg <tom@curii.com>
Mon, 28 Dec 2020 20:33:33 +0000 (15:33 -0500)
committerTom Clegg <tom@curii.com>
Mon, 28 Dec 2020 20:33:33 +0000 (15:33 -0500)
commite4a6240bf2ca163c36a4357ef0f80958c40bd39a
treeb2f0ded47a5eb05587c5a3354ee0bdd338117e86
parent1917992733f0a467cd068bedfa236efd6f4c37bc
17175: Wait for seedDatabase before starting railsapi.

If the rake task and the app start concurrently, they both try to set
up the database seeds. The exclusive-locking mechanism in
services/api/app/lib/current_api_client.rb doesn't cover this case
because the rake task and app don't use the same cache. If the app
commits the database seeds between the rake task's "check existing"
and "commit" steps, commit fails and the rake task aborts.

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>
lib/boot/supervisor.go