jupyterhub / batchspawner

Custom Spawner for Jupyterhub to start servers in batch scheduled systems
BSD 3-Clause "New" or "Revised" License
190 stars 134 forks source link

LSF Integration: When A user picks a profile, an error appears, "bsub not found" #224

Open dweise1776 opened 3 years ago

dweise1776 commented 3 years ago

Bug description

LSF Integration: When A user picks a profile, an error appears, "bsub not found". Now each user can use bsub if they drop to the terminal. So it's in their path and they can execute it.

Expected behaviour

I expect the user to pick the machine profile they want and then open a jupyterhub session

Actual behaviour

The error "bsub not found" appears and the user must pick a local session.

How to reproduce

Login and pick a a profile.

Your personal set up

Using jupyterlab as the default gui jupyterhub v1.3.0 python v3.8.1 jupyterlab==3.0.9 jupyterlab-server==2.3.0

c.JupyterHub.spawner_class = 'wrapspawner.ProfilesSpawner' c.Spawner.http_timeout = 120

c.JupyterHub.bind_url = 'https://:443' import batchspawner c.JupyterHub.spawner_class = 'wrapspawner.ProfilesSpawner' c.Spawner.http_timeout = 120 c.BatchSpawnerBase.req_host = 'mesabi.xyz.edu' c.BatchSpawnerBase.req_runtime = '12:00:00' c.LsfSpawner.state_exechost_exp = r'in-\1.mesabi.xyz.edu' c.ProfilesSpawner.profiles = [ ( "Local server", 'local', 'jupyterhub.spawner.LocalProcessSpawner', {'ip':'0.0.0.0'} ), ('BBL - 2 cores, 4 GB, 8 hours', 'bbl2c4g8h', 'batchspawner.LsfSpawner', dict(req_nprocs='2', req_queue='mesabi_normal', req_runtime='8:00:00', req_memory='4gb')), ('BBL - 4 cores, 8 GB, 4 hours', 'bbl4c8g4h', 'batchspawner.LsfSpawner', dict(req_nprocs='12', req_queue='bbl_normal', req_runtime='4:00:00', req_memory='8b')), ('BBL - 8 cores, 12 GB, 24 hours', 'bbl8c12g24h', 'batchspawner.LsfSpawner', dict(req_nprocs='2', req_queue='bbl_normal', req_runtime='24:00:00', req_memory='12gb')), ('Interactive BBL - 2 cores, 4 GB, 8 hours', 'lab', 'batchspawner.LsfSpawner', dict(req_nprocs='2', req_host='labhost.xyz.edu', req_queue='bbl_interactive', req_runtime='8:00:00', req_memory='4gb', state_exechost_exp='')), ] c.ProfilesSpawner.ip = '0.0.0.0' c.JupyterHub.ssl_cert = '/etc/pki/tls/certs/someting.cer' c.JupyterHub.ssl_key = '/etc/pki/tls/private/something.key' c.Spawner.cmd=["jupyter-labhub"] c.Spawner.env_keep = ['PATH', 'PYTHONPATH', 'CONDA_ROOT', 'CONDA_DEFAULT_ENV', 'VIRTUAL_ENV', 'LANG', 'LC_ALL', 'LD_LIBRARY_PATH'] c.PAMAuthenticator.group_whitelist = ("something, something",) c.PAMAuthenticator.check_account = False c.PAMAuthenticator.open_sessions = False

-->

Error: HTTP 500: Internal Server Error (Error in Authenticator.pre_spawn_start: RuntimeError sudo: bsub: command not found)

jbaksta commented 3 years ago

Did you configure sudo to be able to use bsub by setting a secure_path or explicitly calling out the command?