argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
14.98k stars 3.19k forks source link

containerSet: `failed to look-up entrypoint/cmd for image ""` `could not parse reference` #9863

Open LukaszRacon opened 2 years ago

LukaszRacon commented 2 years ago

Pre-requisites

What happened/what you expected to happen?

Running containerSet fails with error:

failed to look-up entrypoint/cmd for image "", you must either explicitly specify the command, or list the image's command in the index: https://argoproj.github.io/argo-workflows/workflow-executors/#emissary-emissary: could not parse reference:

Sample workflow:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: test
spec:
  entrypoint: main
  templates:
    - name: main
      containerSet:
        containers:
          - name: a
            image: argoproj/argosay:v2
            command: [ sh, -c ]
            args: [ echo, hi, /workspace/out ]
          - name: main
            image: argoproj/argosay:v2
            command: [ sh, -c ]
            args: [ echo, hi, /workspace/out ]

Version

v3.4.1 / helm chart 0.20.1

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.

curl -s https://raw.githubusercontent.com/argoproj/argo-workflows/master/examples/container-set-template/sequence-workflow.yaml | sed -E 's/generateName: sequence-/name: test/g' > sequence-wf.yaml
kubectl apply -f sequence-wf.yaml

Note: adding args and command attributes does not help.

Logs from the workflow controller

msg="Event(v1.ObjectReference{Kind:\"Workflow\", Namespace:\"default\", Name:\"test\", APIVersion:\"argoproj.io/v1alpha1\", ResourceVersion:\"19783990\", FieldPath:\"\"}): type: 'Normal' reason: 'WorkflowNodeRunning' Running node test: failed to look-up entrypoint/cmd for image \"\", you must either explicitly specify the command, or list the image's command in the index: https://argoproj.github.io/argo-workflows/workflow-executors/#emissary-emissary: could not parse reference: "

Logs from in your workflow's wait container

n/a

vitalyrychkov commented 2 years ago

Hi @LukaszRacon

I assume you are aware of the lookup breaking change in the 3.4.x: https://argoproj.github.io/argo-workflows/upgrading/#feat-add-entrypoint-lookup-fixes-8344

The implementation for config look-up was incorrect (it allowed you to specify args but not entrypoint). args has been removed to correct the behaviour.

We were going through this change recently, hope you'll adjust your workflows with a minimum effort.

LukaszRacon commented 2 years ago

Thank you for pointer to #8344. It looks like there is a different issue with containerSet.

I tested these:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: test
spec:
  entrypoint: main
  templates:
    - name: main
      containerSet:
        containers:
          - name: a
            image: docker/whalesay:latest
            command: [cowsay]
          - name: b
            image: docker/whalesay:latest
            command: [cowsay]
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: test
spec:
  entrypoint: main
  templates:
    - name: main
      containerSet:
        containers:
          - name: a
            image: docker/whalesay:latest
          - name: b
            image: docker/whalesay:latest

Both fail the same way failed to look-up entrypoint/cmd for image "", you must either explicitly specify the command, or list the image's command in the index: https://argoproj.github.io/argo-workflows/workflow-executors/#emissary-emissary: could not parse reference:

maxisam commented 2 years ago

base on https://github.com/argoproj/argo-workflows/commit/73ea7c72c99a073dbe3ec0a420e112945916fb94

command should be cmd

terrytangyuan commented 2 years ago

We discussed it here https://github.com/argoproj/argo-workflows/pull/8345#discussion_r849850826

maxisam commented 2 years ago

Weird. I just tested the workflow template in 3.4.1

command works cmd doesn't work

yriveiro commented 1 year ago

Hi,

I faced also this problem of failed to look-up entrypoint/cmd for image "" but in my case was when using podSpecPatchon the template.

If I remove podSpecPatch code from my ClusterWorkflowTemplate the error goes away.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.