Merge "[ovn][migration] Support migration to OVN from iptables firewall"
This commit is contained in:
commit
ed2d5e7daa
@ -30,17 +30,17 @@ from neutron.objects import trunk as trunk_obj
|
|||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
VIF_DETAILS_TO_REMOVE = (
|
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():
|
def migrate_neutron_database_to_ovn():
|
||||||
"""Change DB content from OVS to OVN mech driver.
|
"""Change DB content from OVS to OVN mech driver.
|
||||||
|
|
||||||
- Changes vxlan network type to Geneve and updates Geneve allocations.
|
- Changes vxlan network type to Geneve and updates Geneve allocations.
|
||||||
- Removes unnecessary settings from port binding vif details, such as
|
- Removes bridge name from port binding vif details to support operations
|
||||||
connectivity, bridge_name and ovs_hybrid_plug, as they are not used by
|
on instances with a trunk bridge.
|
||||||
OVN.
|
- Updates the port profile for trunk ports.
|
||||||
"""
|
"""
|
||||||
ctx = n_context.get_admin_context()
|
ctx = n_context.get_admin_context()
|
||||||
with db_api.CONTEXT_WRITER.using(ctx) as session:
|
with db_api.CONTEXT_WRITER.using(ctx) as session:
|
||||||
|
@ -152,6 +152,7 @@ class TestMigrateNeutronDatabaseToOvn(
|
|||||||
]
|
]
|
||||||
expected_vif_details = [
|
expected_vif_details = [
|
||||||
{pb.CAP_PORT_FILTER: "true",
|
{pb.CAP_PORT_FILTER: "true",
|
||||||
|
pb.OVS_HYBRID_PLUG: "true",
|
||||||
pb.VIF_DETAILS_CONNECTIVITY: pb.CONNECTIVITY_L2},
|
pb.VIF_DETAILS_CONNECTIVITY: pb.CONNECTIVITY_L2},
|
||||||
{pb.CAP_PORT_FILTER: "true"},
|
{pb.CAP_PORT_FILTER: "true"},
|
||||||
{"foo": "bar"},
|
{"foo": "bar"},
|
||||||
|
@ -14,14 +14,6 @@
|
|||||||
- pre-migration
|
- 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
|
# This step is executed before migration, and will backup some config
|
||||||
# files related to containers before those get lost.
|
# files related to containers before those get lost.
|
||||||
|
@ -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"
|
|
Loading…
x
Reference in New Issue
Block a user