Description of problem: We switched in 4.8 to use the new services controller for endpoint slices. However when a node is added it tries to sync services using the old controller. There is deadlock here around the services cache we hold using the old controller: goroutine 1330 [semacquire]: sync.runtime_SemacquireMutex(0xc000ba0f9c, 0x0, 0x1) /usr/lib/golang/src/runtime/sema.go:71 +0x47 sync.(*Mutex).lockSlow(0xc000ba0f98) /usr/lib/golang/src/sync/mutex.go:138 +0x105 sync.(*Mutex).Lock(...) /usr/lib/golang/src/sync/mutex.go:81 github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).removeServiceLB(0xc000ba0e00, 0xc022db8d50, 0x24, 0xc023eecd60, 0x11) /go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/ovn.go:1117 +0xf6 github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).deleteLoadBalancerVIP(0xc000ba0e00, 0xc022db8d50, 0x24, 0xc023eecd60, 0x11, 0x0, 0x0) /go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/loadbalancer.go:72 +0x3fe github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).deleteServiceFromIdlingBalancer(0xc000ba0e00, 0xc0016b76c0) /go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/service.go:299 +0x37a github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).AddEndpoints(0xc000ba0e00, 0xc001901300, 0x0, 0xc024c3bbc0, 0x2) /go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/endpoints.go:75 +0x3a5 github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).handleNodePortLB(0xc000ba0e00, 0xc000a06540, 0xc036048e60, 0xa) /go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/endpoints.go:166 +0x125 github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).syncGatewayLogicalNetwork(0xc000ba0e00, 0xc000a06540, 0xc034951200, 0xc017798670, 0x1, 0x1, 0xc021a79680, 0xc0253cd2f0, 0x24) /go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/master.go:702 +0xf19 github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).syncNodeGateway(0xc000ba0e00, 0xc000a06540, 0xc017798670, 0x1, 0x1, 0x0, 0x0) /go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/ovn.go:926 +0xff github.com/ovn-org/ovn-kubernetes/go-controller/pkg/ovn.(*Controller).WatchNodes.func1(0x1bdb960, 0xc000a06540) /go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/ovn/ovn.go:970 +0x66c k8s.io/client-go/tools/cache.ResourceEventHandlerFuncs.OnAdd(...) /go/src/github.com/openshift/ovn-kubernetes/go-controller/vendor/k8s.io/client-go/tools/cache/controller.go:231 k8s.io/client-go/tools/cache.FilteringResourceEventHandler.OnAdd(0xc005b792c0, 0x1e79ce0, 0xc00590d5a0, 0x1bdb960, 0xc000a06540) /go/src/github.com/openshift/ovn-kubernetes/go-controller/vendor/k8s.io/client-go/tools/cache/controller.go:264 +0x6a github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory.(*Handler).OnAdd(...) /go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/factory/handler.go:38 github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory.newQueuedInformer.func1.1(0xc009bb0450, 0xc005dfaa20, 0xc005dff260) /go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/factory/handler.go:367 +0xaf created by github.com/ovn-org/ovn-kubernetes/go-controller/pkg/factory.newQueuedInformer.func1 /go/src/github.com/openshift/ovn-kubernetes/go-controller/pkg/factory/handler.go:360 +0x10a
Created attachment 1781723 [details] ovnkube master log with stack trace
4.8 solution to this is to stop using the old endpoints/services controller and only use the new controller
*** Bug 1947861 has been marked as a duplicate of this bug. ***
Marking this bug verified based on successful verification of https://bugzilla.redhat.com/show_bug.cgi?id=1958958 at 300 nodes and 15000 pods on 4.8.0-0.nightly-2021-06-09-095212
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:2438