URL: https://github.com/SSSD/sssd/pull/807 Author: pbrezina Title: #807: sudo: do not update last usn value on rules refresh Action: opened
PR body: """ Refreshing specific rules may produce a higher usn value that the one that is already remembered if the rules changed on the server. However, there may be another rule that is not being refreshed which usn value is higher then the current value but lower then the value of some of the refreshed rules. If the highest usn value is updated in this case, the rule would not be found be smart refresh.
Thus we must not update the usn value during rules refresh.
Resolves: https://pagure.io/SSSD/sssd/issue/3996 """
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/807/head:pr807 git checkout pr807
URL: https://github.com/SSSD/sssd/pull/807 Title: #807: sudo: do not update last usn value on rules refresh
pbrezina commented: """ @alexey-tikhonov Could you review this please? """
See the full comment at https://github.com/SSSD/sssd/pull/807#issuecomment-522978505
URL: https://github.com/SSSD/sssd/pull/807 Title: #807: sudo: do not update last usn value on rules refresh
alexey-tikhonov commented: """ Hi @pbrezina,
However, there may be another rule that is not being refreshed which usn value is higher then the current value but lower then the value of some of the refreshed rules.
Is "which usn value is higher then the current value" part really important for described issue to occur?
Cache state: - R1: usn = 10 - R2: usn = xx
Updates on server: - R2: usn = 19 - R1: usn = 20
R1 being refreshed => last_usn = 20 and smart refresh misses update of R2:usn=19 doesn't matter if cached R2 had usn=9 or usn=11 (higher or not then the current value) Or do I miss anything?
Also, if I understand correctly, proposed patch makes smart refresh to fetch possibly already updated rules. Is it price paid for convenience? """
See the full comment at https://github.com/SSSD/sssd/pull/807#issuecomment-525850305
URL: https://github.com/SSSD/sssd/pull/807 Title: #807: sudo: do not update last usn value on rules refresh
pbrezina commented: """
Hi @pbrezina,
However, there may be another rule that is not being refreshed which usn value is higher then the current value but lower then the value of some of the refreshed rules.
Is "which usn value is higher then the current value" part really important for described issue to occur?
Let me rephrase it. A rule may exist in cache that has been updated on the server (thus having entryUSN greater than cached value) that will not be refreshed because last known USN may be already larger.
If entryUSN == cached USN, the rule has not been changed and we do not care. But you understood the problem just right.
Also, if I understand correctly, proposed patch makes smart refresh to fetch possibly already updated rules. Is it price paid for convenience?
Yes. There is no way to determine if there are any rules missing in the cache without this search and filtering out the rules that are known to be updated might end up in large filter that would just slow the query.
"""
See the full comment at https://github.com/SSSD/sssd/pull/807#issuecomment-526059748
URL: https://github.com/SSSD/sssd/pull/807 Title: #807: sudo: do not update last usn value on rules refresh
alexey-tikhonov commented: """ Thanks for explanations.
Verified manually with ipa provider. covscan is clean, CI passed.
ACK. """
See the full comment at https://github.com/SSSD/sssd/pull/807#issuecomment-526270505
URL: https://github.com/SSSD/sssd/pull/807 Title: #807: sudo: do not update last usn value on rules refresh
Label: +Accepted
URL: https://github.com/SSSD/sssd/pull/807 Title: #807: sudo: do not update last usn value on rules refresh
Label: +Ready to push
URL: https://github.com/SSSD/sssd/pull/807 Title: #807: sudo: do not update last usn value on rules refresh
pbrezina commented: """ * `master` * f9b589a47b0bacb1dcc4efd9b5d993c4b33b367f - sudo: do not update last usn value on rules refresh
"""
See the full comment at https://github.com/SSSD/sssd/pull/807#issuecomment-526555659
URL: https://github.com/SSSD/sssd/pull/807 Title: #807: sudo: do not update last usn value on rules refresh
Label: +Pushed
URL: https://github.com/SSSD/sssd/pull/807 Title: #807: sudo: do not update last usn value on rules refresh
Label: -Accepted
URL: https://github.com/SSSD/sssd/pull/807 Title: #807: sudo: do not update last usn value on rules refresh
Label: -Ready to push
URL: https://github.com/SSSD/sssd/pull/807 Author: pbrezina Title: #807: sudo: do not update last usn value on rules refresh Action: closed
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/807/head:pr807 git checkout pr807
sssd-devel@lists.fedorahosted.org