#4177 background refresh task does not refresh updated netgroup entries
Closed: Fixed a year ago by pbrezina. Opened a year ago by thalman.

Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 8): Bug 1779486

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):

How reproducible:

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

2. cat /etc/sssd/sssd.conf
config_file_version = 2
services = nss, pam
domains = 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
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:

Metadata Update from @thalman:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1779486

a year ago

Metadata Update from @ppolawsk:
- Issue assigned to ppolawsk

a year ago
  • master
    • 704d9f1 - SYSDB: Cache selector as enum
    • b432b2c - LDAP: Netgroups refresh in background task

Metadata Update from @pbrezina:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

a year ago
  • sssd-1-16
    • d93b4fe - SYSDB: Cache selector as enum
    • 838db43 - LDAP: Netgroups refresh in background task

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/5132

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.