Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.

Bug 1761577

Summary: [RHEL 8] ovsdb-server doesn't apply the db server status change to all the json rpc sessions few times.
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Numan Siddique <nusiddiq>
Component: openvswitch2.11Assignee: Numan Siddique <nusiddiq>
Status: CLOSED ERRATA QA Contact: haidong li <haili>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: FDP 19.GCC: ctrautma, jhsiao, jishi, kfida, ovs-qe, qding, ralongi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1761572 Environment:
Last Closed: 2019-11-06 05:22:47 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: 1761572    
Bug Blocks: 1761573, 1761575    

Description Numan Siddique 2019-10-14 18:54:13 UTC
+++ This bug was initially created as a clone of Bug #1761572 +++

Description of problem:
In an OVN deployment when ovsdb-server failover happens, it can happen that some ovn-controllers connect to the ovsdb-server master in read-only mode. Once the ovsdb-servers are promoted to master, ideally ovn-controller should reconnect again and have read-write access to the db. But some times, the connection is not reset and these ovn-controller remain connected to the ovsdb-servers' in read-only mode. Because of which they cannot write to the SB db. This causes VM boot failures and mac_binding write failures.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 haidong li 2019-10-17 03:41:11 UTC
reproduced on the old version:
[root@dell-per730-42 ovn]# ovn-nbctl --detach
/var/run/openvswitch/ovn-nbctl.34019.ctl
[root@dell-per730-42 ovn]# NB_PATH=/var/run/openvswitch/ovn-nbctl.34019.ctl
[root@dell-per730-42 ovn]# echo $NB_PATH
/var/run/openvswitch/ovn-nbctl.34019.ctl
[root@dell-per730-42 ovn]# ovs-appctl -t $NB_PATH run ls-add tst
root@dell-per730-42 openvswitch]# ovs-appctl -t /var/run/openvswitch/ovnnb_db.ctl ovsdb-server/set-active-ovsdb-server tcp:192.0.2.254:6641
[root@dell-per730-42 openvswitch]# ovs-appctl -t /var/run/openvswitch/ovnnb_db.ctl ovsdb-server/connect-active-ovsdb-server
[root@dell-per730-42 openvswitch]# ovs-appctl -t $NB_PATH run ls-add tst1
transaction error: {"details":"insert operation not allowed when database server is in read only mode","error":"not allowed"}
ovs-appctl: /var/run/openvswitch/ovn-nbctl.34019.ctl: server returned an error
[root@dell-per730-42 openvswitch]# ovs-appctl -t /var/run/openvswitch/ovnnb_db.ctl ovsdb-server/disconnect-active-ovsdb-server
[root@dell-per730-42 openvswitch]# ovs-appctl -t $NB_PATH run ls-add tst2
ovs-appctl: /var/run/openvswitch/ovn-nbctl.34019.ctl: server returned an error
[root@dell-per730-42 openvswitch]#

==============================================================================================================================

verified on the latest version:
[root@dell-per730-42 openvswitch]# rpm -qa | grep openvswitch
kernel-kernel-networking-openvswitch-ovn-1.0-148.noarch
openvswitch2.11-2.11.0-24.el8fdp.x86_64
openvswitch-selinux-extra-policy-1.0-19.el8fdp.noarch
[root@dell-per730-42 openvswitch]#
[root@dell-per730-42 openvswitch]# ovn-nbctl --detach
/var/run/openvswitch/ovn-nbctl.44122.ctl
[root@dell-per730-42 openvswitch]# NB_PATH=/var/run/openvswitch/ovn-nbctl.44122.ctl
[root@dell-per730-42 openvswitch]# ovs-appctl -t $NB_PATH run ls-add tst
tst: a switch with this name already exists
ovs-appctl: /var/run/openvswitch/ovn-nbctl.44122.ctl: server returned an error
[root@dell-per730-42 openvswitch]# ovs-appctl -t $NB_PATH run ls-add test
[root@dell-per730-42 openvswitch]# ovs-appctl -t /var/run/openvswitch/ovnnb_db.ctl ovsdb-server/set-active-ovsdb-server tcp:192.0.2.254:6641
[root@dell-per730-42 openvswitch]# ovs-appctl -t /var/run/openvswitch/ovnnb_db.ctl ovsdb-server/connect-active-ovsdb-server
[root@dell-per730-42 openvswitch]# ovs-appctl -t $NB_PATH run ls-add test1
transaction error: {"details":"insert operation not allowed when database server is in read only mode","error":"not allowed"}
ovs-appctl: /var/run/openvswitch/ovn-nbctl.44122.ctl: server returned an error
[root@dell-per730-42 openvswitch]# ovs-appctl -t /var/run/openvswitch/ovnnb_db.ctl ovsdb-server/disconnect-active-ovsdb-server
[root@dell-per730-42 openvswitch]# ovs-appctl -t $NB_PATH run les-add tst2
unknown command 'les-add'; use --help for help
ovs-appctl: /var/run/openvswitch/ovn-nbctl.44122.ctl: server returned an error
[root@dell-per730-42 openvswitch]# ovs-appctl -t $NB_PATH run ls-add test2
[root@dell-per730-42 openvswitch]#

Comment 4 errata-xmlrpc 2019-11-06 05:22:47 UTC
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, 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/RHBA-2019:3720