Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196894 - Decrease >=dhcpcd-3.0 verbosity when falling back with APIPA
Summary: Decrease >=dhcpcd-3.0 verbosity when falling back with APIPA
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Roy Marples (RETIRED)
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-24 08:33 UTC by Vince C.
Modified: 2007-11-29 19:33 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 Vince C. 2007-10-24 08:33:08 UTC
When no network connectivity exists dhcpcd goes excessively verbose by logging each attempt to broadcast for an IP address, which can happen every 5-10 seconds. Such a verbosity level should be decreased to prevent from filling the log.

Reproducible: Always

Steps to Reproduce:
1. Unplug the network cable from eth0
2. Run dhcpcd -t 10 eth0
Actual Results:  
Attempts to broadcast for an IP address are (sys)logged every 10 seconds, each of which adds 5 lines to the log.

Expected Results:  
There's no need to actually log each failed attempt but only the first one. It's even better to log only changes.

When dhcpcd 3.0 or above is run while there is no network connectivity it first times out when broadcasting for an IP address then uses APIPA and forks to the background repeatedly checking for network connectivity and broadcasting for an IP address. It also keeps logging messages to the console log, which can largely increase the log file size.

Here are my suggestions:

 * stop logging after xyz minutes/seconds/hours/whatever or
 * log connection state changes only.

IMHO the best implementation would be to log only connection state changes, e.g. a new automatic address has been set up, link activity change was detected aso.

I can imagine, for compatibility reasons, adding an argument to switch to quiet mode but IMHO it'd be safer if dhcpcd changed its behaviour - i.e. stay quiet by default - when forked to the background and log only changes, for instance. It could go verbose if a new switch like -v was specified.

Thanks for your work.
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-10-24 08:56:11 UTC
This is a good idea, but in practice is quite complicated. Just so you know and don't expect it "soon".
Comment 2 Vince C. 2007-10-24 09:00:53 UTC
(In reply to comment #1)
> This is a good idea, but in practice is quite complicated. Just so you know and
> don't expect it "soon".

No problem, take the time you need. And if you want me to contribute, I'd be glad.
Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-10-24 12:13:16 UTC
Patches are always welcome :)
Comment 4 Roy Marples (RETIRED) gentoo-dev 2007-11-27 22:42:43 UTC
dhcpcd-3.1.8 is in the tree, so fixed.
Comment 5 Vince C. 2007-11-29 19:33:13 UTC
Hum... You were joking when you said "don't expect it soon", weren't you? ;-)

Thanks anyway.