Chapter 14. Updating network configuration You must complete some network configuration to prepare for the overcloud upgrade. 14.1. Updating network interface templates Red Hat OpenStack Platform includes a script to automatically add the missing parameters to your NIC template files. Procedure Log in to the undercloud as the stack user. Source the stackrc file. On the undercloud, create a file called update-nic-templates.sh and include the following content in the file: If you use a custom overcloud name, Set the STACK_NAME variable to the name of your overcloud. The default name for an overcloud stack is overcloud . If you use a custom roles_data file, set the ROLES_DATA variable to the location of the custom file. If you use the default roles_data file, leave the variable as /usr/share/openstack-tripleo-heat-templates/roles_data.yaml If you use a custom network_data file, set the NETWORK_DATA variable to the location of the custom file. If you use the default network_data file, leave the variable as /usr/share/openstack-tripleo-heat-templates/network_data.yaml Run /usr/share/openstack-tripleo-heat-templates/tools/merge-new-params-nic-config-script.py -h to see a list of options to add to the script. Add executable permissions to the script: Optional: If you use a spine-leaf network topology for your RHOSP environment, check the roles_data.yaml file and ensure that it uses the correct role names for the NIC templates for your deployment. The script uses the value of the deprecated_nic_config_name parameter in the roles_data.yaml file. Run the script: The script saves a copy of each custom NIC template and updates each template with the missing parameters. The script also skips any roles that do not have a custom template: 14.2. Maintaining Open vSwitch compatibility during the upgrade Red Hat OpenStack Platform 13 uses Open vSwitch (OVS) as the default ML2 back end for OpenStack Networking (neutron). Newer versions of Red Hat OpenStack Platform use Open Virtual Network (OVN), which expands upon OVS capabilities. However, to ensure a stable upgrade, you must maintain OVS functionality during the duration of the upgrade and then migrate to OVN after you complete the upgrade. To maintain OVS compatibility during the upgrade, include the following environment file as part of your environment file collection: /usr/share/openstack-tripleo-heat-templates/environments/services/neutron-ovs.yaml Note When you include the neutron-ovs.yaml environment file, check if the neutron-ovs-dvr.yaml environment file is included in your environment file collection. You must include the neutron-ovs.yaml environment file before the neutron-ovs-dvr.yaml file, to avoid failures during the upgrade. Treat this file as part of your deployment until you have completed the migration to OVN. Include the file with all overcloud upgrade and deployment commands: openstack overcloud upgrade prepare openstack overcloud upgrade converge openstack overcloud deploy openstack overcloud update prepare openstack overcloud update converge Any other command that uses environment files. Troubleshooting OVS compatibility If the upgrade process fails because the parameters defined in the neutron-ovs.yaml file are overwriting the parameters defined in the neutron-ovs-dvr.yaml , change the order in which you include these files and run the openstack overcloud upgrade prepare and openstack overcloud upgrade run again on the affected nodes. If one of the affected nodes is a Compute node, remove the openstack-neutron* packages from that node. 14.3. Maintaining composable network compatibility during the upgrade The network_data file format for Red Hat OpenStack Platform 16.2 includes new sections that you can use to define additional subnets and routes within a network. However, if you use a custom network_data file, you can still use the network_data file format from Red Hat OpenStack Platform 13. When you upgrade from Red Hat OpenStack Platform 13 to 16.2, use the Red Hat OpenStack Platform 13 network_data file format during and after the upgrade. For more information about Red Hat OpenStack Platform 13 composable network syntax, see Custom composable networks . When you create new overclouds on Red Hat OpenStack Platform 16.2, use the Red Hat OpenStack Platform 16.2 network_data file format. For more information about Red Hat OpenStack Platform 16.2 composable network syntax, see Custom composable networks .

Commands:
source ~/stackrc
#!/bin/bash STACK_NAME="overcloud" ROLES_DATA="/usr/share/openstack-tripleo-heat-templates/roles_data.yaml" NETWORK_DATA="/usr/share/openstack-tripleo-heat-templates/network_data.yaml" NIC_CONFIG_LINES=USD(openstack stack environment show USDSTACK_NAME | grep "::Net::SoftwareConfig" | sed -E 's/ *OS::TripleO::// ; s/::Net::SoftwareConfig:// ; s/ http.*user-files/ /') echo "USDNIC_CONFIG_LINES" | while read LINE; do ROLE=USD(echo "USDLINE" | awk '{print USD1;}') NIC_CONFIG=USD(echo "USDLINE" | awk '{print USD2;}') if [ -f "USDNIC_CONFIG" ]; then echo "Updating template for USDROLE role." python3 /usr/share/openstack-tripleo-heat-templates/tools/merge-new-params-nic-config-script.py --tht-dir /usr/share/openstack-tripleo-heat-templates --roles-data USDROLES_DATA --network-data USDNETWORK_DATA --role-name "USDROLE" --discard-comments yes --template "USDNIC_CONFIG" else echo "No NIC template detected for USDROLE role. Skipping USDROLE role." fi done
chmod +x update-nic-templates.sh
./update-nic-templates.sh
No NIC template detected for BlockStorage role. Skipping BlockStorage role. Updating template for CephStorage role. The original template was saved as: /home/stack/templates/custom-nics/ceph-storage.yaml.20200903144835 The update template was saved as: /home/stack/templates/custom-nics/ceph-storage.yaml Updating template for Compute role. The original template was saved as: /home/stack/templates/custom-nics/compute.yaml.20200903144838 The update template was saved as: /home/stack/templates/custom-nics/compute.yaml Updating template for Controller role. The original template was saved as: /home/stack/templates/custom-nics/controller.yaml.20200903144841 The update template was saved as: /home/stack/templates/custom-nics/controller.yaml No NIC template detected for ObjectStorage role. Skipping ObjectStorage role.