FreeRADIUS / freeradius-server

FreeRADIUS - A multi-protocol policy server.
http://freeradius.org
GNU General Public License v2.0
2.14k stars 1.09k forks source link

more verbose pool debug #1930

Open alanbuxey opened 7 years ago

alanbuxey commented 7 years ago

Issue type

See here for debugging instructions and how to obtain backtraces.

NOTE: PATCHES GO IN PULL REQUESTS. IF YOU SUBMIT A DIFF HERE, THE DEVELOPMENT TEAM WILL HUNT YOU DOWN AND BEAT YOU OVER THE HEAD WITH YOUR OWN KEYBOARD.

Defect/Feature description

How to reproduce issue

current pool/connection output is mixed. sometimes there is the module name involved, sometimes not eg

Mon Mar  6 23:03:39 2017 : Info  : (127810,127789)                    Need 1 more connections to reach min connections (64)
Mon Mar  6 23:03:39 2017 : Info  : (127826,127819)        mschap - Need 1 more connections to reach min connections (64)
Mon Mar  6 23:03:39 2017 : Info  : (127826,127819)                  Deleting connection (1287)
Mon Mar  6 23:03:39 2017 : Info  : (127826,127819)                  Need 64 more connections to reach min connections (64)
Mon Mar  6 23:03:39 2017 : Info  : (127826,127819)            Deleting connection (1309)
Mon Mar  6 23:03:39 2017 : Info  : (127826,127819)            Need 64 more connections to reach min connections (64)
Mon Mar  6 23:03:39 2017 : Info  : (127826,127819)            Deleting connection (1313)
Mon Mar  6 23:03:39 2017 : Info  : (127826,127819)            Need 64 more connections to reach min connections (64)
Mon Mar  6 23:03:39 2017 : Info  : (127826,127819)            Deleting connection (1322)
Mon Mar  6 23:03:39 2017 : Info  : (127826,127819)            Need 64 more connections to reach min connections (64)
Mon Mar  6 23:03:39 2017 : Info  : (127826,127819)            Deleting connection (1288)

would be good if all pool-using modules printed their IDs in those outputs - so admins can easily see which module is unable to make its connections.. oh, and "Need 1 more connections" is annoying to see - "Need 1 more connection" :)

alandekok commented 7 years ago

In v3 and v4 it has a log_prefix (see src/main/connection.c). It is usually set to rlm_foo, i.e. the instance name.

The issue here is that log_prefix isn't being used in the INFO log messages.

As always, patches are welcome...

arr2036 commented 7 years ago

I'll look at this tomorrow. There's macros that mean you don't double prefix log messages with the module name, but for some reason they're not working for the REQUEST == NULL invocations.

alanbuxey commented 7 years ago

any update on this one Arran?