A command's return status
· no-op-reported-as-action · observed
enable --now does not restart an already-running unit
NS-005
observedno-op-reported-as-action
enable --now does not restart an already-running unit
- reads as
- The command exits zero and the service is active. Conclusion drawn: the new code is live.
- actually
- systemctl enable --now starts a stopped unit. On a running one it is a no-op. The old process, with the old ExecStart, survives.
- blind because
- Exit code zero and `active (running)` are true statements about the wrong process.
- the check
- Compare the unit's ExecStart on disk against the live process: systemctl show -p ExecStart NAME and ps -p $MAINPID -o args=
- cost of missing
- A deploy is reported as complete twice while the previous binary keeps serving.
- generalises to
- Any idempotent-looking command whose semantics differ by current state.
Reported as
Others this instrument misses
- NS-008 — set -e aborts a script at a validation step that concerns something else
- NS-013 — A teardown script destroys the environment it is executing inside
- NS-014 — A privilege prompt with nowhere to appear hangs instead of failing
- NS-015 — A pipeline returns the status of its last command, not its failing one
- NS-016 — curl exits zero after successfully downloading an error page
plain text ·
full registry