Package: jupyterhub
Version: 3.0.0+ds1-1
Severity: important
X-Debbugs-Cc: xi...@australdx.fr

Dear Maintainer,

The jupyterhub Debian package comes with a
/etc/jupyterhub/config/jupyterhub_config.d/config.yaml configuration
file (that is an empty valid YAML file).

The package also includes a /usr/lib/systemd/system/jupyterhub.service
which passes that YAML configuration file path to the command to launch
JupyterHub:
 ExecStart=/usr/bin/python3 -m jupyterhub.app -f 
/etc/jupyterhub/config/jupyterhub_config.d/config.yaml --upgrade-db

The config.yaml was added by commit:
> commit d95b38e175f746b26992ccae18f61cecde5c3479
> Author: Roland Mas <lola...@debian.org>
> Date:   Wed Jun 2 16:06:51 2021 +0200
>
>     Add empty config file

The jupyterhub.service was added by commit:
> commit 306c215c07f978bf7292c06c50c666602fa7a383
> Author: Roland Mas <lola...@debian.org>
> Date:   Wed Jun 2 16:13:16 2021 +0200
>
>     Add systemd service file
and the command line hasn't changed since then.

However, a source code analysis, an strace, and actually trying to put
configuration options in this file show that it is never read.
This is because only Python (with a .py extension) or JSON (with a
.json extension) files are supported, as you can check in method
_load_config_files() of
/usr/lib/python3/dist-packages/traitlets/config/application.py

Dynamically, launching:
 /var/lib/jupyterhub# strace -tt -ff -o jupyterhub.strace /usr/bin/python3 -m 
jupyterhub.app -f /etc/jupyterhub/config/jupyterhub_config.d/config.yaml 
--upgrade-db
confirms that the file is not read by analysis of the resulting straces.

Another way to check is to simply modify the config.yaml file and see
that no option we put in there have any effect.
Due to how _load_config_files() works, i.e. ignoring the extension and trying
to load .py and .json files on the basename, we can however create a new file
/etc/jupyterhub/config/jupyterhub_config.d/config.json, and its content
is taken into account (without even changing the command line).  See examples
at the end.

I suggest to remove the config.yaml file from the package, and
to modify the command line used to launch JupyterHub to:
 /usr/bin/python3 -m jupyterhub.app -f /etc/jupyterhub/jupyterhub_config.py 
--upgrade-db

I'm also unsure about the effect of
/etc/jupyterhub/config/jupyterhub_config.d/50-use-configurable-http-proxy.py
I suspect it has no effect.  In any case it does not appear in the
straces.  The whole /etc/jupyterhub/config subtree should maybe be removed.

-- System Information:
Debian Release: 12.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-0.deb11.7-amd64 (SMP w/62 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages jupyterhub depends on:
ii  fonts-font-awesome            5.0.10+really4.7.0~dfsg-4.1
ii  libjs-bootstrap               3.4.1+dfsg-3
ii  libjs-jquery                  3.6.1+dfsg+~3.5.14-1
ii  libjs-prototype               1.7.3-1
ii  libjs-requirejs               2.3.6+ds+~2.1.34-2
ii  node-configurable-http-proxy  4.5.3+~cs15.2.4-3
ii  python3                       3.11.2-1+b1
ii  python3-alembic               1.8.1-2
ii  python3-async-generator       1.10-4
ii  python3-bcrypt                3.2.2-1
ii  python3-certipy               0.1.3-4
ii  python3-dateutil              2.8.2-2
ii  python3-jinja2                3.1.2-1
ii  python3-jupyter-telemetry     0.1.0-4
ii  python3-notebook              6.4.12-2.2
ii  python3-oauthlib              3.2.2-1
ii  python3-packaging             23.0-1
ii  python3-pamela                1.0.0-3
ii  python3-prometheus-client     0.16.0-0.1
ii  python3-requests              2.28.1+dfsg-1
ii  python3-sqlalchemy            1.4.46+ds1-1
ii  python3-tornado               6.2.0-3
ii  python3-traitlets             5.5.0-1

jupyterhub recommends no packages.

jupyterhub suggests no packages.

-- Configuration Files:
/etc/jupyterhub/config/jupyterhub_config.d/config.yaml changed:
---
Application:
  show_config_json: true
JupyterHub:
  port: 7777


-- no debconf information

*** /etc/jupyterhub/config/jupyterhub_config.d/config.json
{
  "Application": {
    "show_config_json": true
  },
  "JupyterHub": {
    "port": 8888
  }
}

Reply via email to