Bug 2005985

Summary: ebay/go-ovn should connect to the raft leader when appropriate
Product: OpenShift Container Platform Reporter: Dan Williams <dcbw>
Component: NetworkingAssignee: Tim Rozet <trozet>
Networking sub component: ovn-kubernetes QA Contact: Anurag saxena <anusaxen>
Status: CLOSED DUPLICATE Docs Contact:
Severity: medium    
Priority: medium CC: anusaxen, bpickard, cdc, dcbw, trozet
Version: 4.9   
Target Milestone: ---   
Target Release: 4.9.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1999704 Environment:
Last Closed: 2021-09-29 15:31:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1959352, 1999704, 2076201    
Bug Blocks:    

Description Dan Williams 2021-09-20 15:41:59 UTC
+++ This bug was initially created as a clone of Bug #1999704 +++

When connecting to a clustered ovsdb, ovn-nbctl always connects to the leader. However, ebay/go-ovn doesn't do this.

We should duplicate that behavior.

In order to do it, you need to check the special _Server database that includes information as to whether or not the node is a leader.

You can see a similar implementation for ovn-org/libovsdb in https://github.com/ovn-org/libovsdb/pull/221

--- Additional comment from Dan Williams on 2021-09-20 10:39:35 CDT ---

Fixed upstream in ovnkube in https://github.com/ovn-org/ovn-kubernetes/pull/2464

Will be pulled into 4.10 when Tim does the next merge to downstream.

---------------

Since 4.9 and earlier use ebay/go-ovn and ebay/libovsdb, they need this support too. The work is done but needs upstreaming.

Comment 1 Tim Rozet 2021-09-29 15:31:58 UTC

*** This bug has been marked as a duplicate of bug 1959352 ***