puppetlabs/puppet — pull request #1291 by TrevorPH (2012-11-27 02:05:10+00:00)
Title: (#7580) Fix for unnecessary ldap updates described in issue 7580

Without this patch applied, every time puppet runs it will detect
a change in the gidNumber of every user defined with provider => ldap
and will update the LDAP directory server even though no change is
required. If puppet runs every 30 minutes, that's 48 updates per
user per system per day - my farm is small and has 60 servers so
I'm seeing around 3000 updates per day that do not need to be made.
These changes then replicate around my multi-master LDAP servers
causing even more unnecessary updates. Multiply this by the number
of users that are defined in puppet with a gid ...

The change is occurring because the gidNumber field as pulled from
LDAP is a String but the puppet variable is a Fixnum. This means
that comparisons of the two always fail so the update is always
performed. This may not be the best way to fix it but this change
converts the gid field to a Fixnum as it's pulled from the LDAP
directory server.