[pmg-devel] [PATCH pmg-api] pmgsync.service: order before postfix at .service
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Apr 24 07:32:29 CEST 2020
On 4/23/20 10:21 AM, Stoiko Ivanov wrote:
> pmgsync.service updates the database-schema (pmgdb init) and generates and
> updates configuration files from the templates and reloads the respective
> services.
>
> When first booting up after installation, it adapts the config from what's
> shipped in the default debian packages for the first time.
>
> The postfix configuration is also rendered, including settings where a
> restart is necessary (listening on the internal port (26)).
>
> While the unit already starts before postfix.service, the postfix service
> files are designed to start multiple instances of postfix via instantiation
> (by default postfix at -.service is the single instance (and the service file
> which actually starts postfix)).
>
> Since both pmgsync and postfix at - have no ordering relation between them, they
> are started in parallel, which leads to postfix starting with the stock config
> upon first boot.
>
> Tested by running the installer in debug mode and applying this patch in the
> last debug shell.
>
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
> debian/pmgsync.service | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/debian/pmgsync.service b/debian/pmgsync.service
> index 3410e3a..8d0ee91 100644
> --- a/debian/pmgsync.service
> +++ b/debian/pmgsync.service
> @@ -8,6 +8,7 @@ After=remote-fs.target
> Wants=postgresql.service
> After=postgresql.service
> Before=postfix.service
> +Before=postfix at .service
> Before=clamav-daemon.service
> Before=clamav-freshclam.service
> Before=pmgdaemon.service
>
OK, doesn't works.. Albeit it is a bit strange, as it /should/ work with that.
I'll investigate and have a workaround in mind if that bears no fruits.
More information about the pmg-devel
mailing list