On Mon, Jan 06, 2003 at 10:51:48AM -0500, Alan DeKok wrote:
> Andrew Pilley <[EMAIL PROTECTED]> wrote:
> > Hey. Just a quick question. if a radius+mysql server is unexpectedly
> > shut down (power failure or otherwise) without being given a chance to
> > quit, and there are active sessions, will freeradius clean out any
> > leftover sessions in the raddacct table?
> 
>   Uh, when?  If it dies when the power goes off, it doesn't have time
> to clean them out.  When the power comes back up, the server won't
> root through all of the accounting data, to "fix" it, as that is
> pointless.

Granted. I was more checking for unexpected behavior, like adding in
weird entries. It doesn't do that, that's okay.

> 
> > and what if only the radius+mysql server died, and the sessions were
> > still active?
> 
>   Sessions were?  On the NAS?

Yes, on the NAS, since the radius server can't really assume they're 
still active.

> 
>   If you're thinking that "active sessions" are stored in the SQL
> database, you're wrong.  The server gets information about active
> sessions from the NAS, and stores that information in the database.
> But the information amay be delayed seconds to minutes, and it may be
> wrong.

No, I assumed that. It was more along the lines of "will the radius
server 'deal' with a connection that closes after state loss at the
radius server's end". If rlm_sql just "works out" which entry to update
from the session id from the NAS, then that's fine, I just wanted to
know what it would do, given the two scenarios.

> 
>   You're better off thinking of the SQL database as a collection of
> "the most recent things the NAS told me about".  But it's NOT a "list
> of active sessions".

Fair enough. And I'll add some extra scripts to my startup stuff to
close off any entries that are basically useless for accounting (I don't
want my normal accounting software to be confusable because of power
issues.) If I want a complete log of what the NAS said, I'll use the
detail file, since that'll still contain the relevant data. The sql
database is more for accounting convenience. 

> 
> > I'm just looking into things i have to do on startup of the system to
> > possibly handle catastrophic failures and dealing with accounting
> > adequately. I'm using an ascend 4000max series access server.
> 
>   I don't understand what you're worried about.  If the power goes off
> to the server and/or the SQL database, then the collection of "things
> the NAS told it" is untouched.  If the power to the NAS goes off, then
> you can tell the old information in the database about a NAS port is
> no longer valid, when new information for that NAS port comes in.

I'm not worried. as I said, I was enquiring about unexpected behaviour
(like rlm_sql marking entries it considers "unfinishable" in some way,
due to state loss. since that's not going to happen, that's no problem).

Covering the unexpected is my job as a system administrator. I'd prefer
to not find out about it if I have another 3am extended power failure :)


Thanks for the answers,
Andrew Pilley

> 
>   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

Reply via email to