[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-API] xcp-xapi bonding

  • To: xen-api@xxxxxxxxxxxxx
  • From: Alexandre Kouznetsov <alk@xxxxxxxxxx>
  • Date: Tue, 12 Mar 2013 00:45:06 -0600
  • Delivery-date: Tue, 12 Mar 2013 06:45:24 +0000
  • List-id: User and development list for XCP and XAPI <xen-api.lists.xen.org>


El 11/03/13 23:27, Carlos Reategui escribió:

        auto eth0
        iface eth0 inet manual

        auto eth1
        iface eth1 inet manual

        Do I also need to set up the bridge in this file or will that be
        automatically by xcp-xapi. Eg:

        auto xenbr0
        iface xenbr0 inet dhcp
        bridge_ports eth0

        auto xenbr1
        iface xenbr1 inet dhcp
        bridge_ports eth1

    As a reference, very unrelated to Xen-API or XCP, please note that
    this would not create any "bond", but a plain "bridge". The bonding
    magic is done by vSwitch in XCP (and probably XenAPI). Other
    observation is, that Debian based distribution does not need to have
    eth0 or eth1 interface described or set up, in order to make a valid
    bridge via /etc/network/interfaces file.

Understood, but do I need to define a bridge to both eth0 and 1 in the
interfaces file in order to bond them.  Hmm as I type that  it does not
sound right.  If I am going to bond eth0 and 1, do I need to even bother
setting up bridges for them?
I you use Debian's means (Ubuntu's, whatever), you would make a "bond" of them, then make a "bridge" and declare the bond as part of it. If, instead, you use xe-toolstack means, it will create a bridge with the involved physical interfaces and use vSwitch backend to make it behave as bond (I have not done my homework on vSwitch yet).

 Seems like a bridge is a "network" in xapi
which is what I'll be creating in xe.
A "network" references a associated bridge, but they are not objects of the same order. Using xe-toolstack, you will normally not be referencing the bridges directly.

[root@xcp-node24 ~]# xe network-list name-label=DMZ
uuid ( RO)                : 35f46450-037a-1c42-d6c7-e310f19f278d
          name-label ( RW): DMZ
    name-description ( RW): Exposed network
              bridge ( RO): xapi1

    Look at this example:
    auto xenbr01
    iface xenbr01 inet manual
       bridge_ports eth1
       bridge_stp off
       bridge_maxwait 0
       bridge_fd 5

    This creates a bridge, set it up automatically on boot, without need
    to declare anything about eth1 itself. After configured, ifconfig
    shows eth1 in UP state, but there is no need for any "auto eth1" or
    "iface eth1" lines.

I guess the assumption here is that xapi picks this up when it is first
setup, or do you add "xenbr01" as a network using xe yourself.
No, that was a example of a regular Xen configuration on Debian, without xapi, sorry for lack of clearance. My only available xapi runs XCP, which is CentOS, so there is no /etc/network/interfaces there, and the syntax is completely different. the contents of /etc/sysconfig/network-scripts/ suggests there is no OS-level configuration for eth*, everything seems to be done by xe-toolstack. But, can't say for sure, not too familiar with CentOS.

        Using xe I am guessing I would then do the following:

        ETH0=`xe pif-list device=eth0 --minimal`
        ETH1=`xe pif-list device=eth1 --minimal`
        NETID=`xe network-create name-label=bond0`
        BONDID=`xe bond-create network-uuid=$NETID pif-uuids=$ETH0,$ETH1`

    Note that if your host is a part of a cluster, "xe pif-list
    device=eth0" will return a list of PIF's instead of a single one.

    The commands you listed should work, but they will bond your first
    two interfaces together. Your administration interface could behave

By administration did you mean management?  I want this bond to be my
management and guest traffic interface.
Yes, management.

          Would it be better to
        not use dhcp in the interfaces file?

    Yes, much better. On any server. Except, maybe, very special cases.

I'm just going to use it for initial setup where it gets from a
temporary ip pool. Then switch to static when configuring via xe.
On XCP, he change from DHCP to static (my PXE install leaves the network in DHCP mode) is pretty painless. In case of xapi on Ubuntu, I'm not sure how well would it handle the change. I would reduce variables and set it to static before installing xapi.

        For my NFS network using a bond of eth2 and 3 I was thinking of
        them from xcp and just telling it to "xe pif-forget" on the
        uuids for
        those.  Is that ok?  Im assuming as long as the host knows about
        network it should be fine.

    Making this network not to be attached to the new VM's would be enough:
    NEWNET=`xe network-list name-label="PUT YOURS HERE" --minimal`
    xe network-param-set uuid=${NEWNET} other-config:automatic=false

    If you do pif-forget, most likely xapi will be unable to manage a
    bond using this interface. Unless you intend to manage this
    interfaces completely out of the scope of xapi.

Yes.  That was the plan.  I was going to create an LACP bond in the
interfaces file for my storage network since my storage switch does
support LACP.
Since your VM's will not use this interface, you don't need to make a bridge of it:

iface bond1 inet static
  address XX.XX.XX.XX
  netmask YY.YY.YY.YY
  slaves eth2 eth3
  bond_miimon 100
  bond_updelay 100
  bond_downdelay 200
  bond_mode 802.3ad


Xen-api mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.