On Fri, 2012-10-26 at 18:33 +0200, Michal Židek wrote:
> On 10/24/2012 05:04 PM, Simo Sorce wrote:
> > In sssd_nss you also need to take a F_WRLCK on the first byte of the
> > file, however in sssd_nss case you want to retry a few times just in
> > case you races with sss_cache. I think retrying a couple of times
> > waiting a few milliseconds between each retry would be fine.
> >
> > Say 3 retries waiting 50ms between each.
> >
> 
> Ok. I used this for both old (to be unlinked) and new (created) memcache 
> files. But why is F_SETLKW not sufficient here (sssd_nss)? Are you 
> afraid of possible deadlock (it could happen if more sssd's were running 
> at the same time, like it happened recently because of a bug with 
> pidfile creation)? Or is there some other reason?

Yes and no.
We can't wait forever because the monitor would kill us after a while if
we do not respond to pings and then restart the sssd_nss process, which
would probably get stuck again, but the admin wouldn't know why that is
happening. It is better if the sssd_nss process fails fast with a clear
critical error message (old level 0) in the logs.

> NOTE: This patch applies on top of the recently posted patch in (see 
> thread: [SSSD] [PATCH] sss_cache: Multiple domains not handled properly)
> 
> I tested it and it worked well for me. Any comments appreciated.

Will comment on the patch soon.

Simo.


-- 
Simo Sorce * Red Hat, Inc * New York

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel

Reply via email to