Bug 1960057 - [4.7z] [SCALE] deadlock in ovn-kube when scaling up to 300 nodes
Summary: [4.7z] [SCALE] deadlock in ovn-kube when scaling up to 300 nodes
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.7
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.7.z
Assignee: Mohamed Mahmoud
QA Contact: Anurag saxena
URL:
Whiteboard: perfscale-ovn
Depends On: 1958972
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-12 23:16 UTC by Mohamed Mahmoud
Modified: 2021-06-08 16:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1958972
Environment:
Last Closed: 2021-06-08 16:08:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mohamed Mahmoud 2021-05-12 23:16:15 UTC
+++ This bug was initially created as a clone of Bug #1958972 +++

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

--- Additional comment from Tim Rozet on 2021-05-10 14:29:56 UTC ---



--- Additional comment from Tim Rozet on 2021-05-10 14:30:37 UTC ---

4.8 solution to this is to stop using the old endpoints/services controller and only use the new controller

--- Additional comment from Mohamed Mahmoud on 2021-05-12 19:06:21 UTC ---


Note You need to log in before you can comment on or make changes to this bug.