Closed antoinetran closed 4 days ago
Suggestion of a solution: rework the plugin to put all environment variable either as envfile (https://docs.sylabs.io/guides/3.7/user-guide/environment_and_metadata.html#env-file-option), or as env variable prefixed by SINGULARITYENV_
(https://docs.sylabs.io/guides/3.7/user-guide/environment_and_metadata.html#singularityenv-prefix)
But worked in my test, however, both requires some form of escaping, like simple quote at least. But if we have simple quote inside the env variable (we cannot be certain what the user want to pass), then it would fail. To be completely reliable, we should parse the quote and escape them for each env var.
Testing with SINGULARITYENV_
prefix results in a warning:
INFO: Environment variable SINGULARITYENV_ARGO_TEMPLATE is set, but APPTAINERENV_ARGO_TEMPLATE is preferred
Whether we have singularity or apptainer, we don't know, so I recommend using envfile instead.
@antoinetran +1 for envfile, regarding escaping I propose to target it after the envfile fix is in place and working (opening a dedicated issue now).
Do you have a patch that you want to merge already for the envfile ?
@antoinetran +1 for envfile, regarding escaping I propose to target it after the envfile fix is in place and working (opening a dedicated issue now).
Do you have a patch that you want to merge already for the envfile ?
No patch yet, I start working on it now. It is my first time programming in GO, so it will take some time :) especially if I want to incorporate Unit Tests with weird case of simple quote double quote inside env.
Right, for the moment we could rely on introducing a case into the e2e integration suite. I'll open an issue there.
Executive message, you can concentrate of making changes, tests are going to be handled together with interlink core (at least the functional ones)
Short Description of the issue
Running an Argo workflow with a pod step affinity set to InterLink Slurm node, will break with this error
Environment
Steps to reproduce
Run an Argo workflow and put a helloworld step in InterLink Slurm node thanks to taint and affinity:
Logs, stacktrace, or other symptoms
Argo Workflow pod when editing it:
The
job.sh
runs 3 singularity container, because Argo as for each pod an init, wait and main containers. Here is an extract of the init container:Analyze
Multiple issues here:
file name too long
ARGO_TEMPLATE
contains the Json of the Kubernetes pod to run by Argo. When Interlink Slurm Plugin runs singularity, double quotes are evaluated by the bash command and lostARGO_TEMPLATE
there are multiple "," because it is a Json, resulting in a bad variable parsingdocker:/docker.io/
=> out of scope of this ticket, moved to https://github.com/interTwin-eu/interlink-slurm-plugin/issues/30Summary of proposed changes