From 311dfdaa386d7560e6fdc9847f629da8d4de3ea3 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Wed, 17 Apr 2024 20:54:45 +0000 Subject: [PATCH] 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. --- puppet/zulip/manifests/profile/postgresql.pp | 1 + 1 file changed, 1 insertion(+) diff --git a/puppet/zulip/manifests/profile/postgresql.pp b/puppet/zulip/manifests/profile/postgresql.pp index 3af4fdb690..891da04a28 100644 --- a/puppet/zulip/manifests/profile/postgresql.pp +++ b/puppet/zulip/manifests/profile/postgresql.pp @@ -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}", } }