Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-39244

Detect running database migrations in Foreman

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • Installation, Upgrades
    • None
    • None
    • 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.

              Unassigned Unassigned
              ekohlvan@redhat.com Ewoud Kohl van Wijngaarden
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: