Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jupyterhub pinning to >=5.2.0,<6 from ==5.1.0 #1008

Merged
merged 2 commits into from
Oct 20, 2024

Conversation

consideRatio
Copy link
Member

@consideRatio consideRatio commented Oct 20, 2024

Something is wrong

  • systemdspawner is not erroring on tests with JupyterHub 5.2.0 (test run)
  • hubtraf is not erroring on tests with JupyterHub 5.2.0 (test run)
  • tljh is erroring on tests with JupyterHub 5.2.0 though
    It seems that starting the server leads to 500 error:
    Debug: server-start fc621e8f6e9ca691 resp:<ClientResponse(http://localhost/hub/spawn) [500 Internal Server Error]>
    

JupyterHub 5.2.0 logs on server spawn

Oct 20 08:35:05 9ce0cc64b132 python3[3068]: [I 2024-10-20 08:35:05.595 JupyterHub log:192] 302 POST /hub/login -> /hub/spawn (fc621e8f6e9ca691@127.0.0.1) 28.60ms
Oct 20 08:35:05 9ce0cc64b132 python3[3068]: [I 2024-10-20 08:35:05.621 JupyterHub provider:661] Creating oauth client jupyterhub-user-fc621e8f6e9ca691
Oct 20 08:35:05 9ce0cc64b132 useradd[3077]: new group: name=jupyter-fc621e8f6e9ca691, GID=1002
Oct 20 08:35:05 9ce0cc64b132 useradd[3077]: new user: name=jupyter-fc621e8f6e9ca691, UID=1000, GID=1002, home=/home/jupyter-fc621e8f6e9ca691, shell=/bin/sh, from=none
Oct 20 08:35:05 9ce0cc64b132 python3[3085]: Adding user jupyter-fc621e8f6e9ca691 to group jupyterhub-users
Oct 20 08:35:05 9ce0cc64b132 gpasswd[3085]: user jupyter-fc621e8f6e9ca691 added by root to group jupyterhub-users
Oct 20 08:35:05 9ce0cc64b132 python3[3068]: [E 2024-10-20 08:35:05.729 JupyterHub user:1007] Unhandled error starting fc621e8f6e9ca691's server: 'PATH'
Oct 20 08:35:05 9ce0cc64b132 python3[3068]:     Traceback (most recent call last):
Oct 20 08:35:05 9ce0cc64b132 python3[3068]:       File "/opt/tljh/hub/lib/python3.9/site-packages/jupyterhub/user.py", line 920, in spawn
Oct 20 08:35:05 9ce0cc64b132 python3[3068]:         await asyncio.wait_for(f, timeout=spawner.start_timeout)
Oct 20 08:35:05 9ce0cc64b132 python3[3068]:       File "/usr/lib/python3.9/asyncio/tasks.py", line 481, in wait_for
Oct 20 08:35:05 9ce0cc64b132 python3[3068]:         return fut.result()
Oct 20 08:35:05 9ce0cc64b132 python3[3068]:       File "/opt/tljh/hub/lib/python3.9/site-packages/systemdspawner/systemdspawner.py", line 288, in start
Oct 20 08:35:05 9ce0cc64b132 python3[3068]:         curpath=env["PATH"],
Oct 20 08:35:05 9ce0cc64b132 python3[3068]:     KeyError: 'PATH'
Oct 20 08:35:05 9ce0cc64b132 python3[3068]:     
Oct 20 08:35:05 9ce0cc64b132 python3[3068]: [E 2024-10-20 08:35:05.760 JupyterHub pages:312] Error starting server fc621e8f6e9ca691: 'PATH'
Oct 20 08:35:05 9ce0cc64b132 python3[3068]:     Traceback (most recent call last):
Oct 20 08:35:05 9ce0cc64b132 python3[3068]:     None: None

Investigation

With jupyterhub/jupyterhub#4904, the Spawner base class had its env_keep default value changed, to for example not include PATH. The default value of LocalProcessSpawner was unchanged, but SystemdSpawner used by tljh inherits from Spawner, so it has been impacted.

I'm not confident on whats a sufficient fix yet, or where - it could be systemdspawner, tljh, or jupyterhub.

I think its systemdspawner to begin with, because I think its test suite would fail if SystemdSpawner.extra_paths where configured when used against jupyterhub 5.2.0, which it isn't in the test suite, but extra_paths is configured by tljh.

I've opened jupyterhub/systemdspawner#144 so far about this, and have tried it in 2cb3bab.

@consideRatio consideRatio merged commit 0370b57 into jupyterhub:main Oct 20, 2024
16 checks passed
@consideRatio consideRatio mentioned this pull request Oct 20, 2024
31 tasks
@consideRatio consideRatio added dependencies Pull requests that update a dependency file maintenance labels Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant