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
Panic when volumeMount does not exist #3436
Comments
This code makes no sense to me, node can be expected to be nil at this line, but this code has not changed for a while. |
@Mastergalen please can you attach the workflow YAML? I'm assuming it contains a DAG - but I'd like to be able to repro. |
Turns out the crash has nothing to do with WorkflowTemplates, but actually has to do with a volumeMount not existing. Here is a workflow that produces the crash: apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: repo-crash-
spec:
entrypoint: start
templates:
- name: start
container:
image: alpine
command: [echo, "hello"]
volumeMounts:
- mountPath: /mnt/doesnotexist
name: doesnotexist |
Did you change fix it? |
@alexec I encounter this issue even if the volume does exist, defined in the WorkflowTemplate. Invoking the wftmpl from a Workflow using workflowTemplateRef causes the panic as if the volume is missing. argo: v2.9.2
BuildDate: 2020-07-08T23:54:33Z
GitCommit: 65c2bd44e45c11e0a0b03adeef8d6800b72cd551
GitTreeState: clean
GitTag: v2.9.2
GoVersion: go1.13.4
Compiler: gc
Platform: linux/amd64 WorkflowTemplate: apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: workflow-template-whalesay
spec:
serviceAccountName: workflow-service-account
volumes:
- name: data
emptyDir: {}
arguments:
parameters:
- name: message
entrypoint: start
templates:
- name: start
container:
image: docker/whalesay
command: [cowsay]
args: ["{{workflow.parameters.message}}"]
volumeMounts:
- name: data
path: /mnt/data Workflow: apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: try-say-
spec:
arguments:
parameters:
- name: message
value: "hello world"
workflowTemplateRef:
name: workflow-template-whalesay |
You YAML has mistakes, it is
|
Panics anyway:
|
Bug fixe reveals the true error: |
Original workflow: |
So workflow templates are not respecting mount paths, and I suspect other things. |
@alexec I believe this error is specific to using workflowTemplateRef, since this mode of use prohibits volume definitions in the consuming Workflow, forcing us to define the volumes in the WorkflowTemplate, which as you've discovered does not appear to respect the volume definition. |
Checklist:
What happened:
When submitting a workflow that depends on aWorkflowTemplate
, the workflow crashes and immediately fails (without jumping to onExit).Turns out that the crash actually occurred due to a
volumeMount
not existing.The message in
argo watch
is "Message: runtime error: invalid memory address or nil pointer dereference"What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
The same workflow used to work in Argo v2.8.2
Environment:
Other debugging information (if applicable):
Message from the maintainers:
If you are impacted by this bug please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.
The text was updated successfully, but these errors were encountered: