Comment 4 for bug 1673882

Revision history for this message
Dan Sneddon (dsneddon) wrote :

Here is another similar suggestion, but this one creates a bond for a bridge using OVS balance-slb, which will use only one link in the bond for any particular VLAN at any given moment. It requires no special configuration on the switch, although I don't think it's been tested with Q-in-Q, so results might vary:

Controller:

              network_config:
              - type: interface
                name: nic1
                use_dhcp: false
                dns_servers:
                  get_param: DnsServers
                addresses:
                - ip_netmask:
                    list_join:
                    - /
                    - - get_param: ControlPlaneIp
                      - get_param: ControlPlaneSubnetCidr
                routes:
                - ip_netmask: 169.254.169.254/32
                  next_hop:
                    get_param: EC2MetadataIp
              - type: ovs_bridge
                name: bridge_name
                dns_servers:
                  get_param: DnsServers
                members:
                - type: ovs_bond
                  name: bond1
                  ovs_options:
                    get_param: BondInterfaceOvsOptions
                  members:
                  - type: interface
                    name: nic2
                    primary: true # set the bond MAC address to the MAC of this interface
                    use_dhcp: false
                  - type: interface
                    name: nic3
                    use_dhcp: false
                  - type: interface
                    name: nic4
                    use_dhcp: false
                - type: vlan
                  device: bond1
                  vlan_id:
                    get_param: ExternalNetworkVlanID
                  addresses:
                  - ip_netmask:
                      get_param: ExternalIpSubnet
                  routes:
                  - default: true
                    next_hop:
                      get_param: ExternalInterfaceDefaultRoute

Compute:

              network_config:
              - type: interface
                name: nic1
                use_dhcp: false
                dns_servers:
                  get_param: DnsServers
                addresses:
                - ip_netmask:
                    list_join:
                    - /
                    - - get_param: ControlPlaneIp
                      - get_param: ControlPlaneSubnetCidr
                routes:
                - ip_netmask: 169.254.169.254/32
                  next_hop:
                    get_param: EC2MetadataIp
                - default: true
                  next_hop:
                    get_param: ControlPlaneDefaultRoute
              - type: ovs_bridge
                name: bridge_name
                dns_servers:
                  get_param: DnsServers
                members:
                - type: ovs_bond
                  name: bond1
                  ovs_options:
                    get_param: BondInterfaceOvsOptions
                  members:
                  - type: interface
                    name: nic2
                    primary: true
                    use_dhcp: false
                  - type: interface
                    name: nic3
                    use_dhcp: false
                  - type: interface
                    name: nic4
                    use_dhcp: false

Then specify the proper bonding mode in network-environment.yaml:

parameter_defaults:
  NeutronNetworkVLANRanges: "datacentre:<start>:<end>"
  NeutronBridgeMappings: "datacentre:br-ex"
  BondInterfaceOvsOptions: "bond_mode=balance-slb"

In theory, you could also place all 4 NICs in the same bond, and use DHCP as long as the primary NIC is the one that has the MAC address registered for the node.