[SSSD] [PATCH] nss: Add option to disable memcache

Michal Židek mzidek at redhat.com
Thu Sep 12 18:06:26 UTC 2013


On 09/12/2013 05:48 PM, Simo Sorce wrote:
> On Thu, 2013-09-12 at 11:23 +0200, Jakub Hrozek wrote:
>> On Wed, Sep 11, 2013 at 05:54:01PM -0400, Simo Sorce wrote:
>>> On Wed, 2013-09-11 at 20:19 +0200, Michal Židek wrote:
>>>> Hello,
>>>>
>>>> I would like to have this option in SSSD for debugging purposes. It is
>>>> not documented, so it should be invisible for users (but I can add it to
>>>> man pages as well, if someone thinks it is useful to have it there).
>>>
>>> This would cause you to have stale mmap cache files on the system,
>>> wouldn't it make more sense to have an environment variable for the
>>> client libraries instead and have them ignore the mmap cache when you
>>> want to test something ?
>>
>> This sounds like a good idea.
>>
>>> It could also be documented as it may be a useful workaround should a
>>> user find a bug that hits the mmap_cache and wants a temporary way to
>>> avoid it even if with performance penalty for a specific application.
>>>
>>> Something like SSS_NSS_USE_MEMCACHE=yes/no
>>>
>>> defaulting to yes, if no env var is found.

Just found out that we have a check for _SSS_MC_SPECIAL in function 
sss_nss_mc_get_ctx. It makes the function fail returning the EPERM 
errno. I do not know what was the purpose of this variable, but it is 
exactly what we need.

Maybe we should just rename this variable, because it is not cleat from 
first glance, what it really does (see attached patch).

>>
>> If I can speak for Michal -- we discussed that it might be nice to be able
>> to temporarily disable the memcache somehow, but if there was a documented
>> way, hitting memcache problems would simply disable it and don't even
>> report a bug. Kind of like users switching SELinux to Permissive.
>
> Their choice.
> I think it is more valuable to have the option than not for fear of
> people not reporting bugs.
>

Ok. I added the man page change in the second patch.

> Simo.
>

Patches are attached.

Thanks
Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Rename-_SSS_MC_SPECIAL.patch
Type: text/x-patch
Size: 1028 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130912/111c652a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-man-sssd-Add-note-about-SSS_NSS_USE_MEMCACHE.patch
Type: text/x-patch
Size: 865 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20130912/111c652a/attachment-0001.bin>


More information about the sssd-devel mailing list