[SSSD] [PATCH] [PRELIMINARY] back end: periodic task API

Jakub Hrozek jhrozek at redhat.com
Wed May 15 11:54:59 UTC 2013


On Tue, May 14, 2013 at 02:50:56PM -0400, Pavel Brezina wrote:
> ----- Original Message -----
> > From: "Jakub Hrozek" <jhrozek at redhat.com>
> > To: sssd-devel at lists.fedorahosted.org
> > Sent: Tuesday, May 14, 2013 6:25:27 PM
> > Subject: Re: [SSSD] [PATCH] [PRELIMINARY] back end: periodic task API
> > 
> > On Fri, May 10, 2013 at 03:08:51PM +0200, Pavel Březina wrote:
> > > Here is the API implementing current design document.
> > > 
> > > https://fedorahosted.org/sssd/wiki/DesignDocs/PeriodicTasks
> > > 
> > > be_ptask.h is missing documentation of public interface. I'll amend the
> > > patch once the design document is fully acked.
> > > 
> > 
> > Sorry I got back to you after long delay. The design document looks good
> > to me, I only have one question: do you think there is value in having
> > separate enabled_delay and first_delay? Can we unify them?
> 
> Hi,
> the answer is yes. For example consider enumeration. When the system is fresh and no enumeration was done yet, we want to do it immediately to fill the cache (first_delay = 0), but keep enabled_delay say 10. But if SSSD is started and enumeration was already done at least once, we want to delay the first enumeration 10 seconds, so we don't prolong system startup. The same applies for sudo first full refresh.
> 
> The other question is whether we want to use the ability to disable the task with enumeration and sudo. The use case is to refresh the cache after we reconnect to LDAP server, but I'd leave the discussion for the future when we will convert the old timers for this API.

Ah, that's true. Thanks.

> 
> > 
> > Can you add some comments to the header file (copied from the design
> > page) ?
> > 
> 
> Sure, I just waited till the design page gets full ack.
> 
> > > I haven't tried it yet, I'll do that when implementing
> > > periodical refresh of expired records.
> 
> BTW It is fully tested and working. I think I made slight changes and fixed one or two bugs. The current version can be found in nss-periodic branch of my fedora people repo.
> 
> > 
> > > From 1be2a8113cc3bff5b8b142482732a1f898412d4e Mon Sep 17 00:00:00 2001
> > > From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina at redhat.com>
> > > Date: Fri, 26 Apr 2013 14:02:11 +0200
> > > Subject: [PATCH] back end: periodic task API
> > > 
> > 
> > The code looks good to me after first read, but can you use the same
> > file prefix as the rest of the generic interface files? (dp_ not be_).
> 
> Good question. Can I? :-)
> 
> The function namespace is be_* so it is correct to have the file also named be_. We may want to do the other change instead (dp -> be)? But I'll do it, if you insist.

I would prefer to have the file namespace consistent (even if I see your
point).

> 
> > > ---
> > >  Makefile.am              |   2 +
> > >  src/providers/be_ptask.c | 344
> > >  +++++++++++++++++++++++++++++++++++++++++++++++
> > >  src/providers/be_ptask.h |  67 +++++++++
> > >  src/util/util_errors.c   |   1 +
> > >  src/util/util_errors.h   |   1 +
> > >  5 files changed, 415 insertions(+)
> > >  create mode 100644 src/providers/be_ptask.c
> > >  create mode 100644 src/providers/be_ptask.h
> > _______________________________________________
> > sssd-devel mailing list
> > sssd-devel at lists.fedorahosted.org
> > https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
> > 
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/sssd-devel



More information about the sssd-devel mailing list