neutron-ovn-db-sync-util stops with Traceback due to L3 service plugin expecting ``ovn`` mech driver to be present while ``ovn-sync`` mech driver is loaded

Bug #1882202 reported by Frode Nordahl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Frode Nordahl

Bug Description

The ``neutron-ovn-db-sync-util`` overrides the mechanism driver to be ``ovn-sync``[0]. Subsequently it calls into the OVN L3 service plugin [1] which expects the ``ovn`` mechanism driver to be present [2].

Do we need both mechanism drivers there, does the OVN L3 service plugin need to check for both or do we need a way to tell the service plugin which mechanism driver to use?

2020-06-05 07:33:11.005 1486514 CRITICAL neutron_ovn_db_sync_util [req-3c6fb887-7610-466c-adfb-07b6404475c1 - - - - -] Unhandled error: KeyError: 'ovn'
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util Traceback (most recent call last):
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util File "/usr/bin/neutron-ovn-db-sync-util", line 10, in <module>
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util sys.exit(main())
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util File "/usr/lib/python3/dist-packages/neutron/cmd/ovn/neutron_ovn_db_sync_util.py", line 221, in main
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util sb_synchronizer.do_sync()
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py", line 1215, in do_sync
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util self.l3_plugin.schedule_unhosted_gateways()
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util File "/usr/lib/python3/dist-packages/neutron/services/ovn_l3/plugin.py", line 340, in schedule_unhosted_gateways
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util chassis_with_physnets = self._sb_ovn.get_chassis_and_physnets()
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util File "/usr/lib/python3/dist-packages/neutron/services/ovn_l3/plugin.py", line 97, in _sb_ovn
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util return self._plugin_driver.sb_ovn
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util File "/usr/lib/python3/dist-packages/neutron/services/ovn_l3/plugin.py", line 108, in _plugin_driver
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util self._mech = self._plugin.mechanism_manager.mech_drivers['ovn'].obj
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util KeyError: 'ovn'
2020-06-05 07:33:11.005 1486514 ERROR neutron_ovn_db_sync_util

0: https://github.com/openstack/neutron/blob/c6e5e119b84a7d55e539509050ce56236ebf57c6/neutron/cmd/ovn/neutron_ovn_db_sync_util.py#L188
1: https://github.com/openstack/neutron/blob/c6e5e119b84a7d55e539509050ce56236ebf57c6/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_db_sync.py#L1213
2: https://github.com/openstack/neutron/blob/ef97c83e8753a668e0c0f405ef4beb027efa02cd/neutron/services/ovn_l3/plugin.py#L108

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/733775

Changed in neutron:
assignee: nobody → Frode Nordahl (fnordahl)
status: New → In Progress
Changed in neutron:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/733775
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=206ce246768d6fb04b6bd92e189188f6702c74a7
Submitter: Zuul
Branch: master

commit 206ce246768d6fb04b6bd92e189188f6702c74a7
Author: Frode Nordahl <email address hidden>
Date: Fri Jun 5 09:52:48 2020 +0200

    [OVN] Allow use of ovn-sync mechanism driver

    The ``neutron-ovn-db-sync-util`` replaces the ``ovn`` mechanism
    driver with the ``ovn-sync`` mechanism driver. Subsequently it
    makes calls into the OVN L3 service plugin.

    At present the OVN L3 service plugin assumes the ``ovn`` mechanism
    driver to be present and produces a Traceback when it is not.

    This patch fixes that by testing for both of the supported
    mechanism drivers.

    Change-Id: I1ac685a12f49119f5ef1428cbc504b639d783803
    Closes-Bug: #1882202
    Signed-off-by: Frode Nordahl <email address hidden>

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/738961

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/ussuri)

Reviewed: https://review.opendev.org/738961
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=ce2866a4f6c6ee06e835f19394c1dd02ef83cff5
Submitter: Zuul
Branch: stable/ussuri

commit ce2866a4f6c6ee06e835f19394c1dd02ef83cff5
Author: Frode Nordahl <email address hidden>
Date: Fri Jun 5 09:52:48 2020 +0200

    [OVN] Allow use of ovn-sync mechanism driver

    The ``neutron-ovn-db-sync-util`` replaces the ``ovn`` mechanism
    driver with the ``ovn-sync`` mechanism driver. Subsequently it
    makes calls into the OVN L3 service plugin.

    At present the OVN L3 service plugin assumes the ``ovn`` mechanism
    driver to be present and produces a Traceback when it is not.

    This patch fixes that by testing for both of the supported
    mechanism drivers.

    Change-Id: I1ac685a12f49119f5ef1428cbc504b639d783803
    Closes-Bug: #1882202
    Signed-off-by: Frode Nordahl <email address hidden>
    (cherry picked from commit 206ce246768d6fb04b6bd92e189188f6702c74a7)

tags: added: in-stable-ussuri
tags: added: neutron-proactive-backport-potential
tags: added: ovn
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.