Skip to content

Commit

Permalink
Proper fix to server being spontaneously deleted on restart (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
costrouc authored Jun 3, 2022
1 parent e6fdd29 commit 867edb1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion roles/jupyterhub/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jupyterhub_proxy_auth_token: "m8dfdKvyVJ0bWTNpbVCQyoCt"
cdsdashboards_enabled: true

jupyterhub_enabled: false
jupyterhub_version: ">=1.3.0"
jupyterhub_version: ">=2.3.0"
jupyterhub_port: "15001"
jupyterhub_base_url: "/"
jupyterhub_hub_environment: "environments/jupyterhub.yaml"
Expand Down
8 changes: 0 additions & 8 deletions roles/jupyterhub/templates/jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,6 @@ async def authenticate(self, handler, data):
# -------------------- Base Spawner --------------------

class QHubHPCSpawnerBase(SlurmSpawner):
async def poll(self):
# on server restart the IP and port appears to change when poll() is called
# on the server object. This shim ensures that those are preserved
ip, port = self.server.ip, self.server.port
value = await super().poll()
self.server.ip, self.server.port = ip, port
return value

req_conda_environment_prefix = Unicode('',
help="Conda environment prefix to launch jupyterlab"
).tag(config=True)
Expand Down

0 comments on commit 867edb1

Please sign in to comment.