[SSSD] [PATCH] Exit offline mode only if server is available.

Michal Židek mzidek at redhat.com
Tue Jul 22 17:16:53 UTC 2014


On 07/09/2014 03:35 PM, Michal Židek wrote:
> On 07/07/2014 07:33 PM, Michal Židek wrote:
>> On 07/07/2014 03:09 PM, Michal Židek wrote:
>>> On 07/07/2014 03:01 PM, Jakub Hrozek wrote:
>>>> On Mon, Jul 07, 2014 at 02:11:52PM +0200, Michal Židek wrote:
>>>>> On 07/06/2014 06:44 PM, Simo Sorce wrote:
>>>>>> On Sun, 2014-07-06 at 12:42 -0400, Simo Sorce wrote:
>>>>>>> On Fri, 2014-07-04 at 12:34 +0200, Michal Židek wrote:
>>>>>>>> Hi Sumit,
>>>>>>>>
>>>>>>>> actually your suggestion was one of my first ideas, but
>>>>>>>> It looked like strange behaviour to me if the first
>>>>>>>> getent (or any request for data not present int the
>>>>>>>> cache) after offline_timeout period returned nothing
>>>>>>>> even if the server was already available and the second
>>>>>>>> (1 or 2 seconds after the first) returned proper data. I
>>>>>>>> thought this may be considered a bug for some people (even
>>>>>>>> if it is not a major regression :) ). The patch I sent
>>>>>>>> was then an improvement over this initial idea (from my POV).
>>>>>>>>
>>>>>>>> I understand your suggestion and concern, but I would
>>>>>>>> prefer to stick with the approach in the patch I sent.
>>>>>>>
>>>>>>> Can we at least use a backoff scheme where we increase timeout
>>>>>>> periods
>>>>>>> every time we try and find ourselves offline ?
>>>>>>>
>>>>>>> Try 1 minute, then 2, then 4, then 8, 16, 32, 64, 128 ...
>>>>>
>>>>> Good idea, but this might result in SSSD being too long
>>>>> offline for no good reason. Would it make sense
>>>>> to introduce a new config option for upper bound of
>>>>> this delay (like offline_timeout_max)? Without this option
>>>>> it would be difficult for me to accept this change. But
>>>>> I wonder what the default value should be... maybe 64?
>>>>
>>>> I would actually prefer to have a sane default..one hour with some
>>>> randomization to avoid "8AM flood" maybe.
>>>>
>>>>>
>>>>>>
>>>>>> It would also probably be a good idea to randomize a little the
>>>>>> delay,
>>>>>> otherwise we risk thundering herd situations.
>>>>>>
>>>>>> Simo.
>>>>>>
>>>>>
>>>>> Should the maximal value of the random offset be configurable?
>>>>
>>>> I would prefer to have neither the random offset nor the maximum cap
>>>> configurable, or have a undocumented option unless we know it makes
>>>> sense to let the admin configure the option.
>>>>
>>>> I'm afraid we have too many timeout options already and it's difficult
>>>> for admins to know them even without adding onother one..
>>>>
>>>
>>> That is true. I will hardcode the values then.
>>>
>>>>> Or is it not needed (I personally think it is not, but would like
>>>>> to hear other opinions as well)? I am also not sure what the
>>>>> default value should be (I was thinking 30 seconds).
>>>>>
>>>>> Will send new patches soon, thanks for suggestions.
>>>>>
>>>>> Michal
>>>>
>>
>> Here are the new patches. The hardcoded values are
>> 30 seconds for the maximum random offset
>> 3600 seconds for the maximum backoff delay
>>
>> Michal
>>
>
> Btw. I intentionally did not send the patches for 1.11.
> I will send them after the patches for master are
> accepted.
>
> Thanks,
> Michal
>

I had a typo in one of the comments. Sending new patches.

Michal

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ptask-Allow-adding-random_offset-to-scheduled-execut.patch
Type: text/x-patch
Size: 6703 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20140722/5f18a914/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ptask-Add-backoff-feature-to-the-ptask-api.patch
Type: text/x-patch
Size: 2735 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20140722/5f18a914/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Exit-offline-mode-only-if-server-is-available.patch
Type: text/x-patch
Size: 5030 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20140722/5f18a914/attachment-0002.bin>


More information about the sssd-devel mailing list