﻿# NUT secondary logout: shutdown initiation is not operating-system completion

Review HOSTSYNC, FINALDELAY and SHUTDOWNEXIT against actual workload shutdown before treating a NUT secondary disconnect as permission to remove shared power.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/upsmon-secondary-disconnect-shutdown/
Language: en

A NUT primary sees its secondary client disconnect and proceeds with its own shutdown. The secondary's database is still stopping. The connection event may mean the monitoring daemon exited after initiating shutdown, not that every protected workload finished. Review the handshake against the real service lifecycle.

## Name the observed acknowledgement

The [upsmon reference](https://networkupstools.org/docs/man/upsmon.html) describes the primary waiting for secondaries to disconnect before continuing. Record the client identity and observed logout separately from the secondary's shutdown-command invocation, service quiescence and final operating-system state. A network session disappearing cannot independently prove those later events. The [recovery budget guide](/journal/ups-runtime-recovery-budget/) establishes the broader action sequence; this review identifies which event the coordination protocol actually observes.

## Keep the timers distinct

The [configuration reference](https://networkupstools.org/docs/man/upsmon.conf.html) defines HOSTSYNC as a bounded wait for secondary disconnection. FINALDELAY instead separates shutdown notification from running the configured shutdown command. SHUTDOWNEXIT controls whether and when the daemon itself exits after initiating shutdown. Preserve effective settings and runtime version together. Extending one timer cannot automatically correct an acknowledgement emitted at the wrong application stage, and a finite timeout is not proof the secondary completed before it elapsed.

## Place heavy-service completion deliberately

The configuration documentation explicitly discusses secondaries whose virtual machines or databases take longer to stop. It describes deferring daemon exit so logout can occur after heavier workloads rather than immediately after shutdown initiation. Review the actual service-manager ordering and application stop evidence before relying on that design. This is not a universal instruction to disable daemon exit: the supported integration and remaining battery reserve determine which arrangement can complete safely and predictably.

## Include the failed-secondary path

HOSTSYNC prevents a primary from waiting forever for an unresponsive secondary. Record what the site expects when the timer expires, and distinguish that fallback from an acknowledged orderly sequence. Lost communication can resemble logout at another layer, so retain the actual NUT observation and host evidence. The [status evidence guide](/journal/guide-dc-nut-status-tokens/) explains why stale or unavailable reporting must remain distinguishable from a known hardware state.

## Exercise coordination without power removal

Use an isolated integration fixture with a delayed workload stop, observable shutdown invocation and controlled daemon lifecycle. Compare the normal completion path with a secondary that never reports readiness. Record notification, command, workload completion, logout and primary timeout in their actual order. Acceptance requires the intended acknowledgement boundary and a declared timeout response. No forced-shutdown command, battery discharge or power-control action on occupied equipment is needed to review this software contract.

## Preserve reserve as a separate constraint

Longer coordination still has to fit the available battery-backed interval. A more accurate acknowledgement does not create extra reserve, and a successful software exercise does not measure real battery runtime. Keep both evidence sets in the maintenance record. The useful conclusion states when the primary may continue under the chosen lifecycle and what remains uncertain after timeout. It does not call client disconnection a receipt that an operating system has already reached its final powered-down state.
