Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
PUP 5.5.16, PUP 6.7.2
-
Night's Watch
-
1
-
NW - 2020-02-05, NW - 2020-02-19, NW - 2020-03-04, NW - 2020-03-17, NW - 2020-04-01
-
Needs Assessment
-
Enhancement
-
-
Needs Assessment
Description
The core user type has a custom retrieve() method which returns a Hash that is inconsistent with the data type returned by the common method in Puppet::Type.retrieve(). As a result, mechanisms expecting to use retrieve() will have problems with user resources.
Here is the offending code in the user type: https://github.com/puppetlabs/puppet/blob/master/lib/puppet/type/user.rb#L496-L513
I think it may be safe and desirable to just remove the user type's retrieve block and let the standard one take effect. The existing retrieve method seems to be 10+ years old and may just be an artifact of a much earlier time in Puppet's life.
Regardless if the method is needed or not, it should have a return value consistent with the expected return value from the standard Puppet::Type.retrieve() method.