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

Error submitting workflow via argo cli when passing --parameter-file flag #8160

Closed
3 tasks done
asaunders57 opened this issue Mar 15, 2022 · 2 comments · Fixed by #8213
Closed
3 tasks done

Error submitting workflow via argo cli when passing --parameter-file flag #8160

asaunders57 opened this issue Mar 15, 2022 · 2 comments · Fixed by #8213
Assignees
Labels
area/cli The `argo` CLI type/bug type/security Security related

Comments

@asaunders57
Copy link

Checklist

  • Double-checked my configuration.
  • Tested using the latest version.
  • Used the Emissary executor.

Summary

What happened/what you expected to happen?
Connected to the Argo server API by setting the environment variables found in the User Info section of the Argo Workflows UI.

Attempted to submit a Workflow from an existing WorkflowTemplate:
argo --loglevel debug submit --from wftmpl/deployment-workflow-template -n argo --parameter-file deploy-config.yaml

Logs below showing evidence of:

  • successful connection to Argo server API
  • ability to submit a Workflow when not using the --parameter-file flag

$ ls -la deploy-config.yaml
-rw-rw-rw- 1 root root 459 Mar 15 22:01 deploy-config.yaml
$ argo submit --from wftmpl/deployment-workflow-template -n argo
Name: deployment-workflow-template-j2v74
Namespace: argo
ServiceAccount: unset
Status: Pending
Created: Tue Mar 15 22:01:29 +0000 (now)
Progress:
$ argo --loglevel debug submit --from wftmpl/deployment-workflow-template -n argo --parameter-file deploy-config.yaml
time="2022-03-15T22:01:29.056Z" level=debug msg="CLI version" version="{v3.3.0 2022-03-14T22:52:31Z c6f1e4a v3.3.0 clean go1.17.7 gc linux/amd64}"
time="2022-03-15T22:01:29.056Z" level=debug msg="Client options" opts="(argoServerOpts=(url=server:port,path=,secure=true,insecureSkipVerify=false,http=true),instanceID=)"
time="2022-03-15T22:01:29.056Z" level=debug msg="curl -X POST -H 'Authorization: ******' -d '{"namespace":"argo","resourceKind":"wftmpl","resourceName":"deployment-workflow-template","submitOptions":{"parameterFile":"deploy-config.yaml"}}' 'server:port/api/v1/workflows/argo/submit?'"
time="2022-03-15T22:01:29.156Z" level=fatal msg="Failed to submit workflow: rpc error: code = Unknown desc = open deploy-config.yaml: no such file or directory"

I've omitted the server URL and port.

argo-workflows-server log entry:

time="2022-03-15T22:01:29.154Z" level=error msg="finished unary call with code Unknown" error="open deploy-config.yaml: no such file or directory" grpc.code=Unknown grpc.method=SubmitWorkflow grpc.service=workflow.WorkflowService grpc.start_time="2022-03-15T22:01:29Z" grpc.time_ms=14.878 span.kind=server system=grpc

The commands above are executed in a GitLab runner container. When I run the same command locally - connecting via the k8s API server with no ARGO env vars set, it succeeds.

The deploy-config.yaml exists and the file permissions are fine, so I am unsure as to the origin of the error. Further, it's odd that this does not occur in the case mentioned above.

What version are you running?
v3.3.0, this behaviour also occurs in v3.2.9


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

@sarabala1979
Copy link
Member

@asaunders57 Can you try without argo server? looks like the file is not able in your current folder/doesn't have permission to open it.

@alexec alexec added the type/security Security related label Mar 22, 2022
@alexec
Copy link
Contributor

alexec commented Mar 22, 2022

There is a bug here that could have been a security issue. When submitting via the server, the parameter file is read, but is read from the server file-system. Luckily --parameter-file=/etc/passwd would not work. I'm going to raise a PR to fix this.

@alexec alexec self-assigned this Mar 22, 2022
alexec added a commit to alexec/argo-workflows that referenced this issue Mar 22, 2022
…oproj#8160

Signed-off-by: Alex Collins <alex_collins@intuit.com>
alexec added a commit to alexec/argo-workflows that referenced this issue Mar 22, 2022
…oproj#8160

Signed-off-by: Alex Collins <alex_collins@intuit.com>
alexec added a commit that referenced this issue Mar 22, 2022
…8160 (#8213)

Signed-off-by: Alex Collins <alex_collins@intuit.com>
dpadhiar pushed a commit to dpadhiar/argo-workflows that referenced this issue Mar 23, 2022
@sarabala1979 sarabala1979 mentioned this issue Apr 14, 2022
85 tasks
sarabala1979 pushed a commit that referenced this issue Apr 18, 2022
…8160 (#8213)

Signed-off-by: Alex Collins <alex_collins@intuit.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli The `argo` CLI type/bug type/security Security related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants