-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Apparently, it is impossible to reliably work with network namespaces in a long-running golang process because the goroutine scheduler's shenanigans are incompatible with APIs that set current-thread state; calling ns.Set() or ns.Do() may cause other goroutines to change their current namespace as well. (eg, containernetworking/cni#262, https://www.weave.works/blog/linux-namespaces-and-go-don-t-mix)
I don't know of any bugs we've seen that would be explained by our getting this wrong, but it seems likely that there must be some, and if not there eventually will be.
So we need to move at least half of pod_linux.go over to sdn-cni-plugin... Basically, we probably don't want to import any of the CNI packages into the openshift binary. The OVS-manipulating parts of pod_linux.go would probably stay in the openshift binary.