Chapter 3. Configuring OVN gateways for a Red Hat OpenStack Services on OpenShift deployment An OVN gateway connects the logical OpenStack tenant network to a physical external network. Many RHOSO environments have at least one OVN gateway and might have more than one physical external network and more than one OVN gateway. Some environments do not include an OVN gateway. For example, an environment might not have an OVN gateway because connectivity is not required, because the environment does not use centralized floating IPs or routers and workloads directly connected to provider networks, or because some other connection method is used. You can choose where OVN gateways are configured. OVN gateway location choices include the following: Control plane OVN gateways on RHOCP worker nodes that host the OpenStack controller services. You can choose one of the following control plane gateway configurations: Dedicated NIC: Place the OVN gateway on a NIC whose sole purpose is to provide an interface to the OVN gateway. Shared NIC: Place the OVN gateway on a shared NIC. Use the bridge CNI plugin to share a NIC between the OVN gateway and other OCP and OpenStack traffic. Not supported for production use in the current version of RHOSO. Data plane OVN gateways on dedicated networker nodes on the data plane. Not yet documented. Control and data plane OVN gateway on a combination of the control plane nodes and dedicated networker nodes. Not yet documented. Control plane OVN gateways may be subject to more disruption than data plane OVN gateways. Note The optional load-balancing service (octavia) requires the use of at least one control plane OVN gateway. The optional BGP service is not presently supported in environments with control plane OVN gateways. As a result, deployments that use both the load-balancing service and the BGP service are not presently supported. For more information, see link:https://issues.redhat.com/browse/OSPRH-10768. 3.1. Configuring a control plane OVN gateway with a dedicated NIC You can place OVN gateways on dedicated NICs on the control plane nodes. This reduces the potential for interruption but requires an additional NIC. Prerequisites You have the oc command line tool installed on your workstation. You are logged on to a workstation that has access to the RHOSO control plane as a user with cluster-admin privileges. Each RHOCP worker node that hosts the RHOSO control plane has a NIC dedicated to an OVN gateway. Use the same NIC name for the dedicated NIC on each node. In addition, each worker node has at least the two NICs described in Red Hat OpenShift Container Platform cluster requirements . Your OpenStackControlPlane custom resource (CR) file, openstack_control_plane.yaml, exists on your workstation. Procedure Open the OpenStackControlPlane CR definition file, openstack_control_plane.yaml . Add the following ovnController configuration, including nicMappings , to the ovn service configuration: Replace <network_name> with the name of the physical provider network your gateway is on. This should match the value of the --provider-physical-network argument to the openstack network create command used to create the network. For example, datacentre . Replace <nic_name> with the name of the NIC connecting to the gateway network, such as enp6s0 . Optional: Add additional <network_name>:<nic_name> pairs under nicMappings as required. Update the control plane: The ovn-operator creates the network attachment definitions, adds them to the pods, creates an external bridge, and configures external-ids:ovn-bridge-mappings . The setting external-ids:ovn-cms-options=enable-chassis-as-gw is configured by default. Wait until RHOCP creates the resources related to the OpenStackControlPlane CR. Run the following command to check the status: The OpenStackControlPlane resources are created when the status is "Setup complete". Tip Append the -w option to the end of the get command to track deployment progress. Confirm that the control plane is deployed by reviewing the pods in the openstack namespace: The control plane is deployed when all the pods are either completed or running. Verify that ovn-controller and ovn-controller-ovs pods are running, and that the number of running pods is equal to the number of OCP control plane nodes where OpenStack control plane services are running. Verification Run a remote shell command on the OpenStackClient pod to confirm that the OVN Controller Gateway Agents are running on the control plane nodes: Example output 3.2. Configuring RHOSO with no control plane OVN gateways You can configure a deployment with no control plane OVN gateways. For example, you configure data plane OVN gateways only, or you do not configure any OVN gateways. Configuring a deployment with no control plane OVN gateways requires omitting the ovnController configuration from the control plane custom resource (CR). Prerequisites RHOSO 18.0.3 (Feature Release 1) or later. You have the oc command line tool installed on your workstation. You are logged on to a workstation that has access to the RHOSO control plane as a user with cluster-admin privileges. Procedure Open your OpenStackControlPlane custom resource (CR) file, openstack_control_plane.yaml, on your workstation. If there is an ovnController section: Remove the ovnController section. Update the control plane:

Commands:
ovnController: spec: ovn: template: ovnController: networkAttachment: tenant nicMappings: <network_name: nic_name>
oc apply -f openstack_control_plane.yaml -n openstack
oc get openstackcontrolplane -n openstack NAME STATUS MESSAGE openstack-control-plane Unknown Setup started
oc get pods -n openstack
oc rsh -n openstack openstackclient openstack network agent list
+--------------------------------------+------------------------------+---------+ | ID | agent_type | host | +--------------------------------------+----------------------------------------+ | 5335c34d-9233-47bd-92f1-fc7503270783 | OVN Controller Gateway agent | ctrl0 | | ff66288c-5a7c-41fb-ba54-6c781f95a81e | OVN Controller Gateway agent | ctrl1 | | 5335c34d-9233-47bd-92f1-fc7503270783 | OVN Controller Gateway agent | ctrl2 | +--------------------------------------+----------------------------------------+
oc apply -f openstack_control_plane.yaml -n openstack