WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] How to stop XenD creating bridge devices on startup?

To: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
Subject: Re: [Xen-devel] How to stop XenD creating bridge devices on startup?
From: Luiz Vitor Martinez Cardoso <grabber@xxxxxxxxx>
Date: Wed, 25 Jul 2007 12:07:20 -0300
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 24 Jul 2007 23:06:41 -0700
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type:content-transfer-encoding; b=ukyIyGHYbdGzEZn/ebfpH1Fnneyi9yBo2fe0q0aLlDSGG+lqSGOn6iZa5PMV2Jx1pttRgiu9PTteFYJQrXLzMKVr3hIkbtrkQ+OQ1602aW8AX+adqdNUpcQvgmebiBsF+GwJdp5s6XZVQvVM4AHNjQQ1CICdcjOZxxpdC1ufGsw=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type:content-transfer-encoding; b=CHn/wpBzUPSMMIPOYPryWHMOCxr3mrmWpt1ofgX57c68DXaDIAhrV/Oujug617HdbSj3WsvD3/bK732Su6d3769WZW9A2+f6kq+ETrHNPaxSJuaFl5bKthrr+l0oWRZf4fRrN6VoO+syO72DySdu6Bm3sOm7Cj3j9n8L+Vtb3Aw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070723032637.GA29416@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070723032637.GA29416@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

Bridge creating is enabled in xen-config.sxp

Comment this lines

#(network-script 'network-bridge netdev=eth1')
#(network-script network-bridge)

And uncomment this line:

(network-script network-dummy)

Regards,
Luiz Vitor Martinez Cardoso (Grabber)


Em Mon, 23 Jul 2007 04:26:37 +0100
"Daniel P. Berrange" <berrange@xxxxxxxxxx> escreveu:

> Prior to starting XenD I have a single bridge device 'eth0' containing a
> physical interface 'peth0':
> 
>   # brctl show
>   bridge name     bridge id               STP enabled     interfaces
>   eth0            8000.00161745105a       no              peth0
> 
> The /etc/xen/xend-config.sxp is configured to a no-op network-script config,
> and yet when I start XenD:
> 
>   # /etc/init.d/xend start
>   Starting xend:                                             [  OK  ]
> 
> It still feels the need to create a whole bunch of bridge devices...
> 
>   # brctl show
>   bridge name     bridge id               STP enabled     interfaces
>   eth0            8000.00161745105a       no              peth0
>   virbr0          8000.000000000000       no
>   virbr1          8000.000000000000       no
>   vnet0           8000.000000000000       no
> 
> These bridge devices it is creating correspond to bridge devices I had 
> previously configured on the host, but since deleted. XenD happily
> re-creates them every time it starts.
> 
> This problem is pretty repeatable, if you simply define a bridge and
> then start & stop Xen
> 
>   # brctl addbr foo
>   # /etc/init.d/xend start
>   Starting xend:                                             [  OK  ]
>   # /etc/init.d/xend stop
>   Stopping xend:                                             [  OK  ]
> 
> Now delete the bridge and start Xend again
> 
>   # brctl delbr foo
>   # /etc/init.d/xend start
>   Starting xend:                                             [  OK  ]
> 
> Low and behold it has re-created the bridge
> 
>   # brctl show | grep foo
>   foo             8000.000000000000       no
> 
> This is seriously unhelpful behaviour, the only way to kill it seems to be
> to stop XenD and then hand edit its persistent state file.
> 
> The problem code is in XendNode.py
> 
>         bridges = Brctl.get_state().keys()
>         configured_bridges = [XendAPIStore.get(
>                                   network_uuid, "network")
>                                       .get_name_label()
>                               for network_uuid in XendNetwork.get_all()]
>         unconfigured_bridges = [bridge
>                                 for bridge in bridges
>                                 if bridge not in configured_bridges]
>         for unconfigured_bridge in unconfigured_bridges:
>             XendNetwork.create_phy(unconfigured_bridge)
> 
> This re-creates asks brctl for a list of all devices, records all their 
> names and then re-creates any it previously saw, but which no longer
> exist. In essence once XenD has seen a bridge you can never remove it.
> IMHO, any devices XenD sees from 'brctl' need to be marked as 'transient'
> in some way and not kept in XenD persistent state file - it should only 
> be re-creating bridges that the user created via XenD's APIs
> 
> Dan.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>