Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124706 - GNAP: Network fails to come up if syslog-ng is set to remote logging
Summary: GNAP: Network fails to come up if syslog-ng is set to remote logging
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: GNAP (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Network Appliance Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-02 14:49 UTC by andy
Modified: 2013-11-20 23:08 UTC (History)
0 users

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 andy 2006-03-02 14:49:09 UTC
Using gnap-1.8.2: If you turn on remote logging in syslog-ng.conf in your overlay, the syslog-ng init script gets a "need net" dependency to have the network configured before logging is started (see /etc/init.d/syslog-ng, function depend()).

However this makes the net.* init scripts run before autoconfig has run; so network configuration fails because the net devices aren't there yet.

For some reason, this happens, even though the autoconfig init script has a "before net" dependency.

I don't know why the "before net" dependency doesn't work for me... But wouldn't it be less troublesome to put the autoconfig service into the boot runlevel (maybe with an "after *" dependency)?


How to reproduce:
mkdir -p myoverlay/etc/syslog-ng
cat >myoverlay/etc/syslog-ng/syslog-ng.conf << EOF
options { chain_hostnames(off); sync(0); stats(43200); };
source src { unix-stream("/dev/log"); internal(); pipe("/proc/kmsg"); };
destination messages { file("/var/log/messages"); };
log { source(src); destination(messages); };
destination console { file("/dev/tty12"); };
log { source(src); destination(console); };
destination loghost { udp("111.222.333.444" port(514)); };
log { source(src); destination(loghost); };
EOF
echo "NBCARDS=1" >myoverlay/etc/overlay.conf
gnap_overlay -o myoverlay -i myoverlay.iso
qemu -cdrom myoverlay.iso

After "INIT: Entering runlevel: 3", you'll notice that net.eth0 is started (and fails with "eth0 does not exist"), followed by syslog-ng (which also fails), and autoconfig (which finally detects the network card)
Comment 1 Thierry Carrez (RETIRED) gentoo-dev 2006-04-15 03:43:26 UTC
Interesting :)

Can't change it in a release candidate phase, but I'll try to find a good solution for 2.0.1 afterwards.
Comment 2 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2006-04-15 11:41:33 UTC
I had some similar issues when adding Asterisk to the mix. Uberlord helped debug the problem and the fixes are now in the latest ~x86 baselayout (not sure wether it is stable yet but it works fine on my boxen).
Comment 3 andy 2006-09-28 18:04:21 UTC
I tried gnap-2.0 from portage today and it seems like the bug still exists. Does anybody know how to fix or workaround this?
Comment 4 Philipp Riegger 2009-04-17 14:58:29 UTC
I get the problem because syslog needs network, network starts after iptables and iptables needs syslog. This is on normal Gentoo though, using openrc, but maybe it's the same. I removed the dependency on syslog from iptables.
Comment 5 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-11-20 23:08:57 UTC
The GNAP project has been discontinued, its removal was acknowledged by steev.

If you need to, you can contact the Gentoo Embedded project; more information about the Gentoo Embedded project can be found on the following link:

http://www.gentoo.org/proj/en/base/embedded/

This removal happens as part of project cleanup by the Gentoo Council's members.