IL-0036 Universe · 2017-07-21kubernetes
Universe had recently moved this service to Kubernetes and ran background tasks as Kubernetes Jobs. To fix poor search results in Discover, the team redefined a search index to exclude some fields from full-text search and started a reindex job.
The Job's pod consumed all resources on its node, the node went unhealthy and was killed, and Kubernetes started the Job again on another node. The team had set RestartPolicy=Never and expected that to stop retries, but that setting applies to the pod, not to the Job: a Job starts new pods after a failure and may run more than once. The Job therefore moved from node to node and took each one down, until all nodes were under repair and new nodes were killed as soon as they joined.
The outage ended when the team removed the Job from the scheduler; the nodes then auto-healed back to a healthy state. The status page shows the investigation opened at 14:37 EDT and the incident resolved at 14:55 EDT.
Shortly after a search reindex job was started, problems with the Kubernetes cluster hit Universe's reporting and search APIs and the Kubernetes cluster UI itself. The status page opened an investigation into reports of search and reporting being unavailable at 14:37 EDT on 2017-07-21.
Nodes failed in sequence. The job used up all available resources on the node it ran on, that node became unhealthy and was killed, and the job was started again on another node, which then failed the same way. This went on until every node was being repaired, and each replacement node was killed soon after it came online.
Root cause ? Capacity exhaustion
The team saw problems with the Kubernetes cluster shortly after starting the job, and the status page cites reports of search and reporting being unavailable.
–
restartPolicy: Never on the pod template does not stop a Kubernetes Job from retrying: a Job replaces failed pods and may run more than once, so a job that can exhaust a node will keep moving to new nodes.
same root cause · shared Pod scheduling and placement
same root cause · shared Pod scheduling and placement
same root cause · shared Pod scheduling and placement