Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 362575 - app-emulation/xen-tools-4.1.0-r1 - network-bridge will not create multiple bridges
Summary: app-emulation/xen-tools-4.1.0-r1 - network-bridge will not create multiple br...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Xen Devs
Depends on:
Reported: 2011-04-08 09:21 UTC by Sylvain Chevalier
Modified: 2011-10-24 12:01 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

done according to comment 1 (xen-bridge.patch,5.00 KB, patch)
2011-10-15 17:31 UTC, Ian Delaney (RETIRED)
Details | Diff
xen-tools-4.1.1-bridge.patch (xen-tools-4.1.1-bridge.patch,449 bytes, patch)
2011-10-15 17:35 UTC, Ian Delaney (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain Chevalier 2011-04-08 09:21:34 UTC
After update from xen 4.0 to xen 4.1, if we still want to use xend (it is supposed to be ), and use a wrapper of network-bridge to create multiple bridges, only one bridge will be created. This is because a test has been added into network-bridge which stops if bridges already exist.

Reproducible: Always

Steps to Reproduce:
1. Use Xen 4.1 on a machine with several network interfaces (eg. 4)
2. Create a wrapper script to create 4 bridges. For example
/etc/xen/scripts/network-bridge "$@" vifnum=0 netdev=eth0 bridge=xenbr0
/etc/xen/scripts/network-bridge "$@" vifnum=1 netdev=eth1 bridge=xenbr1
/etc/xen/scripts/network-bridge "$@" vifnum=2 netdev=eth2 bridge=xenbr2
/etc/xen/scripts/network-bridge "$@" vifnum=3 netdev=eth3 bridge=xenbr3

3.In /etc/xen/xend-config.sxp, make sure you are using network-bridge configuration, and use the wrapper instead by replacing:
(network-script network-bridge)
(network-script network-bridge-wrapper)
4. Reboot

Actual Results:  
Only one bridge is created

Expected Results:  
There should be 4 bridges

If I comment out these 3 lines in network, it works fine, jsut as it did before the upgrade:

    #if [ `brctl show | wc -l` != 1 ]; then
    #    return

The reason I understand is that xen does not want us to use these scripts anymore, only if it is necessary (ie only if no bridge exist). That is probably a bug to be reported upstream?
Comment 1 Klas Meder Boqvist 2011-06-19 11:33:43 UTC
I replaced the rows with:
if [ `brctl show | grep $netdev | wc -l` != 0 ]; then 
Comment 2 Ian Delaney (RETIRED) gentoo-dev 2011-10-15 17:31:59 UTC
Created attachment 289885 [details, diff]
done according to comment 1
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2011-10-15 17:35:00 UTC
Created attachment 289887 [details, diff]
Comment 4 Norbert Marx 2011-10-21 18:11:50 UTC
I believe this patch is not a good idea. xend is obsolete and only the xl toolstack will be supported in future. xl Upgrade Checklist says: Configure your host networking using the configuration tools provided by your distribution. (See: HostConfiguration/Networking) (from

Change the /etc/conf.d/net and add net.* to your services. My example for two bridges:

routes_xenbr0="default gw"

Comment 5 Ian Delaney (RETIRED) gentoo-dev 2011-10-22 07:41:03 UTC
well, point1.  this bug was set in April.

point 2.  Since then the use of xend has been made an option from the making of the xend flag in 4.1.1

point 3. At some point, your claim xend is obsolete will become true.  Until then, gentoo has for now adopted a position of supporting xen-3(still stable amd64) for a while.  xen-4 has been made stable in x86 and for some reason of insanity that escapes me, xen-4 amd64 has not yet occurred.

point 4. your example utilises eth0 and eth1.  Unless my understanding of networking bridges is fundamentally flawed, your said example necessitates the making of a legitimate eth0 and eth1 by ifconfig and friends during boot.  That is, this example requires two ethernet network cards.  How typical is that?  I myself have an ethernet and a wireless card, a mis-match for the example.

point 5. The notion of the patch as a bad idea is a generalisation.  It caters to the use of xend, therefore it is valid under the umbrella of use=xend.

point 6. xensource has clearly allowed for a period to phase out xend as a xen manager before committing itself to xl.  Hopefully by then any such fumblings in its networking scripts will be ironed out.  Until then, allow gentoo enough 'slack' to cater to both options.

point 7. When a decision is made by a 'qualified' dev, a likely outcome of this bug for resolution will be obsolete anyway.
Comment 6 Alexey Shvetsov archtester gentoo-dev 2011-10-24 12:01:59 UTC
Fixed in -r6