Describe the issue:
Scheduler will be shutdown by guest OS if any ENVs contain "
Minimal Complete Verifiable Example:
GCPCluster(
env_vars={"ANY_VAR": '"'}
)
The cloud init will contains:
...
# Run container:
- 'docker run ... -e GCP_ANY_VAR=""" ...'
...
while it should escape " propely:
...
# Run container:
- 'docker run ... -e GCP_ANY_VAR="\"" ...'
...
To fix the problem we have to:
- Properly refactor the command rendering in cloud-init:
|
- 'docker run --net=host {%+ if gpu_instance %}--gpus=all{% endif %} {% for key in env_vars %} -e {{key}}="{{env_vars[key]}}" {% endfor %}{%+ if docker_args %}{{docker_args}}{% endif %} {{image}} {{ command }}' |
- There should be proper error logging to show that cloud init does not pass
Environment:
- Dask version: 2024.12.1
- Python version: 3.11
- Operating System: WSL
- Install method (conda, pip, source): poetry
Describe the issue:
Scheduler will be shutdown by guest OS if any ENVs contain
"Minimal Complete Verifiable Example:
The cloud init will contains:
while it should escape
"propely:To fix the problem we have to:
dask-cloudprovider/dask_cloudprovider/generic/cloud-init.yaml.j2
Line 59 in 736842d
Environment: