Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Kubernetes logs to the user while starting the pod #148

Closed
elgalu opened this issue Mar 19, 2018 · 7 comments
Closed

Show Kubernetes logs to the user while starting the pod #148

elgalu opened this issue Mar 19, 2018 · 7 comments

Comments

@elgalu
Copy link

elgalu commented Mar 19, 2018

Having a loading spinner is ok:

screen shot 2018-03-19 at 22 38 58

However showing the user what's going on, i.e. by showing K8s events for example, would work like the mirror in the elevators, users won't suffer the wait as they see some punctual progress.

@yuvipanda
Copy link
Collaborator

yuvipanda commented Mar 19, 2018 via email

@minrk
Copy link
Member

minrk commented Mar 20, 2018

That would be cool. We'd need to figure out how to make the API for progress. Maybe allow Spawner.start to be an async generator yielding event messages?

@clkao
Copy link
Contributor

clkao commented Mar 25, 2018

maybe the reflector can get those events, and kubespawner provide some kind of spawn status details to be rendered by jupyterhub?

somewhat related to #141

@minrk
Copy link
Member

minrk commented Mar 26, 2018

Getting the data into kubespawner is definitely necessary, but the hard part is the JupyterHub side where we need to come up with a universal generic API for all spawners to use. One option is to follow the BinderHub example and use a full-blown xterm.js log. That's surely the most powerful option, but I think it's huge overkill for JupyterHub, so I'd rather do something much simpler and allow yielding updates to a staged progress bar. Something like:

{
  'message': 'text',
  'progress': 80, # out of 100
}

where a single message will be displayed and can be updated at any point and a progress bar will be filled:

screen shot 2018-03-26 at 12 02 43

@minrk
Copy link
Member

minrk commented Apr 4, 2018

jupyterhub/jupyterhub#1771 implements an API for Spawners to log progress and events

@elgalu
Copy link
Author

elgalu commented May 5, 2018

I'm testing the kubespawner and jupyterhub master branches today and wow!

image

I also tried the new c.KubeSpawner.profile_list and in this case requested more CPU than any node can provide to see what happens (see screenshot)

It would be nice to see the K8s events, in this case the user would see:

Warning   FailedScheduling
0/1 nodes are available: 1 Insufficient cpu

But this looks already so nice, thank you so much!!!

@clkao
Copy link
Contributor

clkao commented May 6, 2018

@elgalu check out #153 that adds the k8s events

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants