Advanced networking configuration

Hello Everyone,

I need to customize the host network container with two advanced network options:

  • First, use a modprobe configuration option before network is initialized
  • Second, bond the network interfaces and run in LACP mode.

Seems pretty straight forward, but still trying to understand the system and how to customize. Any assistance is appreciated.

Thanks,
Josh

For the benefit of others, regarding the bonding in LCAP mode, from v0.4.3, in the appropriate place in cloud-config;

          eth1:
            bond: bond0
          eth2:
            bond: bond0
          bond0:
            bond_opts:
              mode: 4
              miimon: 100
              lacp_rate: 1
              xmit_hash_policy: 1
            dhcp: true

I have an interesting problem, I can create a bond just fine. However if I just configure a bond0 and no other interface, the system tries to configure one of my bonding interfaces as a primary interface. I would like bond0 to be the primary interface. So in my example below eth3 is reconfigured as a regular interface. If I plug an additional network port at eth0 my bond0 works fine. Again if I only want bond0, eth3 gets reconfigure from bond slave to eth3 dhcp. Any thoughts?

rancher:
  network:
    interfaces:
      eth*:
        dhcp: false
      eth2:
        bond: bond0
      eth3:
        bond: bond0
      bond0:
        dhcp: true
        bond_opts:
          mode: 6
          miimon: 100
          lacp_rate: 1
          xmit_hash_policy: 1
        mtu: 9000