FR behavior when DB not available

Anatoliy cphlpd at gmail.com
Wed Jul 19 06:25:52 UTC 2023


Hi Terry , thank you for idea , I test resource-check, it works , but
trigger DB check by FR looks not very interesting,
But I am found another soluthis , I setup coa on FR and send status of DB
from external script (where is I can control how to check DB) and update
db_status

server coa {
    recv-coa {
        if ( &State == "OK" ) {
            %{db_online:alive}
        } else {
            %{db_online:fail}
        }
       ok
    }

With this configuration, I can , for example, mark DB failed , before MW .
and this will prevent unnecessary connections to DB that will fail...

Thanks again for idea

On Tue, Jul 18, 2023 at 10:26 PM Terry Burton <terry.burton at gmail.com>
wrote:

> On Tue, 18 Jul 2023 at 16:45, Anatoliy Kushner <cphlpd at gmail.com> wrote:
> > I am not stuck on how it should work. I already found solution how
> faster detect that db fail and how FR can check this state, without stuck
> on checking DB.
> >
> > Solution is very simple.
> > 1) external script which check db (detect time ~6-8 sec) and write this
> status to file
> > 2) perl script in FR which read status from file and depending on status
> send or not request to db
> >
> > Using file for transfering state between script and FR not the best
> solution but I didnot found anything better(I will be happy if you can
> recommend better )
>
> We have writable rlm_always instances that can be set via an external
> trigger:
>
>
> https://github.com/FreeRADIUS/freeradius-server/blob/v3.2.x/raddb/sites-available/resource-check
>
>
> > > On 18 Jul 2023, at 22:39, Alan DeKok <aland at deployingradius.com>
> wrote:
> > >
> > > On Jul 18, 2023, at 12:45 AM, Anatoliy <cphlpd at gmail.com> wrote:
> > >>
> > >> Hi Alan, there are 2 options how DB can fail.
> > >
> > >  That's nice.
> > >
> > >  You seem to be stuck on how things *should* work.
> > >
> > >  I've explained why things work the way they do, and what limitations
> are creating the current behavior.  I've explained what we're doing to fix
> it.  I've explained how you can help.
> > >
> > >  This is how it works.  It's not productive to keep wishing that
> things were different.
> > >
> > >  Alan DeKok.
> > >
> > > -
> > > List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
> > -
> > List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
>
>
> --
>
> Terry Burton Consulting Ltd is a company registered in England and
> Wales. Registered number: 11926244. VAT number: GB321512746.
> Registered office: Office 1 Brunswick House, Brunswick Way, Liverpool,
> Merseyside, England, L3 4BN.
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>


More information about the Freeradius-Users mailing list