Daniel Kahn Gillmor
2007-Nov-09 06:48 UTC
[Pkg-xen-devel] Bug#450678: xen-utils-common: /etc/init.d/xen restart fails when using network-bridge if netdev does not match eth[0-9+]
Subject: xen-utils-common: /etc/init.d/xen restart fails when using network-bridge if netdev does not match eth[0-9+] Package: xen-utils-common Version: 3.1.0-1 Severity: normal *** Please type your report below this line *** On a machine where the NICs are named something other than ethN, and using (network-script 'network-bridge netdev=XXX') (where XXX is the name of one of these devices), /etc/init.d/xend restart fails consistently. For instance, i've got a machine which has the interface to be bridged named "wan". It's named this reliably by a hand-modified /etc/udev/rules.d/z25_persistent-net.rules. So /etc/xen/xend-config.sxp has this line: (network-script 'network-bridge netdev=wan') xen comes up and works fine with this device bridged, but this happens (the leading "0" is the return code of the previous process): 0 zorro:~# /etc/init.d/xend restart Restarting XEN control daemon: xend failed! 0 zorro:~# trying the commands by hand (without the initscript) does no better (though you can see the return code directly, at least): 0 zorro:~# /usr/lib/xen-3.1-1/bin/xend status 0 zorro:~# /usr/lib/xen-3.1-1/bin/xend stop 0 zorro:~# /usr/lib/xen-3.1-1/bin/xend start 1 zorro:~# When the failure happens, the following messages show up in /var/log/xen/xend.log: [2007-11-09 01:10:15 3111] INFO (__init__:1072) Xend Daemon started [2007-11-09 01:10:15 3111] INFO (__init__:1072) Xend changeset: unavailable. [2007-11-09 01:10:15 3111] INFO (__init__:1072) Xend version: Unknown. [2007-11-09 01:10:15 3111] ERROR (__init__:1072) Exception starting xend (local variable 'bridged_mac' referenced before assignment) Traceback (most recent call last): File "/usr/lib/xen-3.1-1/lib/python/xen/xend/server/SrvDaemon.py", line 345, in run servers = SrvServer.create() File "/usr/lib/xen-3.1-1/lib/python/xen/xend/server/SrvServer.py", line 254, in create root.putChild('xend', SrvRoot()) File "/usr/lib/xen-3.1-1/lib/python/xen/xend/server/SrvRoot.py", line 40, in __init__ self.get(name) File "/usr/lib/xen-3.1-1/lib/python/xen/web/SrvDir.py", line 82, in get val = val.getobj() File "/usr/lib/xen-3.1-1/lib/python/xen/web/SrvDir.py", line 52, in getobj self.obj = klassobj() File "/usr/lib/xen-3.1-1/lib/python/xen/xend/server/SrvNode.py", line 30, in __init__ self.xn = XendNode.instance() File "/usr/lib/xen-3.1-1/lib/python/xen/xend/XendNode.py", line 659, in instance inst = XendNode() File "/usr/lib/xen-3.1-1/lib/python/xen/xend/XendNode.py", line 178, in __init__ unconfigured_pifs = [(name, mtu, mac) File "/usr/lib/xen-3.1-1/lib/python/xen/xend/XendPIF.py", line 66, in linux_get_phy_ifaces phy_ifaces.append((name, int(mtu), bridged_mac)) UnboundLocalError: local variable 'bridged_mac' referenced before assignment It's interesting that during the first boot (before the network-bridge is brought up for the first time), there doesn't seem to be a problem doing /etc/init.d/xend start. Only subsequent /etc/init.d/xend/starts seem to fail. The following patch seems to fix things for me (i.e. i can restart xen cleanly), but i haven't excercised xen enough with it to know if it breaks anything else: --- /usr/lib/xen-3.1-1/lib/python/xen/xend/XendPIF.py.orig 2007-11-09 01:29:00.000000000 -0500 +++ /usr/lib/xen-3.1-1/lib/python/xen/xend/XendPIF.py 2007-11-09 01:29:29.000000000 -0500 @@ -32,7 +32,7 @@ IP_IFACE_RE = re.compile(r'^\d+: (\w+):.*mtu (\d+) .* link/\w+ ([0-9a-f:]+)') def linux_phy_to_virt(pif_name): - return 'eth' + re.sub(r'^[a-z]+', '', pif_name) + return re.sub(r'^p', '', pif_name) def linux_get_phy_ifaces(): """Returns a list of physical interfaces. Thanks for maintaining xen in debian! Regards, --dkg -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (500, 'testing'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.18-5-xen-686 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages xen-utils-common depends on: ii lsb-base 3.1-24 Linux Standard Base 3.1 init scrip ii udev 0.114-2 /dev/ and hotplug management daemo xen-utils-common recommends no packages. -- no debconf information -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 826 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20071109/46be543a/attachment.pgp
Debian Bug Tracking System
2012-May-06 13:51 UTC
[Pkg-xen-devel] Bug#450678: marked as done (xen-utils-common: /etc/init.d/xen restart fails when using network-bridge if netdev does not match eth[0-9+])
Your message dated Sun, 6 May 2012 15:50:24 +0200 with message-id <20120506135024.GF11813 at wavehammer.waldi.eu.org> and subject line network-bridge not supported has caused the Debian Bug report #450678, regarding xen-utils-common: /etc/init.d/xen restart fails when using network-bridge if netdev does not match eth[0-9+] to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner at bugs.debian.org immediately.) -- 450678: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=450678 Debian Bug Tracking System Contact owner at bugs.debian.org with problems -------------- next part -------------- An embedded message was scrubbed... From: Daniel Kahn Gillmor <dkg-debian.org at fifthhorseman.net> Subject: xen-utils-common: /etc/init.d/xen restart fails when using network-bridge if netdev does not match eth[0-9+] Date: Fri, 09 Nov 2007 01:48:41 -0500 Size: 6744 URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20120506/3f515ba6/attachment.mht> -------------- next part -------------- An embedded message was scrubbed... From: Bastian Blank <waldi at debian.org> Subject: network-bridge not supported Date: Sun, 6 May 2012 15:50:24 +0200 Size: 1492 URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20120506/3f515ba6/attachment-0001.mht>