Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258378 - app-emulation/xen-tools-3.3.0 does not bring eth0 up
Summary: app-emulation/xen-tools-3.3.0 does not bring eth0 up
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High major with 1 vote (vote)
Assignee: Gentoo Xen Devs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-09 22:34 UTC by Simon Gao
Modified: 2010-05-18 20:12 UTC (History)
4 users (show)

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


Attachments
Updated patch to /etc/xen/scripts/network-bridge to support ipv6 enabled kernels (xen-tools-3.4.0-network-bridge-broadcast.patch,496 bytes, patch)
2010-03-02 04:32 UTC, Rob Nabsy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Gao 2009-02-09 22:34:31 UTC
During boot process, Xen network scripts do not bring eth0 up properly and have following errors:

Waiting for peth0 to engotiate link:
Error: either "local" is duplicate, or "inet6" is a garbage.

Both net.eth0, xend and xendomains are added to "default" run level.

Manually brings up eth0 and then networking works fine.

Reproducible: Always

Steps to Reproduce:
1.Build a new Xen base machine
2.Install xne-3.3.0 and xen-tool-3.3.0
3.Reboot

Actual Results:  
eth0 can't be brought up. 

Expected Results:  
eth0 comes up with configured ip address.

Portage 2.1.6.4 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-xen-r50 i686)                                                                          
=================================================================                 
System uname: Linux-2.6.27-xen-r50-i686-Intel-R-_Pentium-R-_M_processor_1.70GHz-with-glibc2.0                                                                       
Timestamp of tree: Mon, 09 Feb 2009 18:05:01 +0000                                
app-shells/bash:     3.2_p39                                                      
dev-lang/python:     2.4.4-r13, 2.5.2-r7                                          
dev-python/pycrypto: 2.0.1-r6                                                     
sys-apps/baselayout: 1.12.11.1                                                    
sys-apps/sandbox:    1.2.18.1-r2                                                  
sys-devel/autoconf:  2.63                                                         
sys-devel/automake:  1.10.2                                                       
sys-devel/binutils:  2.18-r3                                                      
sys-devel/gcc-config: 1.4.0-r4                                                    
sys-devel/libtool:   1.5.26                                                       
virtual/os-headers:  2.6.27-r2                                                    
ACCEPT_KEYWORDS="x86"                                                             
CBUILD="i686-pc-linux-gnu"                                                        
CFLAGS="-march=pentium4 -O2 -pipe -mno-tls-direct-seg-refs"                       
CHOST="i686-pc-linux-gnu"                                                         
CONFIG_PROTECT="/etc"                                                             
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"                                           
CXXFLAGS="-march=pentium4 -O2 -pipe -mno-tls-direct-seg-refs"                     
DISTDIR="/usr/portage/distfiles"                                                  
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"                                                      
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"                                                               
LDFLAGS="-Wl,-O1"                                                                 
MAKEOPTS="-j2"                                                                    
PKGDIR="/usr/portage/packages"                                                    
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                                                        
PORTAGE_TMPDIR="/var/tmp"                                                         
PORTDIR="/usr/portage"                                                            
PORTDIR_OVERLAY="/usr/local/portage"                                              
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv ipv6 isdnlog mbox midi mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audiovia82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emulmulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache davdav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewritesetenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Simon Gao 2009-02-11 00:45:02 UTC
It seems that Xen scripts can't handle network interfaces correctly when IPv6 is enabled in the kernel or loaded as module. Disable IPv6 protocol from kernel the problem went away.

xen-tools version 3.2.1 or earlier does not have this problem.
Comment 2 Duncan Lockwood 2009-05-01 10:40:07 UTC
Disabling IPv6 isn't really a solution. I want IPv6! ;-)

I've just tweaked the file ever so slightly, to grep for 'inet ' instead of 'inet' and it seems to work OK for me.

Here's the diff:-

dunc@(none) ~ $ diff -u /etc/xen/scripts/network-bridge.orig /etc/xen/scripts/network-bridge
--- /etc/xen/scripts/network-bridge.orig	2009-04-30 17:12:18.000000000 +0100
+++ /etc/xen/scripts/network-bridge	2009-04-30 17:12:46.000000000 +0100
@@ -101,7 +101,7 @@
 tdev=tmpbridge
 
 get_ip_info() {
-    addr_pfx=`ip addr show dev $1 | egrep '^ *inet' | sed -e 's/ *inet //' -e "s/$1//"`
+    addr_pfx=`ip addr show dev $1 | egrep '^ *inet ' | sed -e 's/ *inet //' -e "s/$1//"`
     gateway=`ip route show dev $1 | fgrep default | sed 's/default via //'`
 }
     

Anyone else want to try this too?

I'll send it to the xen-users list too.
Comment 3 Duncan Lockwood 2009-05-01 10:49:56 UTC
Seems the guys at xen already know and have done a different patch.

Probably should add this to portage

http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1142

Cheers,

Dunc
Comment 4 Nathan March 2009-05-27 22:26:20 UTC
Would be nice =) I was the one who filed that bug report 9 months ago and was pretty shocked just now when I discovered it still hadn't been put into xen or portage....

(In reply to comment #3)
> Seems the guys at xen already know and have done a different patch.
> 
> Probably should add this to portage
> 
> http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1142
> 
> Cheers,
> 
> Dunc
> 

Comment 5 Patrick Lauer gentoo-dev 2009-06-22 18:23:31 UTC
Sigh. xen build system is making me sad.
The patch cleanly applies to 3.4.0 (with adapted path to tools/hotplug/Linux), but the installed file is unpatched - looks like it gets overwritten during compilation. If anyone feel like debugging this please feel free, would be nice to have this fixed :)
Comment 6 Antonino Catinello 2009-07-04 07:31:42 UTC
xen-tools-3.4.0-network-bridge-broadcast.patch is wrong! It's missing a whitespace in the egrep pattern ... so patch the patch or whatever ;-)

# diff -u xen-tools-3.4.0-network-bridge-broadcast.patch.orig xen-tools-3.4.0-network-bridge-broadcast.patch
--- xen-tools-3.4.0-network-bridge-broadcast.patch.orig 2009-07-04 09:17:19.440852258 +0200
+++ xen-tools-3.4.0-network-bridge-broadcast.patch      2009-07-04 09:15:04.840855157 +0200
@@ -5,7 +5,7 @@

  get_ip_info() {
 -    addr_pfx=`ip addr show dev $1 | egrep '^ *inet' | sed -e 's/ *inet //' -e 's/ .*//'`
-+    addr_pfx=`ip addr show dev $1 | egrep '^ *inet' | sed -e 's/ *inet //' -e "s/$1//"`
++    addr_pfx=`ip addr show dev $1 | egrep '^ *inet ' | sed -e 's/ *inet //' -e "s/$1//"`
      gateway=`ip route show dev $1 | fgrep default | sed 's/default via //'`
  }

Please fix this! It's very annoying to have a bug caused by a single whitespace.

Thanks.



(In reply to comment #5)
> Sigh. xen build system is making me sad.
> The patch cleanly applies to 3.4.0 (with adapted path to tools/hotplug/Linux),
> but the installed file is unpatched - looks like it gets overwritten during
> compilation. If anyone feel like debugging this please feel free, would be nice
> to have this fixed :)
> 

Comment 7 DEMAINE Benoît-Pierre, aka DoubleHP 2010-01-14 10:05:38 UTC
Still got the bug with 3.4.2 .

If i ping the bog during boot, only 5 querries got answers: as xend started, eth0 stops working. My WA is to put "ifconfig eth0 192.168.x.y && route add default gw 192.168.x.1" in conf.d/local.start .

I also got the message
error: either "local" is duplicate, or "inet6" is a garbage
in console at boot time, and ipv6 in kernel.

Fresh install. 

The fix seems trivial; why don't Gentoo put a patch in portage ?
Comment 8 Rob Nabsy 2010-03-02 04:32:41 UTC
Created attachment 221749 [details, diff]
Updated patch to /etc/xen/scripts/network-bridge to support ipv6 enabled kernels

This patch implements the fix described in comments 2 and 6, which resolved the same issue on my machine (newly built with xen-tools 3.4.2).  It has not been tested with any other machine or configuration.
Comment 9 Ben XO 2010-03-31 20:56:35 UTC
I had the same problem and adding the whitespace fixed it. app-emulation/xen-3.4.2-r1 / app-emulation/xen-tools-3.4.2
Comment 10 Patrick Lauer gentoo-dev 2010-04-07 16:46:21 UTC
+  07 Apr 2010; Patrick Lauer <patrick@gentoo.org>
+  files/xen-tools-3.4.0-network-bridge-broadcast.patch:
+  Fixing xen-tools-3.4.0-network-bridge-broadcast.patch for #258378

Sorry for the delay, I'm a bad maintainer :)
Comment 11 DEMAINE Benoît-Pierre, aka DoubleHP 2010-05-18 20:12:19 UTC
Could you push the patch on app-emulation/xen-tools-3.4.2 ? it also bugs since ages.