ZooKeeper znode controller: release finalizer without connecting when the parent is deleting
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
- 68/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ệ
- kubernetes, rust
- Lĩnh vực
- devops, distributed-systems
Hướng nghiên cứu
Bắt đầu từ nhánh finalizer::Event::Cleanup và theo dõi cách nó xử lý một ZookeeperCluster được tham chiếu có deletionTimestamp. Kiểm tra đường dẫn dọn dẹp ensure_znode_missing và các bài kiểm thử tích hợp cho thấy các namespace bị mắc kẹt ở Terminating. Hoàn thành có nghĩa là thao tác xóa bỏ qua kết nối ZooKeeper và giải phóng finalizer mà không phải chờ backoff kéo dài nhiều phút.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
In some scenarios, the ZookeeperZnode finalizer (zookeeper.stackable.tech/znode) can take around 130–150s to release. That's what sometimes leaves namespaces stuck in Terminating in our integration tests.
This can happen when the operator tries connection to Zookeeper to delete the node, while ZooKeeper is being torn down, the delete/cleanup path (ensure_znode_missing) runs its errors through controller-runtime's exponential backoff, and that's where the multi-minute stall comes from.
Mechanism
- znode cleanup (
ensure_znode_missing) tries to connect to the ZK service and gets Connection refused — the ZK pods/endpoints are already gone — so the reconcile errors out. - The
ZookeeperClusterCR then drops out of the watch cache. At this point the finalizer's fast path (cluster doesn't exist → assume the znode is gone → drop the finalizer without connecting) would kick in, but the failed reconcile is already sitting in exponential backoff. - ~139s gap: nothing re-runs, even though the fast-path condition is now true.
- Backoff finally expires, the reconcile re-runs, the fast path fires, the finalizer is removed, and the namespace deletes.
So it comes down to queue ordering under load. If cleanup runs after the CR leaves the store, it's instant if it runs before, it errors, hits backoff, and takes 130s+.
Fix
In the finalizer::Event::Cleanup arm: if the referenced ZookeeperCluster has a deletionTimestamp, drop the finalizer straight away without connecting to ZK. Retrying an unreachable server makes sense on the create path; on the delete path it shouldn't be allowed to block teardown.
- Ngôn ngữ chính
- Rust
- Star
- 37
- Fork
- 11
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 10
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của stackabletech/zookeeper-operator
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
stackabletech/zookeeper-operator#959 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
type/bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
-
type/bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Tất cả issue của stackabletech/zookeeper-operator
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
bug core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Đang mởfuzz
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ClickHouse/ClickHouse#122114 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
linebender/vello_svg#90 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100