Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383339 - app-admin/syslog-ng-3.2.4: init script fails to start with ethernet bonding
Summary: app-admin/syslog-ng-3.2.4: init script fails to start with ethernet bonding
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-17 12:05 UTC by Remco Overdijk
Modified: 2013-08-13 21:45 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remco Overdijk 2011-09-17 12:05:10 UTC
/etc/init.d/syslog-ng checks if any configuration in syslog-ng.conf requires a network connection. 
On my system it does, because I am receiving remote Cisco logs, so syslog-ng will "need net".

This used to work fine with a regular net setup (net.eth0 and net.eth1). 
Now I have an ethernet bonding setup however, so net.eth0 and net.eth1 have been removed an have been replaced by net.bond0.

This causes syslog-ng to fail it's start during boot.
(See: https://rem.co/syslog-ng-fail.jpg for the actual result)
I can't image this being due to an actual problem with net.bond0, as you can see in the screenshot, it starts correctly directly after.

I have tried to change the init script, modifying the "need" parameter and adding an "after" parameter, but I'm too big a n00b to make it work.

This may be due to the fact that a bonding device takes longer than an actual eth to come up, so maybe it's marked as failed incorrectly

excerpt from kern.log:
Sep 17 13:47:19 gd kernel: ADDRCONF(NETDEV_UP): bond0: link is not ready
Sep 17 13:47:19 gd kernel: ADDRCONF(NETDEV_UP): bond0: link is not ready
Sep 17 13:47:19 gd kernel: bonding: bond0: Adding slave eth0.
Sep 17 13:47:19 gd kernel: bonding: bond0: enslaving eth0 as an active interface with a down link.
Sep 17 13:47:19 gd kernel: e1000: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX
Sep 17 13:47:19 gd kernel: bonding: bond0: Adding slave eth1.
Sep 17 13:47:19 gd kernel: bonding: bond0: enslaving eth1 as an active interface with a down link.
Sep 17 13:47:19 gd kernel: e1000: eth1 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX
Sep 17 13:47:19 gd kernel: bonding: bond0: link status definitely up for interface eth0, 100 Mbps full duplex.
Sep 17 13:47:19 gd kernel: bonding: bond0: link status definitely up for interface eth1, 100 Mbps full duplex.
Sep 17 13:47:19 gd kernel: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready


After the boot has completed, '/etc/init.d/syslog-ng start' works fine once again.

Reproducible: Always

Steps to Reproduce:
1. Configure system for ethernet bonding
2. Remove normal net.* symlinks from /etc/init.d
3. Reboot
Actual Results:  
* ERROR: cannot start syslog-ng as net.bond0 would not start

Expected Results:  
* Starting syslog-ng                        [ ok ]

Portage 2.1.10.11 (hardened/linux/amd64, gcc-4.4.5, glibc-2.12.2-r0, 2.6.39-hardened-r8-RMZv2 x86_64)
=================================================================
System uname: Linux-2.6.39-hardened-r8-RMZv2-x86_64-Intel-R-_Xeon-TM-_CPU_3.40GHz-with-gentoo-2.0.3
Timestamp of tree: Sat, 17 Sep 2011 09:30:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.68
sys-devel/automake:       1.4_p6-r1, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.4.5
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer "
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/bind /var/qmail/alias /var/qmail/control /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer "
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://mirror.leaseweb.com/gentoo/ http://mirror.leaseweb.com/gentoo/ "
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -ldl"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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 amd64 apache2 auth_digest bash bash-completion bzip2 caps cli cracklib crypt ctype cxx dba dri ftp gd gdbm gpm hardened iconv imap innodb ipv6 ithreads jpeg jpeg2k justify memcache memcached mmx modules mudflap multilib mysql ncurses nls nptl nptlonly openmp pam pax_kernel pcre perl php pic png pppd python raw readline session slang snmp sockets sse sse2 ssl suexec svg sysfs tcpd threads tiff unicode urandom usagi valias vhosts vpopmail wmf xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias authn_alias authn_anon authn_dbm authn_dbd authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_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 setenvif speling ssl status unique_id usertrack auth_basic auth_digest rewrite userdir vhost_alias cgid bw bandwidth" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2011-09-18 21:31:25 UTC
Doesn't sound like a syslog-ng problem so much as the service getting started too soon.
Comment 2 Remco Overdijk 2011-09-19 10:38:08 UTC
Agree, syslog-ng as a program works fine, but being started too soon causes the error. 
After some more research I actually found out that syslog-ng being pulled early is due to the fact that ip6tables is in the default runlevel. (Which would be the issue described in https://bugs.gentoo.org/show_bug.cgi?id=228973 instead of a separate bug).
The fact remains however that this configuration used to work without ethernet bonding, but fails after enabling. Could it be filed under 'dumb luck' that the original configuration worked, looking at 228973? 

In the meantime I have removed ip6tables from the runlevel as shorewall is starting to provide firewall, which also sets ip6tables state during init. As shorewall doesn't need the logger, syslog-ng now starts after net, which eliminates the problem.
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2013-05-10 21:40:11 UTC
try it with syslog-ng-3.4.1 please
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2013-08-13 21:45:35 UTC
use syslog-ng 3.4.x