Description
Pre-requisites
- I have double-checked my configuration
- I can confirm the issues exists when I tested with
:latest
- I'd like to contribute the fix myself (see contributing guide)
What happened/what you expected to happen?
When i submit a workflow with an initcontainer and if that initcontainer fails workflows stuck at running state. I expect workflow to fail.
Version
v.3.4.5
Paste a small workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflows that uses private images.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: init-fail
spec:
entrypoint: init-container-example
templates:
- name: init-container-example
container:
image: alpine:latest
command: ["echo", "bye"]
volumeMounts:
- name: foo
mountPath: /foo
initContainers:
- name: hello
image: alpine:latest
command: ["abcd"]
mirrorVolumeMounts: true
volumes:
- name: foo
emptyDir: {}
Logs from the workflow controller
time="2023-03-20T19:35:43.494Z" level=info msg="Processing workflow" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:43.497Z" level=info msg="Updated phase -> Running" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:43.498Z" level=info msg="Pod node init-fail initialized Pending" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:43.524Z" level=info msg="Created pod: init-fail (init-fail)" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:43.524Z" level=info msg="TaskSet Reconciliation" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:43.524Z" level=info msg=reconcileAgentPod namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:43.530Z" level=info msg="Workflow update successful" namespace=henkan-argo-test-flows phase=Running resourceVersion=250900670 workflow=init-fail
time="2023-03-20T19:35:46.527Z" level=info msg="Processing workflow" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:46.528Z" level=info msg="Task-result reconciliation" namespace=henkan-argo-test-flows numObjs=0 workflow=init-fail
time="2023-03-20T19:35:46.528Z" level=info msg="node changed" namespace=henkan-argo-test-flows new.message=PodInitializing new.phase=Pending new.progress=0/1 nodeID=init-fail old.message= old.phase=Pending old.progress=0/1 workflow=init-fail
time="2023-03-20T19:35:46.528Z" level=info msg="TaskSet Reconciliation" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:46.528Z" level=info msg=reconcileAgentPod namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:46.535Z" level=info msg="Workflow update successful" namespace=henkan-argo-test-flows phase=Running resourceVersion=250900702 workflow=init-fail
time="2023-03-20T19:35:49.536Z" level=info msg="Processing workflow" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:49.537Z" level=info msg="Task-result reconciliation" namespace=henkan-argo-test-flows numObjs=0 workflow=init-fail
time="2023-03-20T19:35:49.537Z" level=info msg="Pod failed: Pod failed before main container starts" displayName=init-fail namespace=henkan-argo-test-flows pod=init-fail templateName=init-container-example workflow=init-fail
time="2023-03-20T19:35:49.537Z" level=info msg="leaving phase un-changed: wait container is not yet terminated " namespace=henkan-argo-test-flows new.phase=Error workflow=init-fail
time="2023-03-20T19:35:49.537Z" level=info msg="node changed" namespace=henkan-argo-test-flows new.message="Pod failed before main container starts" new.phase=Pending new.progress=0/1 nodeID=init-fail old.message=PodInitializing old.phase=Pending old.progress=0/1 workflow=init-fail
time="2023-03-20T19:35:49.537Z" level=info msg="TaskSet Reconciliation" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:49.537Z" level=info msg=reconcileAgentPod namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:49.546Z" level=info msg="Workflow update successful" namespace=henkan-argo-test-flows phase=Running resourceVersion=250900729 workflow=init-fail
time="2023-03-20T19:35:52.547Z" level=info msg="Processing workflow" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:52.548Z" level=info msg="Task-result reconciliation" namespace=henkan-argo-test-flows numObjs=0 workflow=init-fail
time="2023-03-20T19:35:52.548Z" level=info msg="Pod failed: Pod failed before main container starts" displayName=init-fail namespace=henkan-argo-test-flows pod=init-fail templateName=init-container-example workflow=init-fail
time="2023-03-20T19:35:52.548Z" level=info msg="leaving phase un-changed: wait container is not yet terminated " namespace=henkan-argo-test-flows new.phase=Error workflow=init-fail
time="2023-03-20T19:35:52.548Z" level=info msg="node unchanged" namespace=henkan-argo-test-flows nodeID=init-fail workflow=init-fail
time="2023-03-20T19:35:52.548Z" level=info msg="TaskSet Reconciliation" namespace=henkan-argo-test-flows workflow=init-fail
time="2023-03-20T19:35:52.548Z" level=info msg=reconcileAgentPod namespace=henkan-argo-test-flows workflow=init-fail
Logs from in your workflow's wait container
Error from server (BadRequest): container "wait" in pod "init-fail" is waiting to start: PodInitializing