Skip to content

Commit fb16669

Browse files
committed
[ovn][migration] Support migration to OVN from iptables firewall
Before this patch, when migrating from ML2/OVS to ML2/OVN, we removed the VIF details that are not used by OVN. However, this changes how the VIFs are plugged if the hybrid iptables firewall was used. In order to not break the migration, we want to keep whatever plugging was used in ML2/OVS. For this reason, this patch is leaving the VIF details untouched. The consequence is that, after migration, whatever workloads used the hybrid plugging will remain like that. Newly created VIFs will be plugged to the OVS bridge directly. As a result, the migration to OVN won't require moving to the OVS firewall first while in ML2/OVS. This patch is also removing the constraint that prevented the migration if the hybrid firewall was used. Signed-off-by: Daniel Alvarez Sanchez <[email protected]> Change-Id: Iad4fae7af54cc502ac0ba02a911cdd4fefa13535 (cherry picked from commit 5f2eaad)
1 parent 28e554c commit fb16669

File tree

4 files changed

+6
-23
lines changed

4 files changed

+6
-23
lines changed

neutron/plugins/ml2/drivers/ovn/db_migration.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@
3030
LOG = logging.getLogger(__name__)
3131

3232
VIF_DETAILS_TO_REMOVE = (
33-
pb_api.OVS_HYBRID_PLUG,
34-
pb_api.VIF_DETAILS_BRIDGE_NAME)
33+
pb_api.VIF_DETAILS_BRIDGE_NAME,
34+
)
3535

3636

3737
def migrate_neutron_database_to_ovn():
3838
"""Change DB content from OVS to OVN mech driver.
3939
4040
- Changes vxlan network type to Geneve and updates Geneve allocations.
41-
- Removes unnecessary settings from port binding vif details, such as
42-
connectivity, bridge_name and ovs_hybrid_plug, as they are not used by
43-
OVN.
41+
- Removes bridge name from port binding vif details to support operations
42+
on instances with a trunk bridge.
43+
- Updates the port profile for trunk ports.
4444
"""
4545
ctx = n_context.get_admin_context()
4646
with db_api.CONTEXT_WRITER.using(ctx) as session:

neutron/tests/unit/plugins/ml2/drivers/ovn/test_db_migration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def test_db_migration(self):
152152
]
153153
expected_vif_details = [
154154
{pb.CAP_PORT_FILTER: "true",
155+
pb.OVS_HYBRID_PLUG: "true",
155156
pb.VIF_DETAILS_CONNECTIVITY: pb.CONNECTIVITY_L2},
156157
{pb.CAP_PORT_FILTER: "true"},
157158
{"foo": "bar"},

tools/ovn_migration/tripleo_environment/playbooks/ovn-migration.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@
1414
- pre-migration
1515

1616

17-
- name: Pre migration checks in the OVN controllers
18-
hosts: ovn-controllers
19-
roles:
20-
- pre-checks/ovn-controllers
21-
tags:
22-
- pre-migration
23-
24-
2517
#
2618
# This step is executed before migration, and will backup some config
2719
# files related to containers before those get lost.

tools/ovn_migration/tripleo_environment/playbooks/roles/pre-checks/ovn-controllers/tasks/main.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)