jupyterhub / jupyterhub/batchspawner

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

Open
#224 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
207
Forks
136
PR merge metrics
No merged PRs in 30d

Description

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

  • OS:
    CentOS Linux release 7.9.2009 (Core)

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

-->

  • Logs

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Authenticator.pre_spawn_start and the batchspawner.LsfSpawner profile configuration, then compare the environment used there with the user's terminal PATH. Reproduce the profile selection and inspect the logged sudo: bsub: command not found error. Done means selecting an LSF profile opens the requested JupyterHub session instead of falling back to a local session.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
hpc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.