jupyterhub / the-littlest-jupyterhub

Simple JupyterHub distribution for 1-100 users on a single server
https://tljh.jupyter.org
BSD 3-Clause "New" or "Revised" License
1.02k stars 338 forks source link

ensure hub env is on $PATH in jupyterhub service #895

Closed minrk closed 1 year ago

minrk commented 1 year ago

required for --upgrade-db to work, since it assumes alembic is on $PATH (it probably shouldn't, but that's a PR for jupyterhub)

minrk commented 1 year ago

I would think this would cause upgrade from 0.2.0 to fail (because the upgrade does in fact fail in practice). I'm not sure why the upgrade test doesn't fail more reliably. Maybe this is the cause of the intermittent failure here?

Downloading traefik 2.10.1 from https://github.com/traefik/traefik/releases/download/v2.10.1/traefik_v2.10.1_linux_amd64.tar.gz...
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/srv/src/tljh/installer.py", line 525, in <module>
    main()
  File "/srv/src/tljh/installer.py", line 514, in main
    ensure_jupyterhub_service(HUB_ENV_PREFIX)
  File "/srv/src/tljh/installer.py", line 65, in ensure_jupyterhub_service
    systemd.reload_daemon()
  File "/srv/src/tljh/systemd.py", line 16, in reload_daemon
    subprocess.run(["systemctl", "daemon-reload"], check=True)
  File "/usr/lib/python3.10/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['systemctl', 'daemon-reload']' returned non-zero exit status 1.
FAILED
manics commented 1 year ago
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

This sounds like a systemd/container setup problem. If the hub or other services were invalid those services would fail, but systemd should still be running.