diff --git a/kuryr_cni/main.go b/kuryr_cni/main.go index 7784c179a..0dd13a0b5 100644 --- a/kuryr_cni/main.go +++ b/kuryr_cni/main.go @@ -4,14 +4,13 @@ import ( "bytes" "encoding/json" "fmt" - "github.com/containernetworking/cni/pkg/types" "io/ioutil" "log" "net" "net/http" - "runtime" "github.com/containernetworking/cni/pkg/skel" + "github.com/containernetworking/cni/pkg/types" cni "github.com/containernetworking/cni/pkg/types" "github.com/containernetworking/cni/pkg/types/current" "github.com/containernetworking/cni/pkg/version" @@ -37,13 +36,6 @@ type KuryrDaemonData struct { KuryrConf interface{} `json:"config_kuryr"` } -func init() { - // this ensures that main runs only on main thread (thread group leader). - // since namespace ops (unshare, setns) are done for a single thread, we - // must ensure that the goroutine does not jump from OS thread to thread - runtime.LockOSThread() -} - func transformData(args *skel.CmdArgs, command string) (KuryrDaemonData, error) { var conf interface{} err := json.Unmarshal(args.StdinData, &conf)