`taskworker-scheduler` has no health check, so a hung scheduler stops scheduling silently

Đang mở
#4,642 3 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
73/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
kubernetes, python
Lĩnh vực
backend, devops

Hướng nghiên cứu

Start with the scheduler command in src/sentry/runner/commands/run.py at the linked lines, then compare its loop with the taskworker health check around line 215. Add the requested option and touch the health check file once per scheduler tick; done when the scheduler exposes the option and updates the file while scheduling. The issue mentions the Helm chart as a follow-up possibility but does not identify its file or test.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Waiting for: Product Owner

sentry run taskworker-scheduler queues every periodic task in TASKWORKER_SCHEDULES, such as cleanup and digests. It offers no way for an orchestrator to tell whether it is still scheduling. If its loop hangs, for example blocked on Redis, the process stays up and Kubernetes sees nothing wrong. Periodic tasks then stop with no error.

sentry run taskworker already solves this with --health-check-file-path: it touches a file as it works, and the Helm chart's liveness probe removes that file. The scheduler command takes only --redis-cluster, and its loop never signals that it is alive:

https://github.com/getsentry/sentry/blob/e827d750925f3308ea2e79e15c45fc800c463857/src/sentry/runner/commands/run.py#L113-L142

Request: add --health-check-file-path to taskworker-scheduler, touched once per scheduler tick, the same way taskworker does it (run.py#L215). The community Helm chart could then probe the scheduler the way it already probes task workers. Today the chart's task scheduler deployment has no probe at all.

Environment: self-hosted on Kubernetes with sentry-kubernetes/charts 36.0.0.

Ngôn ngữ chính
Shell
Star
9.7k
Fork
2k
Merge trung bình
3 ngày 2 giờ
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/self-hosted

Tất cả issue của getsentry/self-hosted

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.