NERSC / jupyterlab-slurm

BSD 3-Clause "New" or "Revised" License
92 stars 23 forks source link

Slurm Queue Manager doesn't seem to communicate with server #29

Closed andreas-h closed 4 years ago

andreas-h commented 4 years ago

I'm on JupyterLab 1.1.1 behind a JupyterHub 1.0, Firefox 68.0.2 on Linux, no extensions which would interfere (HTTPS everywhere, Privacy Badger).

Manual installation works, and in the Launcher I do have the Slurm Queue Manager which I can launch.

I do get the list of current jobs (which seems to be correct), and all browser-local functions seem to work:

However, everything else seems to be not working:

Interestingly, I cannot see anything related to the extension in the browser console, and pressing any of the UI elements doesn't trigger any network traffic (at least according to the Network console in the browser).

krinsman commented 4 years ago

The Network console in the browser is what I check too to see whether the extension is sending the expected HTTP requests. So it sounds like you're looking at the right thing.

I am not sure how to diagnose this, so hopefully you don't mind me bothering you/asking for a bunch of possible clarifying/debugging information?

Can you confirm that when you do the sbatch, scancel, scontrol Slurm commands from the JupyterLab terminal, that those work?

I found their man pages to be surprisingly helpful: https://slurm.schedmd.com/sbatch.html https://slurm.schedmd.com/scancel.html https://slurm.schedmd.com/scontrol.html

I know that having to do the commands manually from the terminal defeats the purpose of this extension. The point is to find some way to determine whether the issue is with the Python trying to run these commands and failing some way, or Python not even getting sent the HTTP requests in the first place. Based on your description it sounds like the latter, but I want to make sure since I have fewer ideas at the moment about how the former could have broken.

The Show my jobs only setting not working with JupyterHub is a known issue, see https://github.com/NERSC/jupyterlab-slurm/issues/23 so I'm less worried about that than the other three bullets. The other three bullets are really not good.

I added the 'Submit query' thing as a new issue -- if you could add your comments to that it would be helpful: https://github.com/NERSC/jupyterlab-slurm/issues/30

krinsman commented 4 years ago

Also to confirm as a sanity check, it still doesn't work without the Privacy Badger turned on?

Since the extension uses Javascript (ajax) to send the HTTP requests, so if you had an extension which blocked HTTP requests being automatically sent, I could imagine that being a problem.

Also sometimes Slurm is really slow, but the extension doesn't give the user feedback until Slurm responds, so it will be 30+ seconds and it will seem like it isn't working, and then a green box will show up saying it worked. But if it was working just really slow then you probably would have noticed that since the green boxes persist unless the user clicks the x to close them (if I remember correctly). So having more immediate user feedback after they submit an action is another UI improvement we should have, see https://github.com/NERSC/jupyterlab-slurm/issues/31 .

andreas-h commented 4 years ago

So I'm not sure what's causing this, if it was a restart of something in between (not sure what that would be) or the disabling of the serverextension.

Anyways, I'm happy now (except for the Show my jobs only)

krinsman commented 4 years ago

1. I'm a little confused about how it could work at all after disabling the serverextension? Do you mean you disabled it and then re-enabled it? If you installed a new version before disabling, maybe the disabling and then re-enabling caused the new version to be installed, thereby fixing the problem?

What's the output for you of jupyter serverextension list?

But anyway this shouldn't work at all without the server extension, since that's what runs sbatch, squeue, etc.

2. Yeah I agree the Show my jobs only is funky/unwanted behavior. It works without JupyterHub, but I realize that's little consolation since most people are going to be running from a Hub and not SSHing into their HPC system to start JupyterLab.

PR's and any other feedback about this are welcome at any time! We have an issue dedicated to it here https://github.com/NERSC/jupyterlab-slurm/issues/23 Right now I don't have a clue though what the problem is, although I'm sure it'll be obvious in hindsight.

3. Also I updated new versions of this to PyPI and NPM, so hopefully it shouldn't be necessary to install from source any more to get a working version. Sorry again about the inconvenience of that.