The system is a Fedora 24 rawhide (cloud edition) running on Amazon EC2.
The issue shows up in SSSD 1.13.2 as well as SSSD 1.13.3, the attached log files were captured from SSSD 1.13.2.
To reproduce the issue:
dnf install openldap-servers openldap-clients
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif
ldapmodify -Y EXTERNAL -H ldapi:/// -f privilege.ldif (see attachment)
ldapadd -Y EXTERNAL -H ldapi:/// -f db.ldif (see attachment)
sssd -d 9 -f -c sssd.conf (see attachment)
Next, run the following commands repeatedly in random order:
Observe that SSSD is able to correctly respond to each command, in the first 10-12 minutes:
However, after 10-12 minutes, during which the system is completely idle, observe that SSSD begins to give incorrect response to those commands. In some occasions, user1 becomes member of both All1 and All2, and in some other occasions, user1 loses its auxiliary group memberships, and user3 becomes member of both All1 and All2:
(as shown in the attached log files).
What might be the issue? Thank you.
LDIF files, SSSD config, and log files config+logs.tgz
I'm sorry about the delay. Pavel agreed he'd take a look.
owner: somebody => pbrezina
Hi, could you attach /var/lib/sss/db/cache_$DOMAIN.ldb both before and after the malfunction please?
Also, I wonder if this can be caused by having some groups without gid defined. Can you try to add gidNumber to all groups and see if that helps?
SSSD 1.13.3, cache and log files after incorrect responses, with additional GIDs in LDAP DB 1.13.3-more-gid-bad-cache+log.tgz
SSSD 1.13.3, cache and log files after incorrect responses, with less GIDs in LDAP DB 1.13.3-orig-conf-bad-cache+log.tgz
SSSD 1.13.3, cache and log files after good responses, with less GIDs in LDAP DB 1.13.3-orig-gid-good-cache+log.tgz
LDAP DB with GIDs assigned to all groups db-with-more-gid.ldif
Hi Pavel, thanks for taking care of this.
It seems that SSSD 1.13.3 has reached rawhide, hence I upgraded SSSD and collected the cache files that you require.
In addition, I assigned GID numbers to all groupOfNames (excluding organisation units), however SSSD still makes incorrect responses after several minutes. See attachment 1.13.3-more-gid-bad-cache+log.tgz and db-with-more-gid.ldif.
Now I noticed that you have two groups sharing cn:
Unfortunately, given how SSSD is design both these groups are stored into one object in our cache (simply name=Staff,cn=groups,cn=ldapdom,cn=sysdb). Can you try renaming those groups to different name and see if the problem persist?
Hello Pavel.
I admit that the LDAP database setup is indeed unusual.
Take user1 for example. user1 is a member of cn=Staff under ou=Unit1. Although cn=Staff is not a posix group, but cn=Staff is a member of cn=All1, which is a posix group, hence user1 belongs to the posix group.
I thought cn=Staff,ou=Unit2 should be different from cn=Staff,ou=Unit1. Would SSSD be able to distinguish between the two?
Hi, no, SSSD is not able to distinguish between those two and the behaviour is actually undefined.
Hi Pavel.
OK, would you like to consider supporting this setup in a future release of SSSD?
No matter what, thank you very much for taking care of this bug report.
Did renaming the groups helped?
Please, file an RFE (request for enhancement) ticket here and we will see if and when we implement it. Also, patches are always welcomed :-)
Thank you very much, I can confirm that SSSD has no trouble giving correct responses to the commands when each Staff unit has unique CN.
Please feel free to close the ticket. I'll work on an RFE or maybe find time to work on a patch :P
I'm glad to hear that. Thank you.
resolution: => invalid status: new => closed
Metadata Update from @howardg: - Issue assigned to pbrezina - Issue set to the milestone: NEEDS_TRIAGE
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/3964
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.