[SSSD] [PATCH] Add offline callback and fix info file handling

Stephen Gallagher stephen at gallagherhome.com
Mon May 17 11:55:47 UTC 2010


I don't think it makes sense to do it in be_mark_offline. I'd prefer
that for other servers like LDAP we'd maintain affinity for the server
we currently know works.

But I might be convinced. What are everyone else's thoughts?

On May 17, 2010, at 7:38 AM, Sumit Bose <sbose at redhat.com> wrote:

> On Fri, May 14, 2010 at 04:10:22PM -0400, Stephen Gallagher wrote:
>> On 05/14/2010 03:11 PM, Sumit Bose wrote:
>>> On Fri, May 14, 2010 at 08:58:39PM +0200, Sumit Bose wrote:
>>>> On Fri, May 14, 2010 at 11:55:01AM -0400, Stephen Gallagher wrote:
>>>>> On 05/14/2010 08:29 AM, Sumit Bose wrote:
>>>>>> Hi,
>>>>>>
>>>>>> this series of patches aims to fix the handling of the info
>>>>>> file for the
>>>>>> locator plugin to allow a graceful fallback to the
>>>>>> configuration from
>>>>>> krb5.conf is the sssd backend is offline.
>>>>>>
>>>>>> 0001-Revert-Create-kdcinfo-and-kpasswdinfo-file-at-startu.patch:
>>>>>>       Remove the old commit
>>>>>>
>>>>>
>>>>> Ack.
>>>>>
>>>>>> 0002-Refactor-data-provider-callbacks.patch
>>>>>>       Remove references to 'online' from the main callback
>>>>>> code, move
>>>>>>       callback code to a separate file to make life easier for
>>>>>> potential
>>>>>>       unit test.
>>>>>>
>>>>>
>>>>> Ack.
>>>>>
>>>>>> 0003-Add-offline-callbacks.patch
>>>>>>
>>>>>
>>>>> Nack. Please condense be_run_offline_cb() and be_run_online_cb()
>>>>> into a
>>>>> single function. They are nearly identical already.
>>>
>>> There was an error in the new function. Ne versions attached.
>>>
>>> bye.
>>> Sumit
>>>
>>>>
>>>> ok, I've put the common code into a new function. Most of the
>>>> changes
>>>> are in 0002.
>>>>
>>>>>
>>>>>> 0004-Refactor-krb5_finalize.patch
>>>>>>       Create a new subroutine which only unlinks the files.
>>>>>>
>>>>>
>>>>> Ack.
>>>>>
>>>>>> 0005-Add-callback-to-remove-krb5-info-files-when-going-of.patch
>>>>>>
>>>>>
>>>>> Nack.
>>>>> Nitpick: you added an extra "ret = EOK" into ipa_service_init()
>>>>
>>>> done
>>>>
>>>> New versions attached.
>>>>
>>>> bye,
>>>> Sumit
>>>>
>>
>>
>> Nack.
>>
>> The following two conditions don't work (tested using IPA):
>>
>> 1) Shutting down the SSSD with 'service sssd stop' (i.e. sending
>> SIGTERM) does not remove kdcinfo files.
>>
>
> ah, sorry, I didn't realize that the IPA provider did not handle
> SIGTERM. The new patches
>
> 0008-Refactor-krb5-SIGTERM-handler-installation.patch and
> 0009-Add-krb5-SIGTERM-handler-to-ipa-auth-provider.patch
>
> will handle this.
>
>> 2) When starting up online, the kdcinfo file is generated correctly
>> on
>> the first request. It is removed properly when going offline (I
>> turned
>> off the dirsrv on the ipa server). However, when coming back
>> online, the
>> kdcinfo file is not regenerated.
>>
>
> Good catch. The files are written by the failover callback, which are
> only called if a new server (not the one previously used) was resolved
> succesfully. This means the offline callback has to delete the
> reference
> to the last used server and to reset the status of all failover
> servers.
> The new patch
>
> 0003-Add-fo_service_reset.patch
>
> add the necessary failover calls and the modified patch
>
> 0006-Add-callback-to-remove-krb5-info-files-when-going-of.patch
>
> calls them.
>
> Currently I reset all servers of all services the backend knows about
> because the backend goes offline and I think it makes sense to resolve
> all servers again when the backend becomes only again. Maybe it makes
> sense to do this in be_mark_offline(), too? If yes, then it can be
> removed from the callback.
>
> New versions attached.
>
> bye,
> Sumit
>
>> --
>> Stephen Gallagher
>> RHCE 804006346421761
>>
>> Delivering value year after year.
>> Red Hat ranks #1 in value among software vendors.
>> http://www.redhat.com/promo/vendor/
>> _______________________________________________
>> sssd-devel mailing list
>> sssd-devel at lists.fedorahosted.org
>> https://fedorahosted.org/mailman/listinfo/sssd-devel
> <0001-Revert-Create-kdcinfo-and-kpasswdinfo-file-at-startu.patch>
> <0002-Refactor-data-provider-callbacks.patch>
> <0003-Add-fo_service_reset.patch>
> <0004-Add-offline-callbacks.patch>
> <0005-Refactor-krb5_finalize.patch>
> <0006-Add-callback-to-remove-krb5-info-files-when-going-of.patch>
> <0007-Krb5-locator-plugin-returns-KRB5_PLUGIN_NO_HANDLE.patch>
> <0008-Refactor-krb5-SIGTERM-handler-installation.patch>
> <0009-Add-krb5-SIGTERM-handler-to-ipa-auth-provider.patch>
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/sssd-devel



More information about the sssd-devel mailing list