Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 325699 - app-emulation/xen messes net.eth links
Summary: app-emulation/xen messes net.eth links
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Xen Devs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-26 12:13 UTC by DEMAINE Benoît-Pierre, aka DoubleHP
Modified: 2011-03-26 11:40 UTC (History)
0 users

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


Attachments
/tmp/emerge--info (emerge--info,15.72 KB, text/plain)
2010-06-26 12:14 UTC, DEMAINE Benoît-Pierre, aka DoubleHP
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DEMAINE Benoît-Pierre, aka DoubleHP 2010-06-26 12:13:44 UTC
I was wondering why /etc/runlevels/default/net.eth0 was a red link:

uranus init.d # ls -l /etc/runlevels/default/net*
lrwxrwxrwx 1 root root 20 Jan 13 21:58 /etc/runlevels/default/net.eth0 -> /etc/init.d/net.eth0
lrwxrwxrwx 1 root root 20 Jun 25 21:19 /etc/runlevels/default/netmount -> /etc/init.d/netmount
uranus init.d # ls -l /etc/init.d/net*
-rwxr-xr-x 1 root root  1122 Jan 19 14:09 /etc/init.d/net-check
-rwxr-xr-x 1 root root 15143 Jun 26 00:13 /etc/init.d/net.lo
-rwxr-xr-x 1 root root  2031 Jun 26 00:13 /etc/init.d/netmount
lrwxrwxrwx 1 root root     6 Jan 13 20:53 /etc/init.d/net.peth0 -> net.lo
lrwxrwxrwx 1 root root     6 Jan 13 21:05 /etc/init.d/net.ppeth0 -> net.lo
-rwxr-xr-x 1 root root  6859 Jun 26 00:13 /etc/init.d/network
uranus init.d #

The bug is that xen installation renames init.d links, but not runlevel ones ...

The bug is related with bug http://bugs.gentoo.org/show_bug.cgi?id=293717

Not, my /etc is messed up. And I have no clue how how I should fix it.

Problem is that i don't know if /etc/conf.d/net should describe eth0 or peth0 . I confugred furst my system with network, and installed xen 2 weeks later; xen installation broke everything.

config_eth0=( "192.168.0.52 netmask 255.255.255.0 broadcast 192.168.0.255" "192.168.0.80" "192.168.0.83" "2a01:e35:8ba8:e140::1234/64" )

After xen service, everything is broken, and, i have to fix everything manually (automated in /etc/init.d/net-check and /etc/conf.d/local.start

After xen service, neither eth0 or peth0 are configured properly, so, for now, i have /etc/init.d/net-check doing this:

checkconfig() {
source /etc/conf_local
IP_1="192.168.0.1"
IP_2="72.14.221.104"
IP_2="209.85.229.104"
IP_2="${ADSL_GATEWAY}"
#       ebegin "exiting NOW ???"
#       return 0
ifconfig eth0 2>/dev/null | grep 192.168.0.52 >/dev/null && ebegin "eth0 is ok" || ( ifconfig eth0 192.168.0.52 ; ebegin "We fixed eth0" ; )
route -n 2>/dev/null | grep 192.168.0.1 >/dev/null && ebegin "Routes are fine" || ( route add default gw 192.168.0.1 ; ebegin "We fixed routes" ; )
        ping -v -W5 -c3 ${IP_1} -i 0.2 >/dev/null && r1=0 || r1=1
        if [ ${r1} -ne 0 ] ; then
                eerror "Could not ping ${IP_1} (should be gateway or Freebox)."
                /usr/bin/beep -f 100 -l 1000 -r 3 &
                return 1
        fi
        ping -v -W5 -c3 ${IP_2} -i 0.2 >/dev/null && r2=0 || r2=1
        if [ ${r2} -ne 0 ] ; then
                eerror "Could not ping ${IP_2} (should be google.fr)."
                /usr/bin/beep -f 100 -l 1000 -r 3 &
                return 1
        fi
        return 0
}

and in /etc/conf.d/local.start

ip -6 addr add 2a01:e35:8ba8:e140::8080/64 dev eth0
/sbin/ifconfig eth0:80 192.168.0.80

Otherwise, the box don't have network at all.
When i do these manipulations on peth0, in practice, connectivity does not "work", and network is not "usable".

Dispite i am doing this on eth0, domUs work fine, and have usable network.
Comment 1 DEMAINE Benoît-Pierre, aka DoubleHP 2010-06-26 12:14:04 UTC
Created attachment 236635 [details]
/tmp/emerge--info
Comment 2 DEMAINE Benoît-Pierre, aka DoubleHP 2010-06-26 13:05:01 UTC
Here is the console output; you will understand which case of net-check occurs:

 * Starting hddtemp daemon ...                                  [ ok ]
 * Mounting network filesystems ...                             [ ok ]
 * Starting Xen control daemon ...                              [ ok ]
 * Starting sshd ...                                            [ ok ]
 * Starting lighttpd ...                                        [ ok ]
 * Starting Music Player Daemon ...                             [ ok ]
 /etc/init.d/munin-node: line 18: ebegin: command not found
/etc/init.d/munin-node: line 20: eend: command not found
 * ERROR: munin-node failed to start
 * Checking network connectivity ...
 * We fixed eth0 ...
 * We fixed routes ...                                          [ ok ]
 * Setting clock via the NTP client 'ntpdate' ...               [ ok ]
 * Enabling numlock on ttys ...                                 [ ok ]
 * Starting sensord ...                                         [ ok ]
 * Starting S.M.A.R.T. monitoring daemon ...                    [ ok ]
 * Starting vixie-cron ...                                      [ ok ]
 * Starting Xen domains from /etc/xen/auto
 * Creating screen session to hold domain consoles ...          [ ok ]
 * Starting local ...


If i don't do that and leave eth0 as xen left it, NTP fails, what can have many side effects (system date/time not corrected if BIOS time went wrong, other services not starting properly, exim turning mad, fsck, SQL ... ) ... that's why i had to make ntp depend on net-check.
Comment 3 Alexey Shvetsov archtester gentoo-dev 2011-03-26 11:40:34 UTC
Xen 4.1 in tree. Please test with it and reopen if it doesnt work