fix(sensor-proxy): skip selfheal reinstall when service is healthy
The selfheal timer was running the full installer every 5 minutes even when the service was already running and healthy. This caused unnecessary: - Pulse service restarts - Config migrations - Socket setup - 172MB memory spikes and 15s CPU usage per run Now the selfheal exits early after checking service health, only proceeding to reinstall logic if the service is actually failing. Fixes #849
This commit is contained in:
parent
b6cc57590a
commit
2209565eae
1 changed files with 7 additions and 0 deletions
|
|
@ -3523,6 +3523,13 @@ if ! command -v systemctl >/dev/null 2>&1; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
# Early exit if service is healthy - no work needed
|
||||
if systemctl is-active --quiet "${SERVICE}.service" 2>/dev/null; then
|
||||
# Service is running - only do control plane reconcile if needed, skip everything else
|
||||
attempt_control_plane_reconcile
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! systemctl list-unit-files 2>/dev/null | grep -q "^${SERVICE}\\.service"; then
|
||||
if [[ -x "$INSTALLER" && -f "$CTID_FILE" ]]; then
|
||||
log "Service unit missing; attempting reinstall"
|
||||
|
|
|
|||
Loading…
Reference in a new issue