On Thu, Feb 27, 2014 at 05:15:00PM +0100, Pavel Reichl wrote:
On Thu, 2014-02-27 at 11:55 +0100, Pavel Březina wrote:
[snip]
> Nack.
> It is still possible having a netgroup expired if
> refresh_expired_interval is misconfigured (> entry_cache_timeout). Thus
> you still need to check if the netgroup is valid, maybe throw a visible
> warning if it is expired and periodic refresh is enabled.
>
[snip]
Reviving another stalled thread :-)
So how about checking that:
refresh_expired_intervat < entry_cache_timeout
Are you proposing to abort startup in this case? That sounds like a bit
too heavy solution..
when configuration is loaded?
I thing these values are never changed although they are not const.
Yeah, I'm not worried about these values changing at runtime.
In general I see the point of your patch in that the netgroups are only
ever refreshed by the periodical task and no refreshes are scheduled by
the nss frontend..
btw can we get into this situation where the refresh is on but a netgroup
is expired even without misconfiguration? For instance if a netgroup was
saved to the cache right before the backend was about to schedule the
periodic task, then before the next task the netgroup was requested and
already expired? Is it OK in this case to just return stale data and let
the next periodic update refresh the netgroup? I think so, because the
cache would eventually converge..