Status freeze persists on the scale and member-deletion early-returns (same class as #367)

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

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
22/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, kubernetes
Lĩnh vực
backend

Hướng nghiên cứu

Start in controllers/etcdcluster_controller.go, where the deletion-wait loop returns RequeueAfter 5s before updateStatus, then trace scaleUp, completePendingMember and scaleDown for the other early returns. The open question is the design, not the code: agree on where member-based status is derived (before the scale fan-out or on every non-error return) and how the quorum denominator stays at the established voter count during progression. Done means the status freeze is gone in both repro scenarios without flipping Degraded on healthy scale-ups.

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

Mô tả

Follow-up to #367 / #369.

#369 cures the freeze on the converged path (a healthy current == desired cluster whose pods all go down): the promote-after-converged pass now threads its transient requeue through updateStatus instead of returning early, so ReadyMembers / Available / Degraded stop advertising a last-healthy snapshot.

The same freeze class remains on every scale-related early return, which still skip updateStatus:

  1. In-flight EtcdMember deletion — controllers/etcdcluster_controller.go deletion-wait loop returns RequeueAfter: 5s before updateStatus. With surviving peer CRs and etcd down, handleDeletion's removeMemberFromEtcd errors forever, reconciliationComplete is false (count mismatch), and deadlineExpired is false because ProgressDeadline was cleared at the prior convergence. ReadyMembers / Available=True/QuorumHealthy freeze exactly as in #367. Repro: break-glass member deletion (or the memory-backed self-delete on pod loss), then all pods go down.

  2. Any scale path — the deletion-wait, hasPendingMember → scaleUp, !allMembersReady, scaleDown, and the inner 5s/10s returns in scaleUp / completePendingMember / scaleDown all skip updateStatus. Healthy 3/3, replicas: 5, member 4 added as a learner, then a node shutdown takes all pods down: status advertises healthy with 0 ready pods for the full ProgressDeadlineSeconds, after which handleDeadlineExceeded writes Available=False/DeadlineExceeded but leaves ReadyMembers, Degraded, and the PDB untouched.

Design question to settle first

Both are the "derive member-based status on paths that early-return" problem. The durable shape (raised as the first open question on #367) is to derive the member-based status (ReadyMembers, Available/Degraded, BrokenMembers, PDB) before the scale fan-out — or on every non-error return — and keep it separate from the reconcile-state conditions that other writers own (the cert-manager gate, surfaceDiscoveryError, handleDeadlineExceeded).

The subtlety that makes this more than a mechanical refactor: during progression the ready/desired ratio counts not-yet-joined members against quorum, so a naive always-write flips Degraded on healthy scale-ups (the #369 review's item 1). #369 handles that for the converged path by withholding the health rewrite while Progressing=True && !reconciliationComplete; a general "write health on every return" needs the quorum denominator to be the established voter count during progression, not the desired replica count. Worth agreeing on the shape before landing the broader change.

Deferred from #369 per reviewer suggestion.

Ngôn ngữ chính
Go
Star
154
Fork
31
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

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 cozystack/etcd-operator

Tất cả issue của cozystack/etcd-operator

Issue tương tự

Thêm issue về Go

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.