jupyterhub / systemdspawner

Spawn JupyterHub single-user notebook servers with systemd
BSD 3-Clause "New" or "Revised" License
92 stars 45 forks source link

Support use of `JupyterHub.allow_named_servers` #73

Open mathause opened 4 years ago

mathause commented 4 years ago

Proposed change

If I understand correctly it is currently not possible to create named servers with systemdspawner.

If you set

c.JupyterHub.allow_named_servers = True

Creating a new named server will kill the original server. I think this is because the `unit_name_template does not expand the name:

c.SystemdSpawner.unit_name_template = f'jupyter-{USERNAME}-singleuser'

thus the "named server" has the same name as the default server and this the default server is killed...

Alternative options

(Optional): Suggest a solution

make c.SystemdSpawner.unit_name_template expand the (optional) name of the server

welcome[bot] commented 4 years ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada: