Skip to content

Commit

Permalink
Always run pulpcore-manager migrate
Browse files Browse the repository at this point in the history
Pulpcore uses post migration hooks to create data in the database, which
sometimes changes even if there are no real migrations to be run.

This is fine from a Django PoV -- post migration hooks run after every
`migrate` call, even if there have been no changes.

However, this means that we need to run `migrate` unconditionally as
otherwise we might miss changes to the hooks (or their data) when there
is no migration attached.

An example of such a change is
pulp/pulpcore@20cffca
where a new role was introduced and our setup started failing as it was
expecting the role to exist after the upgrade, but it did not as we did
not call `migrate`.
  • Loading branch information
evgeni committed Aug 13, 2024
1 parent 3258e78 commit 5750cff
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion manifests/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

pulpcore::admin { 'migrate --noinput':
timeout => $timeout,
unless => 'pulpcore-manager migrate --check',
refreshonly => false,
}

Expand Down

0 comments on commit 5750cff

Please sign in to comment.