puppet: Only restart PostgreSQL if there is a datadir to read.

This is specifically to support Kandra's `setup_disks`, which stops
PostgreSQL and moves the data directory out of the way while mounting
a new disk; restarting PostgreSQL would fail in this state.  We
install secrets and re-run puppet to finish bootstrapping the
database, all of which expects the PostgreSQL server to be stopped
anyways.
This commit is contained in:
Alex Vandiver 2024-04-17 20:54:45 +00:00 committed by Tim Abbott
parent 4be2abc55b
commit 311dfdaa38
1 changed files with 1 additions and 0 deletions

View File

@ -77,5 +77,6 @@ class zulip::profile::postgresql {
require => $require,
refreshonly => true,
subscribe => [ File[$postgresql_conf_file] ],
onlyif => "test -d ${zulip::postgresql_base::postgresql_datadir}",
}
}