jupyterhub / kubespawner

Kubernetes spawner for JupyterHub
https://jupyterhub-kubespawner.readthedocs.io
BSD 3-Clause "New" or "Revised" License
550 stars 304 forks source link

Events not showing up #272

Closed akhilputhiry closed 6 years ago

akhilputhiry commented 6 years ago

Earlier while using kubespawner it used to show events like image pulled successfully, container created, container started etc.. But now its showing only Server requested, Spawning server...

screen shot 2018-10-23 at 12 07 15 am
akhilputhiry commented 6 years ago

@yuvipanda any thoughts

yuvipanda commented 6 years ago

Looks like the events are showing up, but the server isn't starting properly.

Can you look at the logs for the pod or for JupyterHub? That should give you a better idea for why your spawn is failing.

akhilputhiry commented 6 years ago

@yuvipanda I know why the spawn is failing.

My point is different, if you look at the event logs it is saying only 2 things

  1. server requested
  2. spawning server

Earlier it used to show that

  1. pulling image from ..
  2. image pulled successfully
  3. creating container
  4. started container

It used to show all the events we get while doing kubectl desctibe pod <pod-name>

Events:
  Type    Reason     Age   From                                      Message
  ----    ------     ----  ----                                      -------
  Normal  Scheduled  18s   default-scheduler                         Successfully assigned 2304677352/curl-5d895cfbc-dmrvd to acs-node22.usrno1.io
  Normal  Pulling    18s   kubelet, acs-node22.usrno1.asdaasdcloud.io  pulling image "docker.asdaasd.com/gbi-fw/curl:latest"
  Normal  Pulled     17s   kubelet, acs-node22.usrno1.asdaasdcloud.io  Successfully pulled image "docker.sdfsdf.com/gbi-fw/curl:latest"
  Normal  Created    17s   kubelet, acs-node22.usrno1.asdaasdcloud.io  Created container
  Normal  Started    17s   kubelet, acs-node22.usrno1.asdaasdcloud.io  Started container
yuvipanda commented 6 years ago

Ah, i see. I'm not sure - @minrk did most of the events work. Maybe he or @consideRatio have a better idea?

consideRatio commented 6 years ago

Thanks for the clear description and that you have taken time to report this behavior @akhilputhiry. Dont know whats going on, but i experienced an error like this during a quite quickly fixed development releasenof the zero-to-jupyterhub-k8s deployment of jupyterhub.

Are you using z2jh and if so, what version?

consideRatio commented 6 years ago

@yuvipanda!! :heart:

akhilputhiry commented 6 years ago

Hi @consideRatio I am not using z2jh for my deployment. I used kubeflow for my deployment.

akhilputhiry commented 6 years ago

@yuvipanda @consideRatio solved the problem

I was using wrapspawner to pick up dynamic spawners. There they are not using child_classes progress method. I modified the wrapspawner to use child classes progress and it started working.

@async_generator
async def progress(self):
    async for event in self.child_spawner.progress():
        await yield_(event)
yuvipanda commented 6 years ago

Awesome, @akhilputhiry! Thanks for letting us know!

Can I ask what you are using wrapspawner for? Could it be replicated with https://github.com/jupyterhub/kubespawner/pull/160? If not, what more needs to be added?

Thanks!

akhilputhiry commented 6 years ago

I am trying to make kubespawner a generic framework to spin off any data science related stuff like tensorboard, zeppelin etc.. I am able to spin off zeppelin notebooks and all.. working on making it compatiable with tensorboard and other stuffs.

yuvipanda commented 6 years ago

ah, cool. awesome :)

TariniBindu03 commented 1 month ago

Hi for me Ian’s using Jupyter hub 5.1 ![Uploading IMG_39DE0610-12C9-499A-A00C-EABF5BECA85F.jpeg…]() kubespawner 6.2 and Kubernetes 1.27

pod is launching but events and redirection to lab not happening . Can you suggest me plz