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

Log k8s Events related to spawned pods if we expect failures #710

Open
consideRatio opened this issue Mar 31, 2023 · 0 comments
Open

Log k8s Events related to spawned pods if we expect failures #710

consideRatio opened this issue Mar 31, 2023 · 0 comments

Comments

@consideRatio
Copy link
Member

consideRatio commented Mar 31, 2023

If a case where spawn failes, or a server crashes unepectedly, its good if we log recent k8s Events.

spawner.stop() is called even if start() has failed. Min suggests we look there for anything but exit status 0 and status Running, in that case we provide additional logs about the situation using information in k8s Event resources associated with the pod.

It may be relevant to get the logs from the container as well.

Two reasons for crashing:

  • k8s level, OOMKilled, someone else deleted the pod etc
  • server process crashed

Motivation

  • It requires knowhow about kubectl get events or kubectl describe pod to get info about k8s Events.
  • k8s Events are often cleared after ~60 minutes
  • k8s pod logs are gone from k8s after the pod is removed
  • even if a cloud provider can provide logs etc, its often requires additional cloud provider specific know-how
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant