Bug 1779486 - background refresh task does not refresh updated netgroup entries
Summary: background refresh task does not refresh updated netgroup entries
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sssd
Version: 8.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: Paweł Poławski
QA Contact: sssd-qe
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks: 1822461
TreeView+ depends on / blocked
 
Reported: 2019-12-04 04:11 UTC by Niranjan Mallapadi Raghavender
Modified: 2021-11-19 17:18 UTC (History)
10 users (show)

Fixed In Version: sssd-2.3.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1822461 (view as bug list)
Environment:
Last Closed: 2020-11-04 02:04:28 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)
sssd domain logs. (263.71 KB, text/plain)
2019-12-04 04:29 UTC, Niranjan Mallapadi Raghavender
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 5132 0 None closed background refresh task does not refresh updated netgroup entries 2020-09-11 09:43:09 UTC
Red Hat Product Errata RHBA-2020:4569 0 None None None 2020-11-04 02:04:48 UTC

Description Niranjan Mallapadi Raghavender 2019-12-04 04:11:48 UTC
Description of problem:
background refresh task does not refresh updated netgroup entries. When refresh_expired_interval is specified in sssd.conf and netgroup entries are updated in ldap server. the refresh task doesn't update fetch the latest netgroup entries. 


Version-Release number of selected component (if applicable):

sssd-2.2.0-19.el8.x86_64
How reproducible:



Steps to Reproduce:
1. Install sssd-2.2.0-19.el8.x86_64 

2. cat /etc/sssd/sssd.conf
[sssd]
config_file_version = 2
services = nss, pam
domains = example1

[domain/example1]
ldap_search_base = dc=example,dc=test
id_provider = ldap
auth_provider = ldap
ldap_user_home_directory = /home/%u
ldap_uri = ldaps://idm-qe-01.lab.eng.rdu2.redhat.com
ldap_tls_cacert = /etc/openldap/cacerts/cacert.pem
use_fully_qualified_names = True
debug_level = 9
entry_cache_timeout=30
refresh_expired_interval=22
debug_level = 0xfff0

2. Setup ldap server with netgroup entries. as shown below:

dn: cn=netgroup_1137010,ou=Netgroups,dc=example,dc=test
objectClass: top
objectClass: nisNetgroup
cn: netgroup_1137010
nisNetgroupTriple: (host1,user1,example1.com)

3. Run getent netgroup netgroup_1137010

[root@idm-qe-01 db]# getent netgroup netgroup_1137010
netgroup_1137010      (host1,user1,example1.com)


4. Modify netgroup entry 
dn: cn=netgroup_1137010,ou=Netgroups,dc=example,dc=test
changetype: modify
replace: nisNetgroupTriple
nisNetgroupTriple: (host1137011,user1137011,example.com)

[root@idm-qe-01 db]# ldapmodify -x  -D "cn=Directory Manager" -w Secret123 -h localhost -f /tmp/net2.ldif
modifying entry "cn=netgroup_1137010,ou=Netgroups,dc=example,dc=test"

5. After 22 seconds the netgroup entry should be updated in sssd cache. 

<snip from sssd_example1.log>

(Tue Dec  3 23:08:00 2019) [sssd[be[example1]]] [be_refresh_step] (0x0400): Refreshing 0 netgroups in domain example1
(Tue Dec  3 23:08:00 2019) [sssd[be[example1]]] [be_refresh_batch_step] (0x0200): The batch is done
(Tue Dec  3 23:08:00 2019) [sssd[be[example1]]] [be_ptask_done] (0x0400): Task [Refresh Records]: finished successfully
(Tue Dec  3 23:08:00 2019) [sssd[be[example1]]] [be_ptask_schedule] (0x0400): Task [Refresh Records]: scheduling task 22 seconds from now [1575432502]

6. Run ldbsearch to check the cache. 


# record 7
dn: name=netgroup_1137010,cn=Netgroups,cn=example1,cn=sysdb
createTimestamp: 1575432366
name: netgroup_1137010
objectClass: netgroup
originalDN: cn=netgroup_1137010,ou=Netgroups,dc=example,dc=test
originalModifyTimestamp: 20191204040527Z
netgroupTriple: (host1,user1,example1.com)
lastUpdate: 1575432366
dataExpireTimestamp: 1575432396
distinguishedName: name=netgroup_1137010,cn=Netgroups,cn=example1,cn=sysdb



Actual results:

Netgroup entries are not fetch the updated netgroup entries from server and update the cache. 


Expected results:

netgroup entries should fetch updated netgroup entries from server and update the cache. 


Additional info:

Comment 2 Niranjan Mallapadi Raghavender 2019-12-04 04:29:29 UTC
Created attachment 1641876 [details]
sssd domain logs.

Comment 13 Paweł Poławski 2020-03-31 12:58:10 UTC
Upstream ticket:
https://pagure.io/SSSD/sssd/issue/4177

Comment 15 Pavel Březina 2020-04-01 09:16:06 UTC
* `master`
    * 704d9f1d3dbae078f7fdcc310324a08770f3feef - SYSDB: Cache selector as enum
    * b432b2c4c8039db0130494a83294bee950ebaa6a - LDAP: Netgroups refresh in background task

Comment 21 errata-xmlrpc 2020-11-04 02:04:28 UTC
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 (sssd bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4569


Note You need to log in before you can comment on or make changes to this bug.