bug: finalizer "syncagent.kcp.io/cleanup" on related resources block deletion of primary object
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
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- go
- Lĩnh vực
- backend, distributed-systems
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện thiết lập provider A/B với các manifest của Network và VirtualMachine trong issue này, sau đó theo dõi quá trình dọn dẹp finalizer cho các tài nguyên chính và liên quan. Xem các issue #116 và #117 để biết ngữ cảnh; được xem là hoàn tất khi việc xóa VirtualMachine không còn khiến Network bị chặn bởi một finalizer được thêm lại ngay lập tức.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Let's assume, there are two service providers using the api-syncagent to publish API resources and sync objects to / from kcp. To have a concrete example, let's also assume that:
- service provider "A" provides a
NetworkAPI - service provider "B" provides a
VirtualMachineAPI that allows you to reference an existingNetwork(defined as related resource) in which the virtual machine should be created
In this case, both api-syncagents add the finalizer "syncagent.kcp.io/cleanup" to any Network object referenced by a VirtualMachine - the api-syncagent of service provider "A" since the Network is the primary object, the api-syncagent of service provider "B" since the Network object is a related resource with origin: kcp.
When a VirtualMachine is deleted, provider "B" removes the finalizer from the Network as part of cleanup — but provider "A" immediately re-adds it, blocking deletion indefinitely.
Steps To Reproduce
- service provider "A": install api-syncagent and created
PublishedResourceforNetwork
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: networks.network.example.com
spec:
group: network.example.com
names:
kind: Network
listKind: NetworkList
plural: networks
singular: network
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
cidrBlock:
type: string
served: true
storage: true
---
apiVersion: syncagent.kcp.io/v1alpha1
kind: PublishedResource
metadata:
name: networks.network.example.com
spec:
resource:
apiGroup: network.example.com
versions: [v1]
kind: Network
naming:
namespace: 'ws-{{ .ClusterName }}-{{ .Object.metadata.namespace | sha3short }}'
name: '{{ .Object.metadata.name }}'
- service provider "B": install api-syncagent and created
PublishedResourceforVirtualMachine
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: virtualmachines.compute.example.com
spec:
group: compute.example.com
names:
kind: VirtualMachine
listKind: VirtualMachineList
plural: virtualmachines
singular: virtualmachine
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
networkRef:
type: object
properties:
name:
type: string
served: true
storage: true
---
apiVersion: syncagent.kcp.io/v1alpha1
kind: PublishedResource
metadata:
name: virtualmachines.compute.example.com
spec:
resource:
apiGroup: compute.example.com
versions: [v1]
kind: VirtualMachine
naming:
namespace: 'ws-{{ .ClusterName }}-{{ .Object.metadata.namespace | sha3short }}'
name: '{{ .Object.metadata.name }}'
related:
- identifier: network
origin: kcp
group: network.example.com
version: v1
resource: networks
identityHash: ${NETWORKS_API_EXPORT_IDENTITY_HASH}
object:
reference:
path: spec.networkRef.name
- consumer: bind both
APIExports, apply manifests, and deleteVirtualMachine
---
apiVersion: network.example.com/v1
kind: Network
metadata:
name: network
spec:
cidrBlock: "192.168.0.0/24"
---
apiVersion: compute.example.com/v1
kind: VirtualMachine
metadata:
name: vm
spec:
networkRef:
name: network
Expected Behaviour
The VirtualMachine should get deleted successfully
Additional Context
- Ngôn ngữ chính
- Go
- Star
- 25
- Fork
- 30
- Merge trung bình
- 5 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 kcp-dev/api-syncagent
-
kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
kcp-dev/api-syncagent#163 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
kcp-dev/api-syncagent#161 ·
-
bug: failed sync controller prevents subsequent startup retriesCó thể đã có người làm @Sarthak-Shreshtha01 đã nhận 3 ngày trước. Đang mởkind/bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 20/100
kcp-dev/api-syncagent#190 · 1 bình luận ·
-
bug: dangling schema in an APIExport is neither removed nor reportedCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
kcp-dev/api-syncagent#188 · 1 bình luận ·
-
kind/feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
kcp-dev/api-syncagent#186 · 1 bình luận · 1 reaction ·
Tất cả issue của kcp-dev/api-syncagent
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
prime-radiant-inc/evener#4329 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add `pdfcpu` to the pantryĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
openwatersio/aiscast#277 ·
Maintainer thường phản hồi trong vòng 1 ngày