Best Practices - maximum NAS entries in clients.conf

Phil Mayers p.mayers at imperial.ac.uk
Tue Sep 13 12:04:19 CEST 2011


On 13/09/11 10:57, Phil Mayers wrote:
> On 13/09/11 08:59, Fajar A. Nugraha wrote:
>
>>
>> That's what we currently do (for another purpose, not for dynamic
>> client). However:
>> - I lost load-balancing feature that comes with redundant-load-balance
>> - imagine having to create 8 if-elsif block to properly catch error
>> when working with 8 sql nodes, and write the same sql query 8 times in
>> the configuration file. Works, but kinda messy.
>>
>> With current sql module (that only reads nas list from sql during
>> startup/HUP) I can use one sql/mysql/*.conf to specify the query, and
>> have each sql instance $INCLUDE it. If we can do similar thing with
>> "%{sql:" expansion (e.g. store the query in some temporary internal
>> variable/attribute) it'd be reduce the measiness greatly, but I
>> haven't found out how to do it yet.
>
> You can't. It's not currently possible, and would require changes to the
> source code.

Wait, I think I've misunderstood you.

Do you mean something like this?

update control {
   SQL-Query := "select * from foo where bar=1"
}
sql_redundant_xlat
# output now in control:Tmp-String-0

...then in policy.conf:

policy {
   sql_redundant_xlat {
     update control {
       Tmp-String-0 := "%{sql1:%{control:SQL-Query}}"
     }
     if (control:Tmp-String-0 == "") {
       update control {
         Tmp-String-0 := "%{sql2:%{control:SQL-Query}}"
       }
     }
   }
}



More information about the Freeradius-Users mailing list