openvibers/openvibe.host Commits

Data role: a running full backup is seen as running. A oneshot unit reads 'activating' while it runs, which is-active does not count, so the step now reads ActiveState and treats active or activating as a backup in progress (starting it again was harmless, since systemd joins the running job, but the log said otherwise).

OP OpenVibers committed 28 Sept 2026 · 63c38aa9e0 · 1 file, +3 −1


Changes

ddiff --git a/roles/data/provision.sh b/roles/data/provision.sh
iindex af53e76..ee6ca39 100755
---- a/roles/data/provision.sh
++++ b/roles/data/provision.sh
@@@ -178,7 +178,9 @@ if [ "$HAVE_REPO" = 1 ]; then
runuser -u postgres -- pgbackrest --stanza=openvibe check
code=2
fi
-- if [ "$code" = 2 ] && ! systemctl is-active -q [email protected]; then
++ # A oneshot unit reads "activating" while it runs; either state means a backup is in progress.
++ state=$(systemctl show -p ActiveState --value [email protected] 2>/dev/null || true)
++ if [ "$code" = 2 ] && [ "$state" != active ] && [ "$state" != activating ]; then
log "no valid backup yet: starting a full backup ([email protected])"
systemctl start --no-block [email protected]
elif [ "$code" != 0 ] && [ "$code" != 2 ]; then