ideonate / cdsdashboards

JupyterHub extension for ContainDS Dashboards
https://cdsdashboards.readthedocs.io/
Other
199 stars 38 forks source link

Batchspawner: Dashboard just shows Jupyter notebook #82

Closed statiksof closed 2 years ago

statiksof commented 3 years ago

Describe the bug

I am using a customized spawner (options form) based on batchspawner but Dashboard just shows Jupyter server as normal as described here.

Any additional configuration is required for batchspawner-based spawners?

Configuration

from batchspawner import SlurmSpawner
from cdsdashboards.hubextension.spawners.variablemixin import VariableMixin, MetaVariableMixin

class VariableSlurmSpawner(SlurmSpawner, VariableMixin, metaclass=MetaVariableMixin):
    pass

c.JupyterHub.spawner_class = VariableSlurmSpawner

c.VariableMixin.default_presentation_cmd = ['jhsingle-native-proxy']
danlester commented 2 years ago

Perhaps you've solved this by now, but the config looks right to me, so maybe the problem is down to your precise Slurm setup.

The only SlurmSpawner setup I've used personally is the one here (there are a lot of extra bits and pieces, but the fundamentals are the same...) - not sure if that can give you any inspiration!

statiksof commented 2 years ago

Yes, I solved that issue (thank you for the link), our setup is a mix of profilesspawner and batchspawner (4 spawners in total), The problem was to find out who has to inherit from VariableMixin and metaclass=MetaVariableMixin. Now it works but sometimes it just stuck on building and nothing shows up:

DEBUG:tornado.application:Trying to start mainprocess
DEBUG:tornado.application:Started mainprocess
DEBUG:tornado.application:Connection to http://localhost:50342/ refused
DEBUG:tornado.application:Readyness: False after 0.011322975158691406 seconds, next check in 0.01s
DEBUG:tornado.application:Connection to http://localhost:50342/ refused

and in another cases, it starts after awhile, I believe additional networking configuration is required.

jared-nussbaum-frbb commented 2 years ago

Hi @statiksof . I think I am having the same issue as you had. Would you be able to share the code that resolved this issue for mixing ProfileSpawner and BatchSpawner while getting CDSDashboards to load? Or can you share what combination of VariableMixin and metaclass=MetaVariableMixin you found success with?