Bug 1724150

Summary: [OVN] ovn need to delete file /etc/openvswitch/ovnnb-active.conf after the test of ovn_cluster
Product: Red Hat Enterprise Linux Fast Datapath Reporter: haidong li <haili>
Component: openvswitchAssignee: Dumitru Ceara <dceara>
openvswitch sub component: other QA Contact: haidong li <haili>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: atragler, ctrautma, jishi, kfida, nusiddiq, qding, tredaelli
Version: FDP 19.D   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openvswitch-ovn-central-2.9.0-114.el7fdn Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-20 11:09:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description haidong li 2019-06-26 10:58:28 UTC
Description of problem:
ovn need to delete file /etc/openvswitch/ovnnb-active.conf after the test of ovn_cluster

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

[root@dell-per730-19 openvswitch]# rpm -qa | grep openvswitch
kernel-kernel-networking-openvswitch-ovn_ha-1.0-37.noarch
openvswitch-ovn-host-2.9.0-110.el7fdp.x86_64
openvswitch-2.9.0-110.el7fdp.x86_64
openvswitch-selinux-extra-policy-1.0-11.el7fdp.noarch
openvswitch-ovn-common-2.9.0-110.el7fdp.x86_64
kernel-kernel-networking-openvswitch-ovn-1.0-125.noarch
openvswitch-ovn-central-2.9.0-110.el7fdp.x86_64
[root@dell-per730-19 openvswitch]#

How reproducible:
everytime

Steps to Reproduce:
1.setup ovn_cluster topo,node A is slave node
2.stop cluster topo and use node A to be ovn server
3.ovn report error if try to configure ovn-nbctl unless delete the file /etc/openvswitch/ovnnb-active.conf

[root@dell-per730-19 openvswitch]# ovn-nbctl ls-add s888
ovn-nbctl: transaction error: {"details":"insert operation not allowed when database server is in read only mode","error":"not allowed"}
[root@dell-per730-19 openvswitch]# rm -f ovnnb-active.conf
[root@dell-per730-19 openvswitch]# systemctl restart ovn-northd
[root@dell-per730-19 openvswitch]# ovn-nbctl ls-add s888
[root@dell-per730-19 openvswitch]# ovn-nbctl ls-list
475d6fa7-3234-47ee-a8f8-ba80d5f0ed8b (9999)
ec001ca6-4bd9-40c0-af98-d4579ba7e865 (s888)


Actual results:


Expected results:


Additional info:

This issue doesn't exist on ovn2.11

Comment 4 haidong li 2019-08-02 03:26:06 UTC
This issue is verified on the latest version:
[root@dell-per740-05 openvswitch]# ovn-nbctl show
switch 86d99acd-0dd2-4cda-bc8d-214be9866bf2 (s88)
[root@dell-per740-05 openvswitch]# rpm -qa | grep openvswitch
openvswitch-ovn-central-2.9.0-114.el7fdp.x86_64
openvswitch-selinux-extra-policy-1.0-13.el7fdp.noarch
openvswitch-ovn-common-2.9.0-114.el7fdp.x86_64
openvswitch-ovn-host-2.9.0-114.el7fdp.x86_64
openvswitch-2.9.0-114.el7fdp.x86_64
[root@dell-per740-05 openvswitch]# 
[root@dell-per730-21 ovn_ha]# pcs status
Cluster name: my_cluster

WARNINGS:
Corosync and pacemaker node names do not match (IPs used in setup?)

Stack: corosync
Current DC: dell-per740-05.rhts.eng.pek2.redhat.com (version 1.1.20-5.el7-3c4c782f70) - partition with quorum
Last updated: Thu Aug  1 23:22:41 2019
Last change: Thu Aug  1 23:10:48 2019 by root via crm_attribute on dell-per730-21.rhts.eng.pek2.redhat.com

3 nodes configured
4 resources configured

Online: [ dell-per730-21.rhts.eng.pek2.redhat.com dell-per740-05.rhts.eng.pek2.redhat.com dell-per740-16.rhts.eng.pek2.redhat.com ]

Full list of resources:

 ip-192.168.60.50	(ocf::heartbeat:IPaddr2):	Started dell-per730-21.rhts.eng.pek2.redhat.com
 Master/Slave Set: ovndb_servers-master [ovndb_servers]
     Masters: [ dell-per730-21.rhts.eng.pek2.redhat.com ]
     Slaves: [ dell-per740-05.rhts.eng.pek2.redhat.com dell-per740-16.rhts.eng.pek2.redhat.com ]

Daemon Status:
  corosync: active/enabled
  pacemaker: active/enabled
  pcsd: active/enabled
[root@dell-per730-21 ovn_ha]# pcs cluster destroy --all
192.168.60.2: Stopping Cluster (pacemaker)...
192.168.60.20: Stopping Cluster (pacemaker)...
192.168.60.11: Stopping Cluster (pacemaker)...
192.168.60.2: Successfully destroyed cluster
192.168.60.20: Successfully destroyed cluster
192.168.60.11: Successfully destroyed cluster
[root@dell-per730-21 ovn_ha]# pcs status
Error: cluster is not currently running on this node

[root@dell-per740-05 openvswitch]# systemctl start ovn-northd
[root@dell-per740-05 openvswitch]# ovn-nbctl ls-add s88
[root@dell-per740-05 openvswitch]# ovn-nbctl show
switch 86d99acd-0dd2-4cda-bc8d-214be9866bf2 (s88)

Comment 6 errata-xmlrpc 2019-08-20 11:09:01 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:2529