[pmg-devel] superseded: [PATCH pmg-api master v1] systemd: fix report services failing if triggered to early by timers
Max R. Carrara
m.carrara at proxmox.com
Tue Sep 23 18:49:07 CEST 2025
v2: https://lore.proxmox.com/pmg-devel/20250923164723.532488-1-m.carrara@proxmox.com/
On Tue Sep 23, 2025 at 5:19 PM CEST, Max R. Carrara wrote:
> Currently, the `pmgreport.service` and `pmgspamreport.service` units
> might fail if their corresponding timers activate them too early.
>
> To elaborate, both timers have `Persistent=true` in addition to their
> `OnCalendar` option. `Persistent=true` means that the timer's service
> unit will be triggered immediately when the timer is activated, but
> only if it would have been triggered while the timer was inactive [0].
>
> Since the timers are activated relatively early, they might trigger
> their service units before postfix.service and postgresql.service have
> come up, causing `pmgreport.service`, or `pmgspamreport.service`, or
> both of them to fail.
>
> Fix this by letting both service units wait until postfix and postgres
> are up, which are necessary for the units to run successfully. Do this
> by adding the `After` and `Wants` options for `postfix.service` and
> `postgresql.service` to both service units.
>
> [...]
More information about the pmg-devel
mailing list