kandra: Ensure that we do not error out creating standby.signal.

Force us to have restored the `/var/lib/postgresql/14/main` directory
before we try to create `standby.signal` in it.
This commit is contained in:
Alex Vandiver 2024-08-20 17:39:51 +00:00 committed by Tim Abbott
parent 49e5722a9f
commit 6cc480e2b5
2 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,7 @@ class kandra::profile::postgresql inherits kandra::profile::base {
require => [File['/usr/local/bin/env-wal-g'], Exec['setup_disks']], require => [File['/usr/local/bin/env-wal-g'], Exec['setup_disks']],
unless => "test -d /srv/data/postgresql/${zulip::postgresql_common::version}/main", unless => "test -d /srv/data/postgresql/${zulip::postgresql_common::version}/main",
timeout => 0, timeout => 0,
before => File["${zulip::postgresql_base::postgresql_datadir}/standby.signal"],
notify => Exec[$zulip::postgresql_base::postgresql_restart], notify => Exec[$zulip::postgresql_base::postgresql_restart],
} }
} }

View File

@ -59,6 +59,7 @@ class zulip::profile::postgresql {
file { "${zulip::postgresql_base::postgresql_datadir}/standby.signal": file { "${zulip::postgresql_base::postgresql_datadir}/standby.signal":
ensure => file, ensure => file,
require => Package[$zulip::postgresql_base::postgresql], require => Package[$zulip::postgresql_base::postgresql],
before => Exec[$zulip::postgresql_base::postgresql_restart],
owner => 'postgres', owner => 'postgres',
group => 'postgres', group => 'postgres',
mode => '0644', mode => '0644',