Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Reset poisoned demo incident replay

pulse-triage[bot]5686069d6e46
diff --git a/.github/scripts/recover-demo-runtime.sh b/.github/scripts/recover-demo-runtime.sh
index ab8969629b..13b266ec1d 100755
--- a/.github/scripts/recover-demo-runtime.sh
+++ b/.github/scripts/recover-demo-runtime.sh
@@ -28,6 +28,14 @@ EXPECTED_BINARY="/opt/pulse/bin/pulse"
EXPECTED_UNIT="/etc/systemd/system/pulse.service"
MUTATED=false
BACKUP_DIR=""
+HISTORY_BACKUP_ARCHIVE=""
+DEMO_HISTORY_PATHS=(
+ ai_incidents.json
+ ai_incidents.json.tmp
+ alerts/events.db
+ alerts/events.db-shm
+ alerts/events.db-wal
+)
for fixture_count in \
"$MOCK_NODES" \
@@ -113,10 +121,43 @@ cleanup_config_backup() {
[ -n "$BACKUP_DIR" ] || return 0
sudo unlink "$BACKUP_DIR/runtime.env" 2>/dev/null || true
sudo unlink "$BACKUP_DIR/billing.json" 2>/dev/null || true
+ if [ -n "$HISTORY_BACKUP_ARCHIVE" ]; then
+ sudo unlink "$HISTORY_BACKUP_ARCHIVE" 2>/dev/null || true
+ HISTORY_BACKUP_ARCHIVE=""
+ fi
rmdir "$BACKUP_DIR" 2>/dev/null || true
BACKUP_DIR=""
}
+clear_demo_operational_history() {
+ local rel_path
+ local -a existing=()
+ for rel_path in "${DEMO_HISTORY_PATHS[@]}"; do
+ if sudo test -f "/etc/pulse/${rel_path}"; then
+ existing+=("$rel_path")
+ fi
+ done
+ ((${#existing[@]} > 0)) || return 0
+
+ HISTORY_BACKUP_ARCHIVE="$BACKUP_DIR/demo-operational-history.tar"
+ sudo tar --create --preserve-permissions \
+ --file "$HISTORY_BACKUP_ARCHIVE" --directory /etc/pulse -- "${existing[@]}"
+ for rel_path in "${existing[@]}"; do
+ sudo unlink "/etc/pulse/${rel_path}"
+ done
+}
+
+restore_demo_operational_history() {
+ local rel_path
+ [ -n "$HISTORY_BACKUP_ARCHIVE" ] || return 0
+ sudo test -f "$HISTORY_BACKUP_ARCHIVE" || return 0
+ for rel_path in "${DEMO_HISTORY_PATHS[@]}"; do
+ sudo unlink "/etc/pulse/${rel_path}" 2>/dev/null || true
+ done
+ sudo tar --extract --preserve-permissions \
+ --file "$HISTORY_BACKUP_ARCHIVE" --directory /etc/pulse
+}
+
restore_runtime_config() {
[ -n "$BACKUP_DIR" ] || return 0
sudo cp --archive "$BACKUP_DIR/runtime.env" /etc/pulse/.env
@@ -264,6 +305,7 @@ rollback_on_error() {
log "recovery validation failed; compensating by stopping only pulse.service"
sudo systemctl stop "$SERVICE_NAME" || true
restore_runtime_config || true
+ restore_demo_operational_history || true
fi
emit_evidence compensated_unavailable "$BEFORE_PID" \
"$(systemctl show "$SERVICE_NAME" --property=MainPID --value || true)" \
@@ -302,6 +344,12 @@ set_env_value PULSE_MOCK_TRENDS_SAMPLE_INTERVAL "$MOCK_SAMPLE_INTERVAL"
set_env_value PULSE_MOCK_UPDATE_INTERVAL "$MOCK_UPDATE_INTERVAL"
sudo chown pulse:pulse /etc/pulse/.env
sudo chmod 600 /etc/pulse/.env
+# Alert lifecycle and AI incident history on this host are generated demo
+# operational memory. A failed 50-node bootstrap can leave thousands of
+# lifecycle events whose v6.4 replay queues one serialized incident save per
+# event before HTTP opens. Back up and clear only those fixed demo-history
+# files; compensation restores them if the bounded profile still fails.
+clear_demo_operational_history
sudo systemctl restart "$SERVICE_NAME"
for _ in $(seq 1 12); do
diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.md
index 4ccf5b1fe8..0a244f738e 100644
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@ -2049,6 +2049,14 @@ it, retaining a bounded Go goroutine dump instead of guessing which persisted
store is blocking synchronous startup. Diagnostics run after compensation-safe
recovery failure, carry a hard SSH timeout, and remain part of the existing
14-day recovery artifact rather than widening the recovery mutation boundary.
+The retained stack for run `33229793872` proved that the failed large bootstrap
+left more than 5,000 `IncidentStore.saveAsync` goroutines contending on one
+persistence mutex while durable mock alert lifecycle events were replayed.
+Stable-demo recovery therefore archives and clears only the fixed generated
+demo operational-memory files (`ai_incidents.json` and `alerts/events.db` plus
+SQLite sidecars) before restart. A failed bounded restart restores that archive;
+success discards it. Customer configuration, active-alert recovery state,
+metrics history, the binary, unit, and Relay remain outside this reset.
The preceding `v6.4.0-rc.8` qualification attempt used exact source SHA
`bac7e5d9526d76a6b4e34738511b07609dda80ed`. Release run `33128595650`
diff --git a/scripts/release_control/release_promotion_policy_test.py b/scripts/release_control/release_promotion_policy_test.py
index d39199c21f..d8e3c8e005 100644
--- a/scripts/release_control/release_promotion_policy_test.py
+++ b/scripts/release_control/release_promotion_policy_test.py
@@ -2125,6 +2125,12 @@ class ReleasePromotionPolicyTest(unittest.TestCase):
self.assertIn('sudo systemctl restart "$SERVICE_NAME"', recovery)
self.assertIn('sudo systemctl stop "$SERVICE_NAME"', recovery)
self.assertIn('sudo kill -QUIT "$failed_pid"', recovery)
+ self.assertIn("clear_demo_operational_history", recovery)
+ self.assertIn("restore_demo_operational_history", recovery)
+ self.assertIn("alerts/events.db", recovery)
+ self.assertIn("ai_incidents.json", recovery)
+ self.assertIn("demo-operational-history.tar", recovery)
+ self.assertNotIn('rm -f "/etc/pulse/', recovery)
self.assertIn('AFTER_RELAY_PID" = "$BEFORE_RELAY_PID', recovery)
self.assertIn('AFTER_BINARY_SHA" = "$BEFORE_BINARY_SHA', recovery)
self.assertIn('AFTER_UNIT_SHA" = "$BEFORE_UNIT_SHA', recovery)