Fix get_schema_helper bug in some case

Bug #1674889 reported by Dong Jun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-ovn
Fix Released
High
Dong Jun
neutron
Fix Released
Undecided
Dong Jun
ovsdbapp
Invalid
Undecided
Unassigned

Bug Description

When thread of ovn ovsdb-server is not present, then start or restart neutron-server, manager was set to openvswitch. Neutron-server can no longer connect to ovn ovsdb for occupied port 6642 unless delete manager manually.
Manager "ptcp:6642:10.157.0.159"
    Bridge br-int
        fail_mode: secure

This is not a bug that always exists, it's caused by some neutron recent modification. I will port idlutils.get_schema_helper from ovsdbapp to neutron, and in networking-ovn, will pass try_add_manager=False

I also submitted a bug[1] in neutron a few days ago, now it is merged into this one.

[1] https://bugs.launchpad.net/neutron/+bug/1672590

Dong Jun (dongj)
description: updated
Dong Jun (dongj)
Changed in networking-ovn:
assignee: nobody → Dong Jun (dongj)
Dong Jun (dongj)
description: updated
Changed in neutron:
assignee: nobody → Dong Jun (dongj)
Changed in neutron:
status: New → In Progress
Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Is that 6642 port something specific used by OVN?

tags: added: needs-attention
Changed in neutron:
status: In Progress → Incomplete
tags: added: ovs
Revision history for this message
Han Zhou (zhouhan) wrote :

Jun, what do you mean:
> When thread of ovn ovsdb-server is not present

I am a little bit confused what are the steps to reproduce this problem.

@Ihar, 6642 is the default port of OVN southbound DB. networking-ovn connects to two ovsdb servers: OVN northbound DB (default port 6641) and OVN southbound DB (default port 6642).

Revision history for this message
Dong Jun (dongj) wrote :

@Han
You can reproduce it simply by following steps when using TCP connection: 1, Kill ovsdb-server of OVN_Northbound; 2, Restart neutron-server; 3, Start OVN_Northbound ovsdb-server again. Then neutron-server can not establish connection to OVN_Northbound.

Changed in neutron:
status: Incomplete → In Progress
Han Zhou (zhouhan)
Changed in networking-ovn:
status: New → In Progress
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (master)

Reviewed: https://review.openstack.org/448447
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=826943a91e8ada5ac2014542faf518be4d4abb64
Submitter: Jenkins
Branch: master

commit 826943a91e8ada5ac2014542faf518be4d4abb64
Author: Dong Jun <email address hidden>
Date: Wed Mar 22 16:28:25 2017 +0800

    Fix OvnBaseConnection.get_schema_helper bug in some case

    When thread of ovn ovsdb-server is not present(e.g. kill the process),
    restart neutron-server and then start ovn ovsdb-server, neutron-server
    can no longer connect to ovn ovsdb unless I delete ovs manager manually.
    This bug is not always exists, it's caused by some recent neutron
    modification. Neutron code moved Connection.get_schema_helper() logic
    to idlutils.get_schema_helper()[1], the change affects OvnBaseConnection.
    get_schema_helper(), because enable_connection_uri() is called again.
    Use idlutils._get_schema_helper() instead of idlutils.get_schema_helper()
    to fix this bug.
    [1]https://github.com/openstack/neutron/blob/master/neutron/agent/ovsdb/native/connection.py#L123-L129

    Change-Id: I01a3a65f264bd7e080f9aa2c5e2482dbe07694f4
    Partial-Bug: #1674889
    Signed-off-by: Dong Jun <email address hidden>

Dong Jun (dongj)
Changed in ovsdbapp:
status: New → Invalid
Han Zhou (zhouhan)
Changed in networking-ovn:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/448861
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=f95d33ec6e58915aeb1fbaa27588334920752eb5
Submitter: Jenkins
Branch: master

commit f95d33ec6e58915aeb1fbaa27588334920752eb5
Author: Dong Jun <email address hidden>
Date: Wed Mar 29 11:58:16 2017 +0800

    Port idlutils.get_schema_helper from ovsdbapp to neutron

    There is a fatal error in networking-ovn in some case, so I port
    idlutils.get_schema_helper from ovsdbapp to neutron and add some unit
    tests. Networking-ovn will pass try_add_manager=False to it.

    Change-Id: I12461c96f7a2845b3155fd587fb1fcc84ecf85f0
    Partial-Bug: #1674889

Dong Jun (dongj)
Changed in neutron:
status: In Progress → Fix Committed
Dong Jun (dongj)
Changed in networking-ovn:
status: Fix Committed → Fix Released
Changed in neutron:
status: Fix Committed → Fix Released
tags: added: neutron-proactive-backport-potential
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.