Merge "[ovn][migration] Support migration to OVN from iptables firewall" into stable/xena

This commit is contained in:
Zuul 2022-05-05 18:24:23 +00:00 committed by Gerrit Code Review
commit 2f7cb18941
4 changed files with 6 additions and 23 deletions

View File

@ -30,17 +30,17 @@ from neutron.objects import trunk as trunk_obj
LOG = logging.getLogger(__name__)
VIF_DETAILS_TO_REMOVE = (
pb_api.OVS_HYBRID_PLUG,
pb_api.VIF_DETAILS_BRIDGE_NAME)
pb_api.VIF_DETAILS_BRIDGE_NAME,
)
def migrate_neutron_database_to_ovn(plugin):
"""Change DB content from OVS to OVN mech driver.
- Changes vxlan network type to Geneve and updates Geneve allocations.
- Removes unnecessary settings from port binding vif details, such as
connectivity, bridge_name and ovs_hybrid_plug, as they are not used by
OVN.
- Removes bridge name from port binding vif details to support operations
on instances with a trunk bridge.
- Updates the port profile for trunk ports.
"""
ctx = n_context.get_admin_context()
with db_api.CONTEXT_WRITER.using(ctx) as session:

View File

@ -152,6 +152,7 @@ class TestMigrateNeutronDatabaseToOvn(
]
expected_vif_details = [
{pb.CAP_PORT_FILTER: "true",
pb.OVS_HYBRID_PLUG: "true",
pb.VIF_DETAILS_CONNECTIVITY: pb.CONNECTIVITY_L2},
{pb.CAP_PORT_FILTER: "true"},
{"foo": "bar"},

View File

@ -14,14 +14,6 @@
- pre-migration
- name: Pre migration checks in the OVN controllers
hosts: ovn-controllers
roles:
- pre-checks/ovn-controllers
tags:
- pre-migration
#
# This step is executed before migration, and will backup some config
# files related to containers before those get lost.

View File

@ -1,10 +0,0 @@
---
- name: Read OVS configuration file and extract "firewall_driver" variable.
set_fact:
firewall_driver: "{{ lookup('ini', 'firewall_driver section=securitygroup file=/var/lib/config-data/puppet-generated/neutron/etc/neutron/plugins/ml2/openvswitch_agent.ini', allow_no_value=True) }}"
- name: Check OVS agent firewall is not using "iptables_hybrid" option
assert:
that:
- "'iptables_hybrid' != firewall_driver"
fail_msg: "OVS agent firewall cannot be 'iptables_hybrid', migration will not continue"