﻿# RestartMode=direct changes which failure transitions dependencies observe

RestartMode=direct changes which failure transitions dependencies observe. A focused service-reliability guide with the documented mechanism, a reproducible validation scenario, evidence and operational limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/sre-restart-direct-failure-transition/
Language: en

RestartMode=direct changes the lifecycle transitions visible during an automatic restart. It does not make the underlying service failure disappear. An inference monitoring setup that relies only on normal failed-state hooks can therefore observe a different incident record after this setting changes, even when users experience the same interruption.

## The service-manager contract

The service documentation describes direct transition into activating during auto-restart, skipping failed and inactive states. OnSuccess and OnFailure are skipped, while ExecStopPost still runs. Dependent units are not notified of these temporary failures under the documented mode. These are observable control-flow consequences, not an improvement in model-output correctness or a replacement for restart eligibility and rate limits. Installed support must be established before interpreting the configuration because current documentation alone does not prove the target manager implements the selected mode.

## Implementation details

Record restart mode with the monitoring and dependency contract. Keep application failures and restart attempts observable through evidence that does not depend solely on the skipped transition hooks. Verify what downstream units should do during the temporary outage rather than assuming normal failure propagation remains unchanged. Observe eventual initialization and useful readiness after restart. Do not compare hook counts across modes as though they measured the same event population without accounting for the changed lifecycle. Preserve stop-post behavior independently so cleanup expectations are not accidentally removed with failure notifications.

## A constructed validation case

Use a disposable failing service with recorded normal and direct restart configurations on a supporting manager. Compare state transitions, dependency observations, hook execution and application interruption as separate outputs. Verify that stop-post remains part of the tested path and that eventual readiness is independently established. Acceptance requires the documented lifecycle and honest monitoring interpretation, not a lower incident count obtained by suppressing the only observation channel. Preserve effective mode and manager version with the evidence before generalizing a recovery result to an inference pool.

## Recovery limits

Direct restart can be a deliberate dependency policy. It is not continuous availability or fault correction by itself. Keep user-visible service results and process recovery evidence separate from manager transition counts when evaluating whether a systemd configuration actually improves the reliability of AI inference.

## Primary references

[systemd systemd.service documented interface](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html); [systemd systemd.unit documented interface](https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html).

This is a proposed service-lifecycle validation, not an executed Retrivium benchmark. Preserve the implementation version and unresolved outcomes; interface documentation does not establish the availability or correctness of an inference service.

## Related reading

[Desynchronize automatic service restarts with the supported systemd delay](/journal/guide-dc-systemd-restart-random-delay/); [Terminal request records: reconcile stream, usage and logs](/journal/provider-terminal-request-record-consistency/).
