ComputeCanada / puppet-jupyterhub

Puppet module to deploy a JupyterHub that submits job to Slurm
MIT License
11 stars 7 forks source link

slurm_load_node error: Protocol authentication error #64

Open fraenki opened 1 month ago

fraenki commented 1 month ago

After setting JupyterHub up with this module, it does not seem to work properly. I get the following error after logging in:

Sep 16 23:24:49 host.example.com jupyterhub[23282]: slurm_load_node error: Protocol authentication error
Sep 16 23:24:49 host.example.com jupyterhub[22515]: [E 2024-09-16 23:24:49.242 JupyterHub web:1798] Uncaught exception GET /hub/home (127.0.0.1)
Sep 16 23:24:49 host.example.com jupyterhub[22515]:    HTTPServerRequest(protocol='https', host='localhost:8000', method='GET', uri='/hub/home', version='HTTP/1.1', remote_ip='127.0.0.1')
Sep 16 23:24:49 host.example.com jupyterhub[22515]:    Traceback (most recent call last):
Sep 16 23:24:49 host.example.com jupyterhub[22515]:      File "/opt/jupyterhub/lib64/python3.9/site-packages/tornado/web.py", line 1713, in _execute
Sep 16 23:24:49 host.example.com jupyterhub[22515]:        result = await result
Sep 16 23:24:49 host.example.com jupyterhub[22515]:      File "/opt/jupyterhub/lib64/python3.9/site-packages/jupyterhub/handlers/pages.py", line 79, in get
Sep 16 23:24:49 host.example.com jupyterhub[22515]:        default_server=user.spawner,
Sep 16 23:24:49 host.example.com jupyterhub[22515]:      File "/opt/jupyterhub/lib64/python3.9/site-packages/jupyterhub/user.py", line 485, in spawner
Sep 16 23:24:49 host.example.com jupyterhub[22515]:        return self.spawners['']
Sep 16 23:24:49 host.example.com jupyterhub[22515]:      File "/opt/jupyterhub/lib64/python3.9/site-packages/jupyterhub/user.py", line 247, in __getitem__
Sep 16 23:24:49 host.example.com jupyterhub[22515]:        self[key] = self.spawner_factory(key)
Sep 16 23:24:49 host.example.com jupyterhub[22515]:      File "/opt/jupyterhub/lib64/python3.9/site-packages/jupyterhub/user.py", line 478, in _new_spawner
Sep 16 23:24:49 host.example.com jupyterhub[22515]:        spawner = spawner_class(**spawn_kwargs)
Sep 16 23:24:49 host.example.com jupyterhub[22515]:      File "/opt/jupyterhub/lib64/python3.9/site-packages/slurmformspawner/spawner.py", line 58, in __init__
Sep 16 23:24:49 host.example.com jupyterhub[22515]:        self.form = SbatchForm(username=self.user.name,
Sep 16 23:24:49 host.example.com jupyterhub[22515]:      File "/opt/jupyterhub/lib64/python3.9/site-packages/slurmformspawner/form.py", line 144, in __init__
Sep 16 23:24:49 host.example.com jupyterhub[22515]:        self.form[key].process(formdata=FakeMultiDict({key : [self.resolve(getattr(self, key).get('def'))]}))
Sep 16 23:24:49 host.example.com jupyterhub[22515]:      File "/opt/jupyterhub/lib64/python3.9/site-packages/slurmformspawner/form.py", line 26, in resolve
Sep 16 23:24:49 host.example.com jupyterhub[22515]:        return value(*args, **kargs)
Sep 16 23:24:49 host.example.com jupyterhub[22515]:      File "/opt/jupyterhub/lib64/python3.9/site-packages/slurmformspawner/form.py", line 47, in <lambda>
Sep 16 23:24:49 host.example.com jupyterhub[22515]:        'def': lambda api, user: int(max(api.get_mems()) / max(api.get_cpus())),
Sep 16 23:24:49 host.example.com jupyterhub[22515]:    ValueError: max() arg is an empty sequence

Is this a known incompatibility? Or am I doing something wrong?

This was tested on Rocky 8 using the patch from https://github.com/ComputeCanada/puppet-jupyterhub/pull/60.