Configure port groups for bare-metal instances

Configure port groups in the Bare Metal Provisioning service to aggregate multiple network interfaces into a single bonded interface for redundancy and improved throughput for bare-metal instances.

Important

This feature is available in this release as a Technology Preview, and therefore is not fully supported by Red Hat. It should only be used for testing, and should not be deployed in a production environment.

Port groups (bonds) provide a method to aggregate multiple network interfaces into a single "bonded" interface. Port group configuration always takes precedence over an individual port configuration. During interface attachment, port groups have a higher priority than the ports, so they are used first. Currently, it is not possible to specify preference for port or port group in an interface attachment request. If a port group is available, the interface attachment will use it. Port groups that do not have any ports are ignored.

If a port group has a physical network, then all the ports in that port group must have the same physical network. The Bare Metal Provisioning service uses configdrive to support configuration of port groups in the instances.

Note
Bare Metal Provisioning service API version 1.26 and later supports port group configuration.

To configure port groups in a bare metal deployment, you must configure the port groups on the switches manually. You must ensure that the mode and properties on the switch correspond to the mode and properties on the bare metal side as the naming can vary on the switch.

Note
You cannot use port groups for provisioning and cleaning if you need to boot a deployment using iPXE.

With port group fallback, all the ports in a port group can fallback to individual switch ports when a connection fails. Based on whether a switch supports port group fallback or not, you can use the --support-standalone-ports and --unsupport-standalone-ports options.

Prerequisites

  • The RHOSO environment includes the Bare Metal Provisioning service.
  • You are logged on to a workstation that has access to the RHOCP cluster, as a user with cluster-admin privileges.
  • The oc command line tool is installed on the workstation.

Configure port groups in the Bare Metal Provisioning service

Create a port group to aggregate multiple network interfaces into a single bonded interface.

Procedure

  1. Access the remote shell for the OpenStackClient pod from your workstation:
    $ oc rsh -n openstack openstackclient
  2. Create a port group:
    $ openstack baremetal port group create \
     --node <node_uuid> --name <group_name> \
     [--address <mac_address>] [--mode <mode>]  \
     --property miimon=100 --property xmit_hash_policy="layer2+3"
     [--support-standalone-ports]
    • Replace <node_uuid> with the UUID of the node that this port group belongs to.
    • Replace <group_name> with the name for this port group.
    • Optional: Replace <mac_address> with the MAC address for the port group. If you do not specify an address, the deployed instance port group address is the same as the Networking service port. If you do not attach the Networking service port, the port group configuration fails.
    • Optional: Replace <mode> with mode of the port group.
    • Specify if the group supports fallback to standalone ports.
    Note
    You must configure port groups manually in standalone mode either in the image or by generating the configdrive and adding it to the node’s instance_info. Ensure that you have cloud-init version 0.7.7 or later for the port group configuration to work.
  3. Associate a port with a port group:
    • During port creation:
      $ openstack baremetal port create --node <node_uuid> --address <mac_address> --port-group <group_name>
    • During port update:
      $ openstack baremetal port set <port_uuid> --port-group <group_uuid>
  4. Boot an instance by providing an image that has cloud-init or supports bonding.

    To check if the port group is configured properly, run the following command:

    # cat /proc/net/bonding/bondX

    Here, X is a number that cloud-init generates automatically for each configured port group, starting with a 0 and incremented by one for each configured port group.

  5. Exit the openstackclient pod:
    $ exit