Add new is-primary condition to autobackup timers

Avoids running these except on the primary coordinator at the time of
firing, to avoid duplicate runs being passed to pvcworkerd.
This commit is contained in:
Joshua Boniface 2024-08-25 22:18:20 -04:00
parent b395f47852
commit e35842675f
2 changed files with 2 additions and 0 deletions

View File

@ -5,4 +5,5 @@ Description=[Cron] PVC VM autobackup (forced-full)
Type=oneshot
IgnoreSIGPIPE=false
KillMode=process
ExecCondition=/usr/bin/pvc --quiet node is-primary
ExecStart=/usr/bin/pvc --quiet vm autobackup --cron --force-full {% if pvc_autobackup.reporting.enabled and pvc_autobackup.reporting.report_on.forced_full %}--email-report {{ pvc_autobackup.reporting.emails|join(',') }}{% endif %}

View File

@ -5,4 +5,5 @@ Description=[Cron] PVC VM autobackup (normal)
Type=oneshot
IgnoreSIGPIPE=false
KillMode=process
ExecCondition=/usr/bin/pvc --quiet node is-primary
ExecStart=/usr/bin/pvc --quiet vm autobackup --cron {% if pvc_autobackup.reporting.enabled and pvc_autobackup.reporting.report_on.normal %}--email-report {{ pvc_autobackup.reporting.emails|join(',') }}{% endif %}