Skip to content

Commit 85b8acd

Browse files
committed
Fixes #38517 - Ensure Redis is running before db:migrate
In some cases a database migration can reach out to Redis. It should fail gracefully if Redis isn't available, but it's better to ensure it is available.
1 parent 86e73d2 commit 85b8acd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

manifests/config.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
include redis
1414
$dynflow_redis_url = "redis://localhost:${redis::port}/6"
1515
Class['redis'] -> Service <| tag == 'foreman::dynflow::worker' |>
16+
Class['redis'] -> Foreman::Rake <| tag == 'db:migrate' |>
1617
}
1718

1819
file { '/etc/foreman/dynflow':

spec/classes/foreman_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
it { should contain_foreman__rake('db:seed') }
132132

133133
# jobs
134-
it { should contain_class('redis') }
134+
it { should contain_class('redis').that_comes_before('Foreman::Rake[db:migrate]') }
135135
it { should contain_redis__instance('default') }
136136
it { should contain_file('/etc/foreman/dynflow').with_ensure('directory') }
137137
it {

0 commit comments

Comments
 (0)