Movatterモバイル変換


[0]ホーム

URL:


Jump to content
Wikitech
Search

Portal:Toolforge/Admin/Runbooks/JobsEmailerDown

From Wikitech
<Portal:Toolforge |Admin |Runbooks

Toolforge Admin

[edit]

This happens when the jobs-emailer pod in the jobs-emailer namespace of tools/toolsbeta k8s cluster is down or can't be reached.

The procedures in this runbook requireadmin permissions to complete.

Error / Incident

This usually comes in the form of analert in alertmanager.

There you will get which project (tools, toolsbeta, ...) is the one it's failing for.

Debugging

The first most likely step is to ssh to tools/toolsbeta (depending on the project the alert is from) k8s-control servers (i.e toolsbeta-test-k8s-control-4.toolsbeta.eqiad1.wikimedia.cloud). From there you can:

  • check that the pods are running:
dcaro@tools-bastion-13:~$kubectl-sudogetpods-njobs-emailerNAMEREADYSTATUSRESTARTSAGEjobs-emailer-5946fb7cd5-6nhrm1/1Running043m
  • You can also check the log of the pod's deployment withkubectl logs -n jobs-emailer deploy/jobs-emailer.
  • You can force a restart of all the pods with a rolloutkubectl rollout restart -n jobs-emailer deployment/jobs-emailer
  • If the pods don't exist or the deployment does not exist, you can try redeploying the jobs-emailer by following the instructions in thetoolforge repo (it will do nothing if there's nothing to do).

Doing a manual curl for the stats

You can try doing a curl directly to the pods for the statisticts, by checking the configuration of prometheus, you'll get the cert, key and url:

root@tools-prometheus-7:~#grep'job_name.*jobs-emailer'-A40/srv/prometheus/tools/prometheus.yml-job_name:jobs-emailerscheme:httpstls_config:insecure_skip_verify:truecert_file:"/etc/ssl/localcerts/toolforge-k8s-prometheus.crt"key_file:"/etc/ssl/private/toolforge-k8s-prometheus.key"kubernetes_sd_configs:-api_server:https://k8s.tools.eqiad1.wikimedia.cloud:6443role:podtls_config:insecure_skip_verify:truecert_file:"/etc/ssl/localcerts/toolforge-k8s-prometheus.crt"key_file:"/etc/ssl/private/toolforge-k8s-prometheus.key"namespaces:names:-jobs-emailer...

Then you can curl directly the pods by name, like:

root@tools-prometheus-6:~#curl\--insecure\--cert/etc/ssl/localcerts/toolforge-k8s-prometheus.crt\--key/etc/ssl/private/toolforge-k8s-prometheus.key\'https://k8s.tools.eqiad1.wikimedia.cloud:6443/api/v1/namespaces/jobs-emailer/pods/jobs-emailer-5946fb7cd5-6nhrm/proxy/metrics'....

Common issues

Add new issues here when you encounter them!

Prometheus k8s cert expired

If jobs-emailer seems up, you can check if the certificates that prometheus uses to connect to k8s have expired (there should have been another alert though)Portal:Toolforge/Admin/Runbooks/PrometheusK8sCertExpirySoon.

Related information

Old incidents

Add any incident tasks here!

Retrieved from "https://wikitech.wikimedia.org/w/index.php?title=Portal:Toolforge/Admin/Runbooks/JobsEmailerDown&oldid=2312969"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp