On Tue, 2014-06-17 at 13:30 +0400, Pavel Odintsov wrote:
> Hello, folks!
> 
> I'm prepared and thoroughly tested scripts for managing netconsole
> kernel facility in Debian 6/7. Netconsole facility is very useful for
> debugging kernel bugs.
> 
> These scripts are inspired by CentOS 6 netconsole scripts in some
> cases and work in same way. Scripts are written in clean bash.
> 
> All scripts and configuration you can find here:
> https://github.com/FastVPSEestiOu/debian_netconsole
> 
> Yes, it's possible to configure netconsole statically (i.e. as
> /etc/modprobe.d/netconsole.conf) but it's a bad way because it relies
> on network configuration (i.e. gateway address, server address) which
> may be changed and netconsole will not work.
> 
> I tested both startup option:
> 1) As /etc/init.d/netconsole
> 2) As /etc/network/if-up.d/netconsole script
> 
> IMHO, the first variant is more reliable and convenient for this task.
> But both variants have some troubles because some network cards (like
> e1000) call /etc/network/if-up.d and /etc/init.d scripts on network
> level BEFORE real network initialization.

Network drivers do not control execution of ifupdown scripts at all.

I think the problem you're seeing is that the physical link is down
immediately after the interface is brought up.  This should be expected
because the link may have be turned off or limited to low speed to save
power when the operating system is not using it.  Bringing the link up
then requires autonegotiation and link training, which *should* take
less than a second but may sometimes take longer.

> I fixed this issue only by adding fixed timeout in my
> /etc/init.d/netconsole script. In the same way this issue was fixed in
> RH. Maybe you can provide more convenient solution?
> 
> Thank you for any feedback!

* You should detect the distribution using the lsb_release command
rather than reading /etc/issue
* Changing verbosity level should be optional
* You should not assume that 'ip' is installed in /sbin; instead make
sure that's included in $PATH
* You should not assume that the destination server is reached by the
default route; instead use 'ip route get $DESTINATION_SERVER_IP' to find
the gateway and source address to use

Ben.

-- 
Ben Hutchings
In a hierarchy, every employee tends to rise to his level of incompetence.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to