[OVN] Run maintenance task whenever the OVN DB schema has been upgraded

Bug #1864641 reported by Daniel Alvarez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Lucas Alvares Gomes

Bug Description

When OVN DBs are upgraded (and restarted), there might be cases whenever we want to accommodate things to a new schema. In this situation we don't want to force a restart of neutron-server (or metadata agent) but instead, detect it and run whatever is needed.

This can be achieved by checking the schema version via ovsdbapp [0] and comparing if it's bigger than what we had upon a reconnection to the OVN DBs.

[0] https://github.com/openvswitch/ovs/blob/master/python/ovs/db/schema.py#L35

tags: added: ovn
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/709770

Changed in neutron:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/709770
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9e416224b04d7d4094e5719afa4ef5bccbe48ce7
Submitter: Zuul
Branch: master

commit 9e416224b04d7d4094e5719afa4ef5bccbe48ce7
Author: Lucas Alvares Gomes <email address hidden>
Date: Tue Feb 25 15:14:54 2020 +0000

    [OVN] OVN DB schema update aware maintenance tasks

    This patch introduces a new mechanism to allow rerunning maintenance
    tasks upon an OVN database schema change to avoid a service restart.

    As an example, the "migrate_to_port_groups" maintenance task will run
    again when the database schema is updated. In case of a migration from
    an OVN version without port groups support to a version that supports
    it, the OVN driver will migrate the code automatically without the need
    of a service restart.

    Closes-Bug: #1864641
    Change-Id: I520a3de105b4c6924908e099a3b8d60c3280f499
    Signed-off-by: Lucas Alvares Gomes <email address hidden>

Changed in neutron:
status: In Progress → 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.