Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 136896 - app-emulation/xen-tools - xend start stops many default services
Summary: app-emulation/xen-tools - xend start stops many default services
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Xen Devs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-15 08:11 UTC by Martin Hierling
Modified: 2007-09-22 17:49 UTC (History)
4 users (show)

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


Attachments
xen-network-common (xen-network-common.sh.patch,392 bytes, patch)
2006-07-09 06:45 UTC, Martin Hierling
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Hierling 2006-06-15 08:11:24 UTC
Hi,

crude behavior while starting xend "by hand".

# rc-status
Runlevel: default
 atd                                                  [ started ]
 nfs                                                  [ started ]
 vdr                                                  [ started ]
 dhcp                                                 [ started ]
 ietd                                                 [ started ]
 sshd                                                 [ started ]
 vdradmind                                            [ started ]
 in.tftpd                                             [ started ]
 cupsd                                                [ started ]
 fcron                                                [ started ]
 mdadm                                                [ started ]
 local                                                [ started ]
 named                                                [ started ]
 mysql                                                [ started ]
 samba                                                [ started ]
 slapd                                                [ started ]
 syslog-ng                                            [ started ]
 domainname                                           [ started ]
 iscsid                                               [ started ]
 net.eth0                                             [ started ]
 hddtemp                                              [ started ]
 netmount                                             [ started ]
 xinetd                                               [ started ]
 ypbind                                               [ started ]
 apache2                                              [ started ]
 ypserv                                               [ started ]
 nfsmount                                             [ started ]
 portmap                                              [ started ]
defiant ~ # xend start
defiant ~ # echo $?
0
defiant ~ # rc-status
Runlevel: default
 atd                                                    [   off ]
 nfs                                                  [ started ]
 vdr                                                    [   off ]
 dhcp                                                   [   off ]
 ietd                                                 [ started ]
 sshd                                                   [   off ]
 vdradmind                                              [   off ]
 in.tftpd                                               [   off ]
 cupsd                                                [ started ]
 fcron                                                [ started ]
 mdadm                                                [ started ]
 local                                                [ started ]
 named                                                  [   off ]
 mysql                                                [ started ]
 samba                                                  [   off ]
 slapd                                                  [   off ]
 syslog-ng                                              [   off ]
 domainname                                           [ started ]
 iscsid                                               [ started ]
 net.eth0                                             [ started ]
 hddtemp                                              [ started ]
 netmount                                               [   off ]
 xinetd                                               [ started ]
 ypbind                                                 [   off ]
 apache2                                                [   off ]
 ypserv                                                 [   off ]
 nfsmount                                               [   off ]
 portmap                                              [ started ]
defiant ~ #

All my local default services are started, then i start then xen daemon, it starts without an error, but some of my services are down after that. 
I have this behavior on 3 servers, all running gentoo, xen-3.0.x. 
This server is running 3.0.2.

# emerge --info
Portage 2.0.54-r2 (!/usr/portage/profiles/default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r3, 2.6.16.18-xen i686)
=================================================================
System uname: 2.6.16.18-xen i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5, 2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=pentium3 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/lib/X11/xkb /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=pentium3 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/export/packages/p3-xenX"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/export/portage"
PORTDIR_OVERLAY="/proj/overlay/gentoo-de /proj/overlay/martin"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 alsa apache2 apm arts audiofile avi bash-completion berkdb bitmap-fonts bzip2 cdr cli crypt cups curl dri dvdread eds emboss encode esd exif exim expat fam ffmpeg foomaticdb fortran gd-external gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 idn imagemagick imap imlib ipv6 isdnlog jpeg lcms ldap libg++ libwww mad mcal memlimit mhash mikmod mng motif mp3 mpeg mysql ncurses nls nptl ogg opengl oss pam pcre pdflib perl php png pppd python qt quicktime readline reflection samba sdl session slang snmp spell spl ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts udev usb vorbis xml xml2 xorg xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS

regards Martin
Comment 1 Frido Ferdinand 2006-06-15 13:33:37 UTC
Yes also confirmed here on multiple machines, this also happens with the init.d script provided. Sshd quitting is quite a nuisance. No idea on how to fix this tho.
Comment 2 Nick Devito 2006-07-04 07:27:34 UTC
(NOTE: This is just a guess): Maybe this *could* be caused by the fact that Xen networking does some weird things with interfaces, which could cause some issues for network daemons (eth0 is renamed to peth0, then, eth0 is replaced with a fake eth0 thats in a bridge with peth0). 
Comment 3 Martin Hierling 2006-07-06 10:34:29 UTC
Nick, 
i could imagine some szenario like you described if the daemons just disappear or get killed. But rc-status clearly shows that they where shut down by there init scripts. Another point is why some daemons get shut down (sshd, apache) and some other, also network releated daemons (portmapper, mysql, cups, xinetd), not.

Aron,
I suggest someone with some python knowledge should dig in there, this is a really annoying and frustrating thing.
And the workaround:
rc-status  | awk '/off/ {printf("/etc/init.d/%s start\n",$1)}'  | bash
isnt the type of script i
Comment 4 Martin Hierling 2006-07-06 10:34:29 UTC
Nick, 
i could imagine some szenario like you described if the daemons just disappear or get killed. But rc-status clearly shows that they where shut down by there init scripts. Another point is why some daemons get shut down (sshd, apache) and some other, also network releated daemons (portmapper, mysql, cups, xinetd), not.

Aron,
I suggest someone with some python knowledge should dig in there, this is a really annoying and frustrating thing.
And the workaround:
rc-status  | awk '/off/ {printf("/etc/init.d/%s start\n",$1)}'  | bash
isnt the type of script i´d like to run on my servers.

regards Martin
Comment 5 Martin Hierling 2006-07-08 04:38:15 UTC
I have found out that only services with "depend net" in there init scripts are shut down. Scripts with "use net" are not. Changing sshd initscript from "depend" to "use" solves the sshd shutdown problem. 
That brings me to the conclusion that xend somhow stops /etc/init.d/net.ethX? But could that be? How does xend know on what distro it is running and what script it has to shut down, if so? weird. Again, someone with python knowledge here?

regards Martin
Comment 6 Martin Hierling 2006-07-08 07:02:39 UTC
Me again, as a workaround and evidence that gentoo init scripts are shut down by xend you may set RC_NET_STRICT_CHECKING in /etc/conf.d/rc to "lo". That prevents shutting down your network services while xend starup. The disadvantage is that net.eth0 starts at the end of the runlevel and thereby no daemon can bind (if you have ie apache bind to only 192.168.x.y) to that interface. If you bind the daemons to 0.0.0.0 they will work after startup and eth0 is up.

regards Martin 
Comment 7 Martin Hierling 2006-07-09 06:45:32 UTC
Created attachment 91280 [details, diff]
xen-network-common 

Hi,

dont know what this function does but the patch prevents net.ethx to be shut down by xend start script.

Martin
Comment 8 Martin Hierling 2006-07-10 08:38:07 UTC
i am wondering if anyone has xen3 running, because in my opinion that bug prevents everyone from running it smoothly. dont know what the xen guys thought by shuting down net.* completely (no knowledge about Gentoo?) but whoever wrote the ebuilds should fix it. Tell me if i am entirely wrong.

btw: in my test and production environment everything works fine with that patch.

regards Martin
Comment 9 Micheal Marineau (RETIRED) gentoo-dev 2007-08-26 22:24:04 UTC
Closing, as far as I can tell this problem is fixed in Xen 3.0.4 and 3.1.0. Please reopen this bug if it happens with >=3.0.4.
Comment 10 Stefan de Konink 2007-09-22 16:37:20 UTC
I currently have installed a Xen machine (xen-3.1.0) and if xend is started in the default runlevel eth0 looses its ip address... now maybe this is because of the renaming. But I was not amused that this happened.
Comment 11 Micheal Marineau (RETIRED) gentoo-dev 2007-09-22 17:49:25 UTC
(In reply to comment #10)
> I currently have installed a Xen machine (xen-3.1.0) and if xend is started in
> the default runlevel eth0 looses its ip address... now maybe this is because of
> the renaming. But I was not amused that this happened.
> 

You say that as if some evil person wanted you to hit a bug :-P

Please open a new bug for this issue instead of commenting on this old bug and include more information on your system/configuration such as:
* the standard emerge --info
* settings for eth0 and when it is started
* xen settings, I assume you are using bridged? anything beyond the default config?
* and anything else you can think of

Thanks