jupyterhub / jupyterhub/batchspawner

Slurm batch script gets cached in DB. Changes in config file are ignored

Open
#147 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
207
Forks
136
PR merge metrics
No merged PRs in 30d

Description

I am running batchspawner-0.9.0.dev0 with a recent developer version of jupyterhub (1.0.0b1) and Optionsspawner 0.1.0.

After running once with a certain user, changes to the Slurm batch script inside of the jupyterhub-config.py file are not taking effect after I have restarted the server. I can see in the logs that still the old Slurm script is used for that user. So, the information seems to persist somewhere. After deleting the sqlite DB and starting jupyterhub, the new batch script from the config file is correctly used.

I investigated in the DB, and I found the information in the spawners table:

```
sqlite> select * from spawners;
1|1||||||
2|2||||||
3|3|1|{
"child_conf": {"batch_script": "#!/bin/bash\n#SBATCH --constraint=mc\n#SBATCH --partition={{partition}}\n#SBATCH --ntasks={{ntasks}}\n#SBATCH --time={{runtime}}\n#SBATCH --output={{homedir}}/jupyterhub_batchspawner_%j.log\n#SBATCH --job-name=spawner-jupyterhub\n#SBATCH --workdir={{homedir}}\n#SBATCH --mem-per-cpu=8000\n#SBATCH
...
```

Why this kind of information should be cached and reused is currently beyond me.
Are others seeing this effect as well? It is a very undesirable effect, since it forces me currently to always delete the database when I am adapting the Slurm script.

Thanks for any information,
Derek

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.