diff --git a/neutron/plugins/ml2/drivers/ovn/db_migration.py b/neutron/plugins/ml2/drivers/ovn/db_migration.py index a351a4342b8..f1c6dbb93f0 100644 --- a/neutron/plugins/ml2/drivers/ovn/db_migration.py +++ b/neutron/plugins/ml2/drivers/ovn/db_migration.py @@ -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(): """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: diff --git a/neutron/tests/unit/plugins/ml2/drivers/ovn/test_db_migration.py b/neutron/tests/unit/plugins/ml2/drivers/ovn/test_db_migration.py index 51a1442d64d..ad7d56a39ec 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/ovn/test_db_migration.py +++ b/neutron/tests/unit/plugins/ml2/drivers/ovn/test_db_migration.py @@ -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"}, diff --git a/tools/ovn_migration/tripleo_environment/playbooks/ovn-migration.yml b/tools/ovn_migration/tripleo_environment/playbooks/ovn-migration.yml index 9b504ef59c7..340daca3bc3 100644 --- a/tools/ovn_migration/tripleo_environment/playbooks/ovn-migration.yml +++ b/tools/ovn_migration/tripleo_environment/playbooks/ovn-migration.yml @@ -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. diff --git a/tools/ovn_migration/tripleo_environment/playbooks/roles/pre-checks/ovn-controllers/tasks/main.yml b/tools/ovn_migration/tripleo_environment/playbooks/roles/pre-checks/ovn-controllers/tasks/main.yml deleted file mode 100644 index 7f8ebc410e9..00000000000 --- a/tools/ovn_migration/tripleo_environment/playbooks/roles/pre-checks/ovn-controllers/tasks/main.yml +++ /dev/null @@ -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"