the-littlest-jupyterhub icon indicating copy to clipboard operation
the-littlest-jupyterhub copied to clipboard

bump jupyterhub to 2.*

Open raybellwaves opened this issue 3 years ago • 3 comments

  • [ ] Add / update documentation
  • [ ] Add tests

Firstly, does it still work? Secondly, any reason why not?

raybellwaves avatar Dec 17 '21 05:12 raybellwaves

I think we'll need to resolve https://github.com/jupyterhub/the-littlest-jupyterhub/issues/724 since this is a breaking change

manics avatar Dec 17 '21 11:12 manics

This will fix https://github.com/jupyterhub/the-littlest-jupyterhub/issues/818

jtpio avatar Jun 14 '22 13:06 jtpio

The hub environment is updated separately from the user environment so this also needs an update: https://github.com/jupyterhub/the-littlest-jupyterhub/blob/121b4c7d8d7ec068e07e55f24ea75ce6fa0ca462/tljh/installer.py#L124

The JupyterHub DB should be upgraded automatically if needed so no need to worry about running jupyterhub upgrade-db: https://github.com/jupyterhub/the-littlest-jupyterhub/blob/121b4c7d8d7ec068e07e55f24ea75ce6fa0ca462/tljh/systemd-units/jupyterhub.service#L20

Though I've just tried a manual update of JupyterHub and it's failing:

Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]: [E 2022-06-17 17:38:41.526 JupyterHub app:3297]
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:     Traceback (most recent call last):
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:       File "/opt/tljh/hub/lib/python3.8/site-packages/jupyterhub/app.py", line 3294, in launch_instance_async
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:         await self.initialize(argv)
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:       File "/opt/tljh/hub/lib/python3.8/site-packages/jupyterhub/app.py", line 2813, in initialize
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:         self.init_db()
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:       File "/opt/tljh/hub/lib/python3.8/site-packages/jupyterhub/app.py", line 1777, in init_db
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:         dbutil.upgrade_if_needed(self.db_url, log=self.log)
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:       File "/opt/tljh/hub/lib/python3.8/site-packages/jupyterhub/dbutil.py", line 135, in upgrade_if_needed
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:         upgrade(db_url)
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:       File "/opt/tljh/hub/lib/python3.8/site-packages/jupyterhub/dbutil.py", line 84, in upgrade
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:         check_call(['alembic', '-c', alembic_ini, 'upgrade', revision])
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:       File "/usr/lib/python3.8/subprocess.py", line 359, in check_call
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:         retcode = call(*popenargs, **kwargs)
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:       File "/usr/lib/python3.8/subprocess.py", line 340, in call
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:         with Popen(*popenargs, **kwargs) as p:
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:       File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:         self._execute_child(args, executable, preexec_fn, close_fds,
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:       File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:         raise child_exception_type(errno_num, err_msg, err_filename)
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:     FileNotFoundError: [Errno 2] No such file or directory: 'alembic'
Jun 17 17:38:41 ubuntu2004.localdomain python3[4460]:     
Jun 17 17:38:41 ubuntu2004.localdomain systemd[1]: jupyterhub.service: Main process exited, code=exited, status=1/FAILURE
Jun 17 17:38:41 ubuntu2004.localdomain systemd[1]: jupyterhub.service: Failed with result 'exit-code'.
Jun 17 17:38:42 ubuntu2004.localdomain systemd[1]: jupyterhub.service: Scheduled restart job, restart counter is at 5.
Jun 17 17:38:42 ubuntu2004.localdomain systemd[1]: Stopped jupyterhub.service.
Jun 17 17:38:42 ubuntu2004.localdomain systemd[1]: jupyterhub.service: Start request repeated too quickly.
Jun 17 17:38:42 ubuntu2004.localdomain systemd[1]: jupyterhub.service: Failed with result 'exit-code'.
Jun 17 17:38:42 ubuntu2004.localdomain systemd[1]: Failed to start jupyterhub.service.

/opt/tljh/hub/bin/alembic exists, so maybe /opt/tljh/hub/bin needs to be added to PATH in jupyterhub.service?

manics avatar Jun 17 '22 17:06 manics

  • Closed by #842

consideRatio avatar Apr 04 '23 19:04 consideRatio