Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline pods don't seem to generate a correct pod name that conforms to the standard naming convention #10912

Closed
2 of 3 tasks
n9 opened this issue Apr 14, 2023 · 6 comments · Fixed by #10921
Closed
2 of 3 tasks
Assignees
Labels

Comments

@n9
Copy link

n9 commented Apr 14, 2023

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?

Workflow creates a pod with name containing double -. But it expects that the pod contains just one -.

image

It is visible e.g. in logs:

chrome_XNs0jNBC7r

Version

v3.4.7

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: wflbugdemo
  namespace: argo
spec:
  entrypoint: entrypoint
  templates:
    - name: entrypoint
      dag:
        tasks:
          - name: inline
            inline:
              container:
                name: inline
                image: alpine
                command:
                  - /bin/sh
                  - -c
                  - echo "Hello World"

Logs from the workflow controller

time="2023-04-14T14:20:41.878Z" level=info msg="Processing workflow" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:41.880Z" level=info msg="Updated phase  -> Running" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:41.880Z" level=info msg="DAG node wflbugdemo initialized Running" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:41.880Z" level=info msg="All of node wflbugdemo.inline dependencies [] completed" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:41.881Z" level=info msg="Pod node wflbugdemo-3207486052 initialized Pending" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:41.892Z" level=info msg="Created pod: wflbugdemo.inline (wflbugdemo--3207486052)" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:41.892Z" level=info msg="TaskSet Reconciliation" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:41.892Z" level=info msg=reconcileAgentPod namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:41.923Z" level=info msg="Workflow update successful" namespace=argo phase=Running resourceVersion=23734317 workflow=wflbugdemo
time="2023-04-14T14:20:51.896Z" level=info msg="Processing workflow" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:51.896Z" level=info msg="Task-result reconciliation" namespace=argo numObjs=0 workflow=wflbugdemo
time="2023-04-14T14:20:51.896Z" level=info msg="node changed" namespace=argo new.message= new.phase=Succeeded new.progress=0/1 nodeID=wflbugdemo-3207486052 old.message= old.phase=Pending old.progress=0/1 workflow=wflbugdemo
time="2023-04-14T14:20:51.896Z" level=info msg="Outbound nodes of wflbugdemo set to [wflbugdemo-3207486052]" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:51.896Z" level=info msg="node wflbugdemo phase Running -> Succeeded" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:51.896Z" level=info msg="node wflbugdemo finished: 2023-04-14 14:20:51.896655584 +0000 UTC" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:51.896Z" level=info msg="Checking daemoned children of wflbugdemo" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:51.896Z" level=info msg="TaskSet Reconciliation" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:51.896Z" level=info msg=reconcileAgentPod namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:51.896Z" level=info msg="Updated phase Running -> Succeeded" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:51.896Z" level=info msg="Marking workflow completed" namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:51.896Z" level=info msg="Checking daemoned children of " namespace=argo workflow=wflbugdemo
time="2023-04-14T14:20:51.902Z" level=info msg="cleaning up pod" action=deletePod key=argo/wflbugdemo-1340600742-agent/deletePod
time="2023-04-14T14:20:51.902Z" level=info msg="Workflow update successful" namespace=argo phase=Succeeded resourceVersion=23734372 workflow=wflbugdemo
time="2023-04-14T14:20:51.910Z" level=info msg="cleaning up pod" action=labelPodCompleted key=argo/wflbugdemo--3207486052/labelPodCompleted

Logs from in your workflow's wait container

time="2023-04-14T14:20:43.771Z" level=info msg="Starting Workflow Executor" version=v3.4.7
time="2023-04-14T14:20:43.775Z" level=info msg="Using executor retry strategy" Duration=1s Factor=1.6 Jitter=0.5 Steps=5
time="2023-04-14T14:20:43.775Z" level=info msg="Executor initialized" deadline="0001-01-01 00:00:00 +0000 UTC" includeScriptOutput=false namespace=argo podName=wflbugdemo--3207486052 template="{\"inputs\":{},\"outputs\":{},\"metadata\":{},\"container\":{\"name\":\"inline\",\"image\":\"alpine\",\"command\":[\"/bin/sh\",\"-c\",\"echo \\\"Hello World\\\"\"],\"resources\":{}}}" version="&Version{Version:v3.4.7,BuildDate:2023-04-11T16:19:29Z,GitCommit:f2292647c5a6be2f888447a1fef71445cc05b8fd,GitTag:v3.4.7,GitTreeState:clean,GoVersion:go1.19.8,Compiler:gc,Platform:linux/amd64,}"
time="2023-04-14T14:20:43.775Z" level=info msg="Starting deadline monitor"
time="2023-04-14T14:20:46.777Z" level=info msg="Main container completed" error="<nil>"
time="2023-04-14T14:20:46.778Z" level=info msg="No Script output reference in workflow. Capturing script output ignored"
time="2023-04-14T14:20:46.778Z" level=info msg="No output parameters"
time="2023-04-14T14:20:46.778Z" level=info msg="No output artifacts"
time="2023-04-14T14:20:46.778Z" level=info msg="Alloc=8276 TotalAlloc=14785 Sys=24429 NumGC=4 Goroutines=7"
@n9 n9 added the type/bug label Apr 14, 2023
@n9
Copy link
Author

n9 commented Apr 14, 2023

According to the discussion on the slack it seems that it caused by inline.

@tico24
Copy link
Member

tico24 commented Apr 14, 2023

Ok. This doesn't really explain the issue at all so I'll do so on your behalf.

Slack discussion here: https://cloud-native.slack.com/archives/C01QW9QSSSK/p1681480509927789

inline pods don't seem to generate a correct pod name that conforms to the standard naming convention. As such, pod logs aren't viewable in the UI.

So while the example above using inline doesn't allow the user to see pod logs, the equivelent using the more conventional template-driven dag does:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: workflow-regular
  namespace: argo
spec:
  entrypoint: entrypoint
  templates:
    - name: entrypoint
      dag:
        tasks:
          - name: notinline
            template: notinline
    - name: notinline
      container:
        name: inline
        image: alpine
        command:
          - /bin/sh
          - -c
          - |
            echo "Hello World"

Unfortunately I don't have permissions to make the title of this issue more useful.

@n9 n9 changed the title Bug in pod name Inline pods don't seem to generate a correct pod name that conforms to the standard naming convention Apr 14, 2023
@n9
Copy link
Author

n9 commented Apr 14, 2023

The Containers tab is also empty:

image

terrytangyuan added a commit to terrytangyuan/argo-workflows that referenced this issue Apr 15, 2023
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
@terrytangyuan terrytangyuan self-assigned this Apr 17, 2023
terrytangyuan added a commit that referenced this issue Apr 18, 2023
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
terrytangyuan added a commit that referenced this issue May 25, 2023
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
@nazarewk
Copy link

nazarewk commented Jun 8, 2023

@terrytangyuan the pods spawned for inline script still have -- in them, while Web UI (and generated extra workflows links) think it has just 1 - between. I did update to 3.4.8 to see if it was fixed, but nothing changed for me.

My task body looks like this:

    - name: execute-workflow
      inline:
        inputs:
          artifacts:
            - name: manifest
              path: /tmp/manifest.yaml
        outputs: {}
        metadata: {}
        resource:
          action: create
          manifestFrom:
            artifact:
              name: manifest
          setOwnerReference: true
          successCondition: status.phase == Succeeded
          failureCondition: status.phase in (Failed, Error)

JPZ13 pushed a commit to pipekit/argo-workflows that referenced this issue Jul 4, 2023
@McKMarcBruchner
Copy link

McKMarcBruchner commented Apr 15, 2024

mmh maybe correct me if I am wrong, but if I read the fix PR it looks like you just added an if-statement what happens if the task is being named something with inline. But since it is still not working correctly in argo version 3.5.5, I think the main issue is the implementation of the inline definition of the task without writing an extra template for the task.
E.g. the difference between

spec:
  entrypoint: entrypoint
  templates:
    - name: entrypoint
      dag:
        tasks:
          - name: some-task
            inline:
              container: ...

and

spec:
  entrypoint: entrypoint
  templates:
    - name: entrypoint
      dag:
        tasks:
          - name: some-task
            template: some-task
    - name: some-task
      container: ...

Can you maybe have another look, if you can fix the inline syntax so that it creates the correct pod name?

@agilgur5
Copy link
Member

The above was followed up in #12937. Please file a new issue if you still experience bugs after #12937 is fixed

@argoproj argoproj locked as resolved and limited conversation to collaborators Apr 18, 2024
dpadhiar pushed a commit to dpadhiar/argo-workflows that referenced this issue May 9, 2024
…rgoproj#10921)

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants