Bug 986379
| Summary: | sss_cache -N/-n should invalidate the hash table in sssd_nss | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Najmuddin Chirammal <nc> |
| Component: | sssd | Assignee: | Jakub Hrozek <jhrozek> |
| Status: | CLOSED ERRATA | QA Contact: | Kaushik Banerjee <kbanerje> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.4 | CC: | dpal, grajaiya, jgalipea, lslebodn, mkosek, nkarandi, pbrezina, yjog |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | sssd-1.9.2-97.el6 | Doc Type: | Bug Fix |
| Doc Text: |
Cause: sss_cache -N did not invalidate SSSD in-memory cache of netgroups.
Consequence: Netgroups that were recently queried were not refreshed before their expiration time, even when sss_cache -N was executed.
Fix: sss_cache -N invalidates also SSSD netgroups in-memory cache.
Result: sss_cache -N invalidates all netgroups.
|
Story Points: | --- |
| Clone Of: | 896558 | Environment: | |
| Last Closed: | 2013-11-21 22:21:02 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 896558 | ||
| Bug Blocks: | |||
|
Description
Najmuddin Chirammal
2013-07-19 15:46:34 UTC
A little explanation on why some special casing is needed: For various reasons (speed, concurrent access, peculiarities of the netgroups GLIBC API), there is yet another caching layer in the NSS responder in a form of hash table. This hash table predates the fast memcache added in 6.4. Currently, all that sss_cache does is invalidate the cache on disk, but it doesn't invalidate entries in the hash table. That's the purpose of this fix. Fixed upstream. with sssd-1.9.2-127.el6.x86_64
[root@dhcp207-156 ~]# getent netgroup netgrp
netgrp (machine2.example.com, , example.com) (machine1.example.com, , example.com)
Removed netgroup from DS.
[root@dhcp207-156 ~]# sss_cache -N
[root@dhcp207-156 ~]# getent netgroup netgrp
netgrp
[root@dhcp207-156 ~]# echo $?
0
For non-existing netgroup.
[root@dhcp207-156 ~]# getent netgroup ttt
[root@dhcp207-156 ~]# echo $?
2
Niru, according to Pavel's investigation, you actually hit another bug planned for 6.6 during your testing. Pavel amended the test and it should pass now. Is it the case? Hi Jakub, Yup, after fixing the testcase its passing now. Thanks, Niru From beaker automation output : -------------------------------------------------------------------- adding new entry "cn=netgrp,ou=Netgroups,dc=example,dc=com" Stopping sssd: [ OK ] Starting sssd: [ OK ] [ OK ] netgrp :: [ PASS ] :: Running 'getent netgroup netgrp | grep netgrp' (Expected 0, got 0) ldap_initialize( ldap://kvm-guest-03.rhts.eng.bos.redhat.com ) deleting entry "cn=netgrp,ou=Netgroups,dc=example,dc=com" :: [ PASS ] :: Running 'getent netgroup netgrp' (Expected 2, got 2) ---------------------------------------------------------------------- Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1680.html |