4 changed files with 24 additions and 4 deletions
@ -0,0 +1,3 @@ |
|||||
|
[Service] |
||||
|
# Wait for the container to be removed before returning from stop |
||||
|
ExecStopPost=/bin/sh -c 'cid=$(podman ps -aq --filter label=PODMAN_SYSTEMD_UNIT=%n); [ -n "$cid" ] && podman wait --ignore --condition removing "$cid"; exit 0' |
||||
@ -0,0 +1,17 @@ |
|||||
|
[Service] |
||||
|
# Opt these model units OUT of the global wait-teardown drop-in shipped by the |
||||
|
# "base" cookbook (container.d/10-wait-teardown.conf), which makes `systemctl |
||||
|
# stop` block until Podman has finished tearing the container down. |
||||
|
# |
||||
|
# That global wait keeps a unit in the `deactivating` state for the whole |
||||
|
# teardown. It is the wrong behavior for the model units: llmsnap owns their |
||||
|
# lifecycle and drives rapid stop/start swaps over D-Bus, keying off |
||||
|
# `systemctl is-active` (which flips to inactive as soon as deactivation starts) |
||||
|
# and off the exit code of `systemctl stop` (its cmdStop). A widened |
||||
|
# `deactivating` window lets a subsequent `start` cancel the still-pending stop |
||||
|
# job, so cmdStop returns non-zero, the swap fails and `make test` fails with it. |
||||
|
# |
||||
|
# An empty assignment clears the inherited ExecStopPost (the global wait). |
||||
|
# Quadlet re-emits its own `podman rm` cleanup after the drop-ins, and the models |
||||
|
# always run with --rm, so the container is still removed — we only drop the wait. |
||||
|
ExecStopPost= |
||||
Loading…
Reference in new issue