Reverts the shape of the previous commit without reverting its finding. The pull
keeps its own unit -- it can be long, and its duration has no business inside the
container's start time -- and the container keeps After= on it, so the pull still
runs first on a boot where the network is there. What changes is the strength of
the dependency.
Measured on the radio head rather than assumed, because the obvious fix does not
work: Restart=on-failure on the .image unit makes the PULL converge and leaves
the container inactive for good. A failed dependency is never retried -- the
dependent job dies at the first failure, and the later successful restart of the
required unit does not re-trigger it. Upholds= on the pull unit does pick the
container up, at the price of a container that can no longer be stopped on its
own, and it still leaves the container down for as long as the registry is
unreachable even though the image is right there.
So: Image= names the reference, which is what keeps quadlet from generating the
Requires=, and the container declares Wants= + After= on the pull unit itself.
The pull unit gains Restart=on-failure with StartLimitIntervalSec=0, so a machine
that boots without a network ends up with the image instead of a stale one, and
PartOf=zwave-js-ui.target so stopping the target leaves nothing retrying.
Verified on the target, booted with ghcr.io pointed at 127.0.0.1: the container
starts from local storage and reports healthy while the pull unit retries, then
the pull converges on its own after two restarts once resolution is restored, and
nothing is left in systemctl --failed.
The image reference now appears in both files, on purpose. The alternative -- a
drop-in resetting the generated Requires= -- has to restate the container's other
requirements and silently drops any a later edit adds. That trap is worse.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>