librelad 2d1e4aa98f feat(health): self-healing control-plane watchdog + crash-loop failure cap
An offline trivy install crash-looped (server FATALs when it can't fetch the
vuln DB), and on rootless docker the restart storm churned the shared network's
port-forwarder until the WebUI's own published host port was torn down — the
WebUI stayed healthy INSIDE its container but was unreachable from the host, with
nothing detecting or healing it.

Three fixes, in the house self-healing style (mirrors the network-drift trio):

1. Control-plane health checker wired into the existing task-processor idle poll
   (maybeRegenPoll), no new daemon. dockerHealthScan (read-only) detects daemon
   down, a WebUI running-but-host-port-unreachable (the port-forward corruption),
   and crash-looping containers. webuiSystemHealthCheck writes
   frontend/data/system/health_status.json + self-dispatches a heal — the user
   can't click a button on a dead WebUI, so the poll drives the fix. Frontend
   health-notifier surfaces a topbar badge + dashboard banner + details panel.

2. Failure cap, enforced centrally by dockerHealthHeal (task-gated): stops
   crash-loopers (removing the churn), restarts the WebUI to re-publish a lost
   port forward, and — only if that fails — recycles the rootless daemon and
   restarts the core container. Caps every app immediately, no template churn.

3. Trivy no longer crash-loops offline: the server runs in a shell retry-loop so
   the container stays Up and quietly retries on a backoff instead of exiting
   FATAL. Verified: container stays Up across repeated DB-download failures.
   Core WebUI compose gains restart: unless-stopped so it self-recovers after a
   reboot / daemon recycle instead of staying down.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-07-17 22:03:02 +01:00

60 lines
2.8 KiB
Bash
Executable File

#!/bin/bash
# This file is auto-generated by generate_arrays.sh
# Do not edit manually - run './scripts/source/files/generate_arrays.sh run' to regenerate
webui_scripts=(
"webui/data/generators/apps/webui_app_config.sh"
"webui/data/generators/apps/webui_app_status.sh"
"webui/data/generators/apps/webui_config_patch.sh"
"webui/data/generators/apps/webui_config.sh"
"webui/data/generators/apps/webui_registry_scan.sh"
"webui/data/generators/apps/webui_services.sh"
"webui/data/generators/apps/webui_tools.sh"
"webui/data/generators/backup/webui_backup_app_status.sh"
"webui/data/generators/backup/webui_backup_dashboard.sh"
"webui/data/generators/backup/webui_backup_engines.sh"
"webui/data/generators/backup/webui_backup_locations.sh"
"webui/data/generators/backup/webui_backup_migrate.sh"
"webui/data/generators/backup/webui_backup_passwords.sh"
"webui/data/generators/backup/webui_backup_schema.sh"
"webui/data/generators/backup/webui_backup_snapshots.sh"
"webui/data/generators/backup/webui_task_create.sh"
"webui/data/generators/categories/webui_create_all_categories.sh"
"webui/data/generators/categories/webui_create_app_categories.sh"
"webui/data/generators/categories/webui_create_app_config_categories.sh"
"webui/data/generators/categories/webui_create_app_field_mappings.sh"
"webui/data/generators/config/webui_cli_config_set.sh"
"webui/data/generators/config/webui_generate_configs.sh"
"webui/data/generators/config/webui_update_config.sh"
"webui/data/generators/peers/webui_peers.sh"
"webui/data/generators/system/webui_ssh_access.sh"
"webui/data/generators/system/webui_system_disk.sh"
"webui/data/generators/system/webui_system_health.sh"
"webui/data/generators/system/webui_system_info.sh"
"webui/data/generators/system/webui_system_memory.sh"
"webui/data/generators/system/webui_system_metrics.sh"
"webui/data/generators/system/webui_system_network.sh"
"webui/data/generators/system/webui_system_update.sh"
"webui/data/generators/updater/webui_artifact_scan.sh"
"webui/data/generators/updater/webui_updater_scan.sh"
"webui/data/lock/webui_check_update_lock.sh"
"webui/data/lock/webui_create_update_lock.sh"
"webui/data/lock/webui_remove_setup_lock.sh"
"webui/data/lock/webui_remove_update_lock.sh"
"webui/data/logs/webui_app_logs.sh"
"webui/data/logs/webui_logs_folders.sh"
"webui/data/tasks/webui_task_files.sh"
"webui/data/utils/webui_app_icons.sh"
"webui/data/utils/webui_app_log.sh"
"webui/data/utils/webui_atomic_write.sh"
"webui/data/utils/webui_container_setup.sh"
"webui/webui_display_logins.sh"
"webui/webui_install_app.sh"
"webui/webui_install_image.sh"
"webui/webui_install_systemd.sh"
"webui/webui_regen.sh"
"webui/webui_updater.sh"
)