If you rename your interfaces with udev (e.g. public instead of eth0) and attach them to Xen bridges the xend doesn't succeed to restart. Reproducible: Always Steps to Reproduce: 1. rename network interface with udev 2. attach it to xen-bridge 3. restart xend Actual Results: Error message: [2008-01-04 18:00:51 16495] INFO (SrvDaemon:331) Xend Daemon started [2008-01-04 18:00:51 16495] INFO (SrvDaemon:335) Xend changeset: unavailable. [2008-01-04 18:00:51 16495] INFO (SrvDaemon:342) Xend version: Unknown. [2008-01-04 18:00:51 16495] ERROR (SrvDaemon:353) Exception starting xend (local variable 'bridged_mac' referenced before assignment) Traceback (most recent call last): File "usr/lib64/python2.4/site-packages/xen/xend/server/SrvDaemon.py", line 345, in run servers = SrvServer.create() File "usr/lib64/python2.4/site-packages/xen/xend/server/SrvServer.py", line 254, in create root.putChild('xend', SrvRoot()) File "usr/lib64/python2.4/site-packages/xen/xend/server/SrvRoot.py", line 40, in __init__ self.get(name) File "usr/lib64/python2.4/site-packages/xen/web/SrvDir.py", line 82, in get val = val.getobj() File "usr/lib64/python2.4/site-packages/xen/web/SrvDir.py", line 52, in getobj self.obj = klassobj() File "usr/lib64/python2.4/site-packages/xen/xend/server/SrvNode.py", line 30, in __init__ self.xn = XendNode.instance() File "usr/lib64/python2.4/site-packages/xen/xend/XendNode.py", line 659, in instance inst = XendNode() File "usr/lib64/python2.4/site-packages/xen/xend/XendNode.py", line 178, in __init__ unconfigured_pifs = [(name, mtu, mac) File "usr/lib64/python2.4/site-packages/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 Expected Results: successful restart of Xen daemon Found fix in Bug report for Debian (cannot remember URL anymore). Patch in /usr/lib64/python2.4/site-packages/xen/xend/XendPIF.py: 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.
source to patch: http://lists.alioth.debian.org/pipermail/pkg-xen-devel/2007-November/001509.html
Hi Reto, is this still a problem with newer xen versions (especially 3.4.0) ?
Xen 4.1 in tree. Please test with it and reopen if it doesnt work