Create a custom OVS-DPDK Compute service

You must create a custom OVS-DPDK Compute service for NFV in a RHOSO environment.

Before you begin

  • 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.

About this task

The OVS-DPDK Compute service is an Ansible service that is run on the data plane. This custom service applies various parameters on the OVS-DPDK Compute nodes, including CPU pinning parameters, a block migration parameter, and a NUMA-aware vswitch feature that allows instances to create in the NUMA node that is connected to the NIC used by the OVS bridge.

To create the OVS-DPDK custom service, you must perform these actions:

  • Create a ConfigMap that maps the configurations to a specified set of OVS-DPDK Compute nodes.
  • Create the actual OVS-DPDK custom service that will implement the ConfigMap on your data plane.

Procedure

  1. Create a ConfigMap CR that defines a configuration for the parameters, and save it to a YAML file on your workstation, for example, dpdk-custom.yaml.

    Change the values (in boldface) as appropriate for your environment:

    ---
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: dpdk-custom-nova
      namespace: openstack
    data:
      25-dpdk-custom-nova.conf: |
        [DEFAULT]
        reserved_host_memory_mb = 4096
        [compute]
        cpu_shared_set = 0-3,24-27
        cpu_dedicated_set = 8-23,32-47
        [neutron]
        physnets = <network_name1>, <network_name2>
        [neutron_physnet_<network_name1>]
        numa_nodes = <ID list>
        [neutron_physnet_<network_name2>]
        numa_nodes = <ID list>
        [neutron_tunnel]
        numa_nodes = <ID list>
        [libvirt]
        live_migration_permit_post_copy=false
    ---
    • cpu_shared_set: enter a comma-separated list or range of physical host CPU numbers used to provide vCPU inventory, determine the host CPUs that unpinned instances can be scheduled to, and determine the host CPUs that instance emulator threads should be offloaded to for instances configured with the share emulator thread policy.
    • cpu_dedicated_set: enter a comma-separated list or range of physical host CPU numbers to which processes for pinned instance CPUs can be scheduled. For example, 4-12,^8,15 reserves cores from 4-12 and 15, excluding 8.
    • <network_name_n_>: replace <network_name1> and <network_name2> with the names of the physical networks that your gateways are on, for which you need to configure NUMA affinity. (This network is set in the neutron network provider:*name field.)
    • <ID list>: replace <ID list> with a comma-separated list of IDs of the NUMA nodes associated with this physnet. For example: 0,1. For example:
      [neutron]
      physnets = foo,bar
      
      [neutron_physnet_foo]
      numa_nodes = 0
      
      [neutron_physnet_bar]
      numa_nodes = 2, 3

      This configuration ensures that instances that use one or more L2-type networks with provider:physical_network=foo must be scheduled on host cores from NUMA node 0, while instances that use one or more networks with `provider:physical_network=bar must be scheduled on host cores from both NUMA nodes 2 and 3. For the latter case, it will be necessary to split the guest across two or more host NUMA nodes by using the `hw:numa_nodes extra` spec.

    • live_migration_permit_post_copy=false: necessary for successful block live migration of instances attached to a Geneve network with DPDK.
  2. Create the ConfigMap object, using the ConfigMap CR file:
    Example
    $ oc create -f dpdk-custom.yaml -n openstack
  3. Create an OpenStackDataPlaneService CR that defines the OVS-DPDK custom service, and save it to a YAML file on your workstation, for example nova-custom-ovsdpdk.yaml:
    apiVersion: dataplane.openstack.org/v1beta1
    kind: OpenStackDataPlaneService
    metadata:
      name: nova-custom-ovsdpdk
      namespace: openstack
  4. Add the ConfigMap CR to the custom service, and specify the Secret CR for the cell that the node set that runs this service connects to:
    apiVersion: dataplane.openstack.org/v1beta1
    kind: OpenStackDataPlaneService
    metadata:
      name: nova-custom-ovsdpdk
      namespace: openstack
    spec:
      label: dataplane-deployment-nova-custom-ovsdpdk
      edpmServiceType: nova
      dataSources:
        - configMapRef:
            name: dpdk-custom-nova
        - secretRef:
            name: nova-cell1-compute-config
        - secretRef:
            name: nova-migration-ssh-key
      tlsCerts:
        default:
          contents:
            - dnsnames
            - ips
          networks:
            - ctlplane
          issuer: osp-rootca-issuer-internal
      caCerts: combined-ca-bundle
  5. Specify the Ansible commands to create the custom service, by referencing an Ansible Playbook or by including the Ansible play in the playbookContents field:
    apiVersion: dataplane.openstack.org/v1beta1
    kind: OpenStackDataPlaneService
    metadata:
      name: nova-custom-ovsdpdk
      namespace: openstack
    spec:
      label: dataplane-deployment-nova-custom-ovsdpdk
      edpmServiceType: nova
      dataSources:
        - configMapRef:
            name: dpdk-custom-nova
        - secretRef:
            name: nova-cell1-compute-config
        - secretRef:
            name: nova-migration-ssh-key
      playbook: osp.edpm.nova
      tlsCerts:
        default:
          contents:
            - dnsnames
            - ips
          networks:
            - ctlplane
          issuer: osp-rootca-issuer-internal
      caCerts: combined-ca-bundle
  6. Create the nova-custom-ovsdpdk service:
    $ oc apply -f nova-custom-ovsdpdk.yaml -n openstack
  7. Verify that the custom service is created:
    $ oc get openstackdataplaneservice nova-custom-ovsdpdk -o yaml -n openstack