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

Pod culler needs to be more robust #510

Closed
betatim opened this issue Apr 3, 2018 · 0 comments · Fixed by jupyterhub/zero-to-jupyterhub-k8s#633
Closed

Pod culler needs to be more robust #510

betatim opened this issue Apr 3, 2018 · 0 comments · Fixed by jupyterhub/zero-to-jupyterhub-k8s#633

Comments

@betatim
Copy link
Member

betatim commented Apr 3, 2018

pod-culler crashes if a pod has no start time

$ kubectl logs pod-culler-96bb965fd-sgwf8
[I 2018-04-03 15:54:32 culler:88] watching for pods with label selector component=singleuser-server in namespace prod
[I 2018-04-03 15:54:32 culler:143] Culling pods older than 06:00:00
Traceback (most recent call last):
  File "/usr/local/bin/culler", line 233, in <module>
    asyncio.get_event_loop().run_until_complete(main())
  File "/usr/local/lib/python3.6/asyncio/base_events.py", line 467, in run_until_complete
    return future.result()
  File "/usr/local/bin/culler", line 228, in main
    culler.cull()
  File "/usr/local/bin/culler", line 151, in cull
    age = now - pod.status.start_time.replace(tzinfo=timezone.utc)
AttributeError: 'NoneType' object has no attribute 'replace'
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

Successfully merging a pull request may close this issue.

1 participant