On 04/01/2014 01:12 PM, Chris Adams wrote:
Once upon a time, Simon Hobson <[email protected]> said:
I'm just wondering if there's a race condition where multiple servers are
updating the quota, and one update overrides another ?
I was wondering about that, but I think I have found my problem. One of
my policyd VMs had a clock that was about 3 seconds ahead of the other
VMs (that host's NTP peers had all gone away and it had drifted). It
looked in my logs like if that VM got a Quota update, and then another
VM got a Quota update within 2 seconds, the other VM set the quota back
to 1.
In the version these servers are running (2.0.10), if $elapsedTime is
negative, the counter is reset to 0. Newer versions have the same
comments, but a negative $elapsedTime is set to 0 (which does not reset
the counter).
Since I fixed the clock, I don't see any resets in my log (all the
"quota=1/..." messages in the log look legit).
BINGO!!! That could cause it. Different clocks on different servers
could cause the counter to be reduced instead of increased as it takes
the timestamp into account.
I wonder if there is a sane way I can build in a fix for this? maybe a
warning in the log noting clock skew?
-N
_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users_lists.policyd.org