Switching from load-balancing to active-backup on XenServer

By default, the NIC bonding in XenServer is load balancing (SLB); apparently every 10-30 seconds it switches the NIC it’s using, and the default setting is an up-delay of 3.1 seconds** (see here).

To change to active-backup, you need to do the following (this requires a reboot by the way):

  1. Have your bonds set up in XenServer (use the XenCenter GUI)
  2. Find the UUID of the bond (something like: bd25429f-f7ff-3206-e5b2-4c027c51947c)
    1. Get the network UUID of your bond: xe network-list
    2. Get the pif UUID by matching the network-uuid parameter with the one you found in the step above: xe pif-list
  3. Run the following command: xe pif-param-set uuid=<bond_pif_uuid> other-config:bond-mode=active-backup
  4. Reboot the XenServer
  5. Check your bond settings: cat /proc/net/bonding/bond0; the Bonding Mode should say “fault-tolerance (active-backup)”

I’ve not yet figured out how to set a primary NIC for the bond (it’s not officially supported*), will report back when have done.

 

*UPDATED: found this “Can be configured with one fast path, and one slow path for cost savings; in this scenario, the slow path should only be used if there is a failure on the fast path” – but that’s the only documentation I can find about it, so it may or may not be officially supported…Ref: http://support.citrix.com/article/CTX124421

**UPDATED: in the admin manual, they say this about the up-delay:
“Bonding is set up with an Up Delay of 31000ms and a Down Delay of 200ms. The seemingly
long Up Delay is purposeful because of the time taken by some switches to actually start
routing traffic. Without it, when a link comes back after failing, the bond might rebalance
traffic onto it before the switch is ready to pass traffic. If you want to move both connections
to a different switch, move one, then wait 31 seconds for it to be used again before moving
the other.”

It also says that XenServer supports Active-Passive NIC bonding which is derived from active-backup (ie, they state that it’s not actually active-backup), and that a fast path and slow path can be configured.  However, the steps to configure active-passive state to use “other-config:bond-mode=active-backup” (so the steps above are correct, only they set the server to XenServer’s implementation of active-backup which they call active-passive).  The manual also doesn’t mention how to configure the fast and slow paths, and while it lists PIF commands, it doesn’t even mention the other-config:bond-mode command…

Leave a Reply

Your email address will not be published. Required fields are marked *