Closed GeorgFoc closed 4 years ago
Hello @GeorgFoc, thanks for opening of the Issue!
OVS CNI database is persistent across reboots. We also save metadata of Pod connections to its database (https://github.com/kubevirt/ovs-cni/blob/d61bd2b26f6c1df8ed38a4572b2ab4adaf48245d/pkg/ovsdb/ovsdb.go#L298). So when a new CNI attachment is executed on the same pod after reboot, we employ the same metadata and that breaks the code.
The fix would be to add cleanup to ADD, so if there is a leftover port from previous run, we would clean it up. Or alternatively fix the code that fails due to the collision of metadata.
I don't have capacity to fix this at the moment, would you mind looking into it and proposing a PR?
Hi @phoracek, thanks for the quick answer. I will give the issue to our go developers to look into it. We will hopefully make a PR soon.
Resoled: #109
@GeorgFoc @fhofherr I released a new version of OVS CNI which includes the fix: https://github.com/kubevirt/ovs-cni/releases/tag/v0.11.0
Closing since there was no recent activity and this seems to be resolved.
Hi, I think we found a bug maybe. Or I made a misstake with the configuration and would be thankful for help.
Generel the ovs-cni works great. But if I hard kill a Kubernetes Node (or do a reboot without draining the node), on which are pods running with the ovs-cni, the pods does not restart propably.
I startet the samplepod from the documentation and than reboot the ubuntu system which runs the kubernetes node (with
reboot
, no drain before). Before the reboot, the pod is running well. After the reboot kubectl get pods says:samplepod-1 0/1 Error 0 8m1s <none>
When I describe the Pod I get:
Normal SandboxChanged 8s (x14 over 2m41s) kubelet, HOSTNAME Pod sandbox changed, it will be killed and re-created.
And the Kubelet Log says:
The Openvswitch Log says after reboot:
Here some Informations, which could help to reproduce this behaviour: Kubernetes on Bare Metal Server Kubernetes Version: v1.16.3 Multus-CNI Version: v3.4
Here is the deployment yaml:
Thanks for your help. And let me know, if you need more inforamtions.