Repository navigation
[NO-JIRA] cloudbox lgtm-mono: a self-exit must not fail the unit; no failure page under the kill switch - #1070
Merged
Merged
Conversation
…ge under the kill switch ExecStop's docker stop fails when run.sh exits by itself (no container), which turned the kill switch's clean exit into a unit failure: a restart loop and a page whose advice (hand repos back to legacy) is wrong mid-incident. Seen once while exercising lgtm's kill-switch runbook.
johnnymo87
enabled auto-merge (squash)
December 2, 2026 05:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
While exercising lgtm's kill-switch runbook (lgtm-oqw2.35), a start of
lgtm-mono.servicewith the kill switch on behaved like this:run.shexited 0, as intended.ExecStop=docker stop lgtm-mono, which failed with "No such container".Restart=on-failureloop, andlgtm-mono-failurepaged.The page tells the reader to hand the repos back to legacy. That is the wrong advice during an incident.
What
ExecStopgets the-prefix. Ifrun.shexits by itself, there is no container to stop, and that must not fail the unit. The unit's result still comes from ExecStart's exit status.<serviceDir>/kill-switch.jsonexists.Switch impact
Only the lgtm-mono units change. The unit has
restartIfChanged = false, so the switch neither restarts nor stops the running container. The new ExecStop takes effect at the unit's next start.