• Janne Blomqvist's avatar
    Rework group caching to work better in environments with enumeration disabled. · 48a4cdf8
    Janne Blomqvist authored
    The initgroups()/getgrouplist() caching in slurmd is changed to not require enumeration, instead individual entries are cached when first needed. This cache is always enabled, thus the CacheGroups configuration setting has been removed. The time that each cache entry is considered valid is determined by the GroupUpdateTime configuration parameter. scontrol reconfig will purge the cache. The default value for the GroupUpdateForce configuration parameter has changed, as systems where /etc/group contains all the groups instead of some external system like NIS, LDAP are nowadays probably the exception rather than the rule.
    
    For slurmctld, the group cache still uses enumeration, but this is needed only to take care of special situations like multiple groups with the same GID. With enumeration disabled, group caching still works otherwise. validate_groups() does a little more optional work in order to handle the case where the user primary group is in the AllowGroups list, but getgrnam_r() does not return that user as a group member.
    
    bug 1629
    48a4cdf8
To find the state of this project's repository at the time of any of these versions, check out the tags.