-
Story
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
Pulp has a mechanism where an application starting up detects any running database migrations and blocks start up until that's done. This is a good practice because it prevents starting up in some undefined state. Foreman should implement the same thing.
Technically this is implemented by creating a well known DB lock when a migration starts. Then when an application starts up it checks for the existence of that lock.
This came up in https://github.com/theforeman/foremanctl/pull/249#pullrequestreview-3335748010 and https://github.com/theforeman/foremanctl/pull/114#issuecomment-2707003416, possibly in more places.
Acceptance criteria:
- Puma and dynflow wait for a migration if it's in progress and start normally after
Open questions:
- Should it also block on seeding to be done? If so, Foreman seeds on application start up which creates a risk of creating a bottleneck on starting up application servers.