URL:
https://github.com/SSSD/sssd/pull/5539
Title: #5539: NSS: Clear negative cache when SIGHUP received
elkoniu commented:
"""
Thanks for the updates. This version definitely looks better and
should do what is functionally required.
What feels a little bit loose: patch relies on the order of method invocations in the
monitor to assure sss_cache is blocked until all operations are done. But I think proper
resolution should include decoupling of log rotation and cache reset, and since you said
you wouldn't like to do this within this PR, then proper comment would be enough.
I am almost sure that negative cache can be cleared without any blocker, also I did not
wanted to add another file blocker.
Existing blocker is part of legacy code. I would like to open separated PR to remove it,
split log rotate and cache cleaning and then handle whole thing using DBUS command send
from sss_cache directly, rather than sending SIGHUP to monitor.
I will add a comment in the code that I am sort-of reusing existing file blocker for new
function "just in case".
As a more important note:
* instead of addition of a new method in "sssd.service" interface you could
check if it’s possible to reuse existing methods of
"sssd.Responder.NegativeCache"
* while not strictly necessary to be done within this PR, imo it also makes sense to
do the same with clearMemcache() method - either move it to “sssd.nss.MemoryCache” or just
get rid of it and reuse existing InvalidateAll*() (but the latter would require
verification that it does the same)
I decided to add a new method to the code to be more consistent with existing
implementation. If it is possible I would like to move DBUS methods refactoring to
separated PR. Pavel mentioned [1] that there is a plan to get rid of monitor in favor of
systemd. I guess DBUS methods refactoring will be part of it too.
[1]
https://github.com/SSSD/sssd/pull/5552#issuecomment-814906355
"""
See the full comment at
https://github.com/SSSD/sssd/pull/5539#issuecomment-815370299