Fix backup check notifications and workload recovery; release 2026.09.21.r001

This commit is contained in:
Mikei386
2026-09-21 20:36:31 +02:00
parent 8f75a04db6
commit 5009dc202b
14 changed files with 295 additions and 38 deletions
+1 -1
View File
@@ -48,5 +48,5 @@ rm -f \
"$ROOT_PREFIX/var/log/$OLD_NAME.log"
if [ -x "$ROOT_PREFIX/etc/rc.d/rc.urbm" ]; then
"$ROOT_PREFIX/etc/rc.d/rc.urbm" restart || true
"$ROOT_PREFIX/etc/rc.d/rc.urbm" restart
fi
+14 -8
View File
@@ -6,7 +6,9 @@ LOGFILE=/var/log/urbm.log
is_daemon_pid() {
PID=${1:-}
[ -n "$PID" ] && [ "$(readlink -f "/proc/$PID/exe" 2>/dev/null)" = "$DAEMON" ]
[ -n "$PID" ] || return 1
EXE=$(readlink "/proc/$PID/exe" 2>/dev/null)
[ "$EXE" = "$DAEMON" ] || [ "$EXE" = "$DAEMON (deleted)" ]
}
start() {
@@ -35,11 +37,14 @@ stop() {
PID=$(cat "$PIDFILE")
if is_daemon_pid "$PID"; then
kill "$PID" 2>/dev/null || true
for _ in $(seq 1 30); do
for _ in $(seq 1 300); do
is_daemon_pid "$PID" || break
sleep 1
done
is_daemon_pid "$PID" && kill -9 "$PID" 2>/dev/null || true
if is_daemon_pid "$PID"; then
echo "urbmd is still recovering workloads; refusing to force-kill it" >&2
return 1
fi
STOPPED=1
fi
rm -f "$PIDFILE"
@@ -49,13 +54,14 @@ stop() {
for PID in $PIDS; do
kill "$PID" 2>/dev/null || true
done
for _ in $(seq 1 30); do
for _ in $(seq 1 300); do
[ -z "$(pidof urbmd 2>/dev/null)" ] && break
sleep 1
done
for PID in $(pidof urbmd 2>/dev/null); do
kill -9 "$PID" 2>/dev/null || true
done
if [ -n "$(pidof urbmd 2>/dev/null)" ]; then
echo "urbmd is still recovering workloads; stop did not complete" >&2
return 1
fi
fi
rm -f /run/urbm/urbm.sock
}
@@ -63,7 +69,7 @@ stop() {
case "${1:-}" in
start) start ;;
stop) stop ;;
restart) stop; start ;;
restart) stop && start ;;
status)
if [ -s "$PIDFILE" ] && is_daemon_pid "$(cat "$PIDFILE")"; then echo "urbmd is running"; else echo "urbmd is stopped"; exit 1; fi
;;
+10 -2
View File
@@ -2,13 +2,21 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "urbm">
<!ENTITY author "Michael Roll">
<!ENTITY version "2026.07.13.r012">
<!ENTITY version "2026.09.21.r001">
<!ENTITY pluginURL "https://git.casaderoll.de/michael/URBM/raw/branch/main/dist/urbm.plg">
<!ENTITY packageURL "https://git.casaderoll.de/michael/URBM/raw/branch/main/dist/urbm-&version;-x86_64-1.txz">
<!ENTITY packageSHA256 "REPLACE_DURING_RELEASE">
]>
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" min="7.0.0" support="https://git.casaderoll.de/michael/URBM/issues" icon="urbm.png">
<CHANGES>
### 2026.09.21.r001
- Notify on successful and failed repository checks; complete notification attempts before finishing a task.
- Preserve stopped Docker/VM workloads and refuse ambiguous paused or restarting states.
- Recover each previously running workload with its own timeout, including cancellation and partial preparation failures.
- Include named Docker volumes and reject persistent mounts without a usable source path.
- Avoid force-killing the daemon during workload recovery and prevent overlapping daemon restarts.
- Add regression coverage for check notifications, volume discovery, state preservation and recovery failures.
### 2026.07.13.r012
- Draw a separate color-coded line and legend entry for every backup job when the dashboard filter is set to all jobs.
- Base dashboard health on successful backups, failed backup attempts, active work, and timezone-aware overdue schedules instead of unrelated maintenance or restore successes.
@@ -402,7 +410,7 @@ chmod 0700 /boot/config/plugins/&name;
</FILE>
<FILE Run="/bin/bash" Method="remove">
<INLINE>
/etc/rc.d/rc.urbm stop || true
/etc/rc.d/rc.urbm stop || exit 1
removepkg &name;
rm -rf /usr/local/emhttp/plugins/&name; /usr/local/libexec/&name; /usr/local/sbin/urbmd /etc/rc.d/rc.urbm /run/urbm /var/lib/urbm
</INLINE>