load balancing and if statements

Phil Mayers p.mayers at imperial.ac.uk
Wed Mar 28 13:17:24 CEST 2012


On 27/03/12 23:38, Brian De Wolf wrote:
> On Mon, 26 Mar 2012 11:46:22 -0700
> Scott McLane Gardner<sgardne at uark.edu>  wrote:
>
>> If I can't use if statements in a load balance block, can anyone
>> suggest another way to go about accomplishing what I want to do here?
>
> After reading this thread and realizing it affects my implementation
> (though with mysql), I started poking at this to work out a solution.
>
> The real problem with trying to build this in unlang is that there
> doesn't seem to be a way to differentiate between a failed Sql-Group
> check and a negative result.  Instead, I have to cheese it out with

Correct. This is a limitation of the server internal API.

> an XLAT no-op to see if the SQL server is responding.  If I'm missing
> something useful here, please let me know.  I'd love some feedback from
> the gurus.  Anyway, the config bits:

Your "noop" SQL test is a reasonable solution.

>
> I really wish there was a better way to do this...

It's hard. If you want to work on introducing a success/fail return 
value from xlat/paircompare handlers, it would go a long way to solving it.


More information about the Freeradius-Users mailing list