Prepare your environment for OVN migration

Environment assessment and preparation is critical to a successful migration. Your Red Hat Technical Account Manager or Global Professional Services will guide you through the steps.

Before you begin

  • Your deployment is the latest RHOSP 17.1 version. In other words, if you need to upgrade or update your OpenStack version, perform the upgrade or update first, and then perform the OVN migration.
  • At least one IP address is available for each subnet pool. The OVN mechanism driver creates a metadata port for each subnet. Each metadata port claims an IP address from the IP address pool.
  • You have worked with your Red Hat Technical Account Manager or Global Professional Services to plan the migration and have filed a proactive support case. See How to open a proactive case for a planned activity on Red Hat OpenStack Platform.
  • If your ML2/OVS deployment uses VXLAN project networks, review the potential adjustments described in Lower MTU for migration from a VXLAN OVS deployment.

Procedure

  1. Create an ML2/OVN stage deployment to obtain the baseline configuration of your target ML2/OVN deployment and test the feasibility of the target deployment.

    Design the stage deployment with the same basic roles, routing, and topology as the planned post-migration production deployment. Save the full openstack overcloud deploy command, along with all deployment arguments, into a file called overcloud-deploy.sh. Also save any files referenced by the openstack overcloud deploy command, such as environment files. You need these files later in this procedure to configure the migration's target ML2/OVN environment.

    Notice
    Use these files only for creation of the stage deployment and in the migration. Do not re-use them after the migration.
  2. Install openstack-neutron-ovn-migration-tool:
    sudo dnf install openstack-neutron-ovn-migration-tool
  3. Copy the overcloud-deploy.sh script that you created in Step 1 and rename the copy to overcloud-migrate-ovn.sh.

    Confirm that all paths for the overcloud deploy command inside the overcloud-migrate-ovn.sh are still correct. You customize some arguments in the overcloud-migrate-ovn.sh script in subsequent steps.

  4. Find your migration scenario in the following list and perform the appropriate steps to customize the openstack deploy command in overcloud-migrate-ovn.sh.

    In the deployment command, pay careful attention to the order of the -e arguments that add environment files. The environment file with the generic defaults (such as neutron-ovn-dvr-ha.yaml) must precede the -e argument that specifies the file with custom network environment settings such as bridge mappings.

    Scenario 1: DVR to DVR, Compute nodes have connectivity to the external network

    In overcloud-migrate-ovn.sh, add custom heat template file arguments to the openstack overcloud deploy command. Add them after the core template file arguments. The following command example uses the default neutron-ovn-dvr-ha.yaml heat template file. Your deployment might use multiple heat files to define your OVN environment. Add each with a separate -e argument.

    openstack overcloud deploy \
    --templates /usr/share/openstack-tripleo-heat-templates \
    ... \
    -e /usr/share/openstack-tripleo-heat-templates/environments/services/neutron-ovn-dvr-ha.yaml
    Scenario 2: Centralized routing to centralized routing (no DVR)

    Set up the deployment command as described in Scenario 1, but use neutron-ovn-ha.yaml instead of neutron-ovn-dvr-ha.yaml. If your deployment uses SR-IOV and other NFV features, in overcloud-migrate-ovn.sh, use -e arguments to add the SR-IOV environment parameters to the openstack overcloud deploy command. Add the SR-IOV environment files after the core template environment file arguments and other custom environment file arguments. For an example of SR-IOV environment file, see /usr/share/openstack-tripleo-heat-templates/environments/services/neutron-ovn-sriov.yaml. Leave any custom network modifications the same as they were before migration.

    Scenario 3: Centralized routing to DVR, and Compute nodes connected to external networks through br-ex

    Ensure that Compute nodes are connected to the external network through the br-ex bridge. For example, in an environment file such as compute-dvr.yaml, set the following parameters. Then use -e to add the environment file to the openstack overcloud deploy command in the script overcloud-migrate-ovn.sh:

    type: ovs_bridge
    # Defaults to br-ex, anything else requires specific # bridge mapping entries for it to be used.
    name: bridge_name
    use_dhcp: false
    members:
    -
    type: interface
    name: nic3
    # force the MAC address of the bridge to this interface
    primary: true
  5. Add the following arguments at the end of the overcloud deploy command in overcloud-migrate-ovn.sh:
    -e /usr/share/openstack-tripleo-heat-templates/environments/disable-container-manage-clean-orphans.yaml
    -e $HOME/ovn-extras.yaml
  6. If router appears as a value for NeutronServicePlugins or NeutronPluginExtensions in any environment file or template, replace the value router with ovn-router.

    For example, in tripleo-heat-templates/environments/services/neutron-ovn-dvr-ha.yaml:

    parameter_defaults:
    NeutronServicePlugins: "ovn-router,trunk,qos,placement"
  7. Ensure that all users have execution privileges on the file overcloud-migrate-ovn.sh.

    The script requires execution privileges during the migration process.

    $ chmod a+x ~/overcloud-migrate-ovn.sh
  8. Use export commands to set the following migration-related environment variables:
    $ export OVERCLOUDRC_FILE=~/myovercloudrc
    STACKRC_FILE
    The stackrc file in your undercloud. Default: ~/stackrc
    OVERCLOUDRC_FILE
    The overcloudrc file in your undercloud. Default: ~/overcloudrc
    OVERCLOUD_OVN_DEPLOY_SCRIPT
    The deployment script. Default: ~/overcloud-migrate-ovn.sh
    DHCP_RENEWAL_TIME
    DHCP renewal time in seconds to configure in DHCP agent configuration file. Default: 30
  9. Ensure that you are in the ovn-migration directory and run the command ovn_migration.sh generate-inventory to generate the hosts_for_migration inventory file and the ansible.cfg file:
    $ ovn_migration.sh generate-inventory | sudo tee -a /var/log/ovn_migration_output.txt
  10. Review the hosts_for_migration file for accuracy:
    1. Ensure the lists match your environment.
    2. Ensure there are ovn controllers on each node.
    3. Ensure there are no list headings (such as [ovn-controllers]) that do not have list items under them.
    4. From the ovn-migration directory, run the command:ansible -i hosts_for_migration -m ping all