Summary
A playbook stage whose container exits non-zero never fails the AgentPlaybookRun. The sandbox pod is created with restartPolicy: OnFailure, so the container restarts indefinitely — the pod never reaches a terminal phase, the Sandbox never reports a terminal reason, the stage AgentRun stays Running, and the playbook run hangs with subsequent stages Pending forever. The fail-fast semantics from #36 ("Fails the entire playbook run if any stage fails; subsequent stages are never started") are unreachable for exit-code failures.
The success path works correctly (verified: PodSucceeded → stage AgentRun Succeeded → next stage starts).
Environment
Reproduction
Two-stage playbook where stage 1's Agent image is a stub that fails:
FROM busybox:1.36
CMD ["sh","-c","echo failing; sleep 3; exit 1"]
apiVersion: konveyor.io/v1alpha1
kind: AgentPlaybook
metadata: {name: stub-playbook-fail}
spec:
stages:
- {name: doomed, agentRef: stub-fail}
- {name: never-runs, agentRef: stub-ok}
Observed: stage pod restarts repeatedly (restartPolicy=OnFailure, 4+ restarts observed, container state terminated exitCode=1 between restarts); Sandbox Ready=False reason=DependenciesNotReady ("Pod is Running but not Ready"); playbook run stuck phase=Running | doomed=Running never-runs=Pending for 2.5+ minutes until manually deleted. A control playbook with exit 0 stages completed in ~20s.
Expected: stage doomed → Failed, run phase=Failed, never-runs never started.
Possible directions
- Run-to-completion stage pods use
restartPolicy: Never (or a bounded retry, backoffLimit-style) so failure becomes observable.
- Alternatively/additionally, the AgentRun controller treats sustained
CrashLoopBackOff / repeated terminated-with-error states as failure.
- At minimum, document the constraint for stage image authors.
Happy to provide the full repro manifests or test against a patch.
Summary
A playbook stage whose container exits non-zero never fails the AgentPlaybookRun. The sandbox pod is created with
restartPolicy: OnFailure, so the container restarts indefinitely — the pod never reaches a terminal phase, the Sandbox never reports a terminal reason, the stage AgentRun staysRunning, and the playbook run hangs with subsequent stagesPendingforever. The fail-fast semantics from #36 ("Fails the entire playbook run if any stage fails; subsequent stages are never started") are unreachable for exit-code failures.The success path works correctly (verified:
PodSucceeded→ stage AgentRunSucceeded→ next stage starts).Environment
main@ fff23af (merge of ✨ Add AgentPlaybook and AgentPlaybookRun controllers #36), deployed on minikube (docker driver, cri-dockerd, Kubernetes v1.35.1)Reproduction
Two-stage playbook where stage 1's Agent image is a stub that fails:
Observed: stage pod restarts repeatedly (
restartPolicy=OnFailure, 4+ restarts observed, container state terminated exitCode=1 between restarts); SandboxReady=False reason=DependenciesNotReady("Pod is Running but not Ready"); playbook run stuckphase=Running | doomed=Running never-runs=Pendingfor 2.5+ minutes until manually deleted. A control playbook withexit 0stages completed in ~20s.Expected: stage
doomed→Failed, runphase=Failed,never-runsnever started.Possible directions
restartPolicy: Never(or a bounded retry, backoffLimit-style) so failure becomes observable.CrashLoopBackOff/ repeated terminated-with-error states as failure.Happy to provide the full repro manifests or test against a patch.