You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
As it's been mentioned in #2388 , the WithNetNS* family of functions and their usage are not safe. To address the issues, the work function has to be executed in a separate process which is not associated with the Go runtime process which created it.
Currently, WithNetNS* is used by the following functions:
common/utils.go:FindNetDevs
common/utils.go:GetWeaveNetDevs
net/veth.go:interfaceExistsInNamespace
net/veth.go:AttachContainer
net/veth.go:DetachContainer
plugin/net/cni.go:CmdAdd
plugin/net/cni.go:CmdDel
In some cases, shelling out is not necessary - it's enough to move a netns dependant code to the end of execution and to ensure that the code does not create any go-routine which require a particular netns.
The text was updated successfully, but these errors were encountered:
plugin/net/cni.go:CmdAdd: it does not require any changes, because the WithNetNS* call happens at the very end of execution and the CNI plugin stops a process once it has finished processing the request.
As a subtask: add a shim for starting a process or do the init hack to make sure that all threads of the runtime is in a given netns. Otherwise, we cannot create any go-routine inside a former work() function.
As it's been mentioned in #2388 , the
WithNetNS*
family of functions and their usage are not safe. To address the issues, the work function has to be executed in a separate process which is not associated with the Go runtime process which created it.Currently,
WithNetNS*
is used by the following functions:common/utils.go:FindNetDevs
common/utils.go:GetWeaveNetDevs
net/veth.go:interfaceExistsInNamespace
net/veth.go:AttachContainer
net/veth.go:DetachContainer
plugin/net/cni.go:CmdAdd
plugin/net/cni.go:CmdDel
In some cases, shelling out is not necessary - it's enough to move a netns dependant code to the end of execution and to ensure that the code does not create any go-routine which require a particular netns.
The text was updated successfully, but these errors were encountered: