Hand a provisioned worker its token in the environment, not argv
The generated batch script exported nothing and passed `--token`, which any user on a shared compute node reads from `ps`. It now exports FLUKSIO_WORKER_TOKEN after `prerun`, which the worker already reads.
This commit is contained in:
@@ -87,6 +87,9 @@ def test_the_script_starts_a_worker_that_dials_back_and_stops_when_done(monkeypa
|
||||
assert "--labels gpu" in script
|
||||
# Without this the job holds its allocation until the walltime.
|
||||
assert "--max-idle 120" in script
|
||||
# The token travels in the environment: argv is in `ps` for anyone.
|
||||
assert "--token" not in script
|
||||
assert "\nexport FLUKSIO_WORKER_TOKEN=ey" in script
|
||||
|
||||
|
||||
def test_one_job_per_profile_however_often_it_is_asked_for(monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user