K2GO-450 fix(install): trust the Ansible PLAY RECAP, not stray [ERROR] lines - #631
Merged
Merged
Conversation
An abnormal seed death (unbound var under set -u, a sourced-file abort, any step that exits the shell) left the status stuck on "running", so the app polled a dead seed for ~20 min with no signal. An EXIT trap now flips a lingering "running" to "error" with a log breadcrumb; the app already treats "error" as failure, so it fails fast. dash-node 1.3.14 ships it via the Rebuild (no rebake). Cause-independent: the module-install seed failure root cause is still open (K2GO-450).
…tall path On module-install the forgejo role enables and restarts forgejo inside a transient proot that is then killed, so the live proot never starts the freshly-enabled service: the seed's wait_200 waits the whole window and fails with an empty log (admin never created; "a relaunch fixes it"). seed_forgejo now calls _fj_ensure_running first, which starts forgejo idempotently via pdsm (the sanctioned in-proot control, ADR-5343 section 10) when it is not already serving: no-op on the Full/boot path and when pdsm is absent. Not a duplicate owner: it invokes pdsm, the service owner, rather than a new flag or state. dash-node 1.3.14 ships it via the Rebuild (no rebake).
…dule-install path" This reverts commit 79dc91c.
…mal exit" This reverts commit d946fa2.
…] lines A forgejo module install succeeds (ansible failed=0, exit=0, forgejo reachable) but the forgejo role has an ignore_errors task that prints [ERROR]/fatal lines. AnsibleRunOutcome treated any [ERROR] as failure, so the install was marked FAILED (exit=0) and reverted, which gated out the repo seed: admin never created, no repos (the K2GO-450 symptom). The PLAY RECAP (unreachable=/failed=) is ansible's authoritative verdict: trust it when present, and fall back to the [ERROR]/crash signatures only when no recap was emitted (a crash before the summary, the original ADFA-4435 case). Shared by every ansible module install.
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.
Installing Forgejo as a module failed with "Couldn't install" even though the
install succeeded (Ansible PLAY RECAP failed=0, exit 0, Forgejo reachable). The
Forgejo role has an ignore_errors task that prints [ERROR]/fatal lines, and
AnsibleRunOutcome treated any [ERROR] as a failure, so the install was marked
FAILED, reverted, and the repo seed (gated behind a successful install) never
ran: no admin user, no example repos.
Change: AnsibleRunOutcome now treats the PLAY RECAP (unreachable=/failed=) as
ansible's authoritative verdict when present; the softer [ERROR] signal is used
only when no recap was emitted. Hard crash signatures (multiprocessing /
heartbeat) and a non-zero exit always fail, even after a clean recap. This is
the single shared verdict for every ansible module install.
Verification:
failed; real-failure recap -> failed; unreachable -> failed; crash after a
clean recap -> failed; crash/[ERROR] with no recap -> failed.
seed creates the admin + example repos (seed idle -> running -> done). The same
install false-failed before the fix.
Note on commits: the branch includes two earlier commits that took a wrong
approach (orchestration _fj_ensure_running + a seed.sh trap) plus their reverts;
the branch was already pushed, so they were reverted forward rather than
rewritten. The net diff is the AnsibleRunOutcome change.