ovn-org / ovn-kubernetes

A robust Kubernetes networking platform
https://ovn-kubernetes.io/
Apache License 2.0
818 stars 338 forks source link

Clean up orphaned nodes / handle missed deletions #617

Open squeed opened 5 years ago

squeed commented 5 years ago

If the master process is not running when a node is deleted, it will miss the event. There will then be orphaned resources, e.g. router ports.

This can be fixed in two ways - either by adding ovn-kube as a finalizer that blocks node deletion until the network resources are cleaned up, or by having a separate reconciliation loop that looks for orphaned northbound rows.

We've been idly chatting for a while about building a full reconciliation loop, so that may be the way to go.

girishmg commented 5 years ago

@squeed I agree that the reconciliation loop will be better. This loop will also ensure that the OVN DBs are in sync with the Source of Truth in K8s (aka etcd cluster) and perhaps add any missing OVN logical resources or remove any stale OVN logical resources.

shettyg commented 5 years ago

We do that for specific resources like pods, services etc. i.e we look at pods in k8s and then look at logical ports in OVN and delete any that did not exist. Same thing will have to be done for nodes.