Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
- puppetlabs-acl module v 1.1.2 passes CI when using a puppet-agent build with embedded Ruby 2.3
- New unit tests added to Puppet to validate behavior
-
Agent
-
5
-
Agent 2017-06-14
-
Bug Fix
-
Values in reports that were earlier serialized using Ruby specific YAML tags are now serialized as hashes with a special key stating the data type - thus making them valid general YAML.
-
Automate
-
Does this cause test changes?
Description
As described in MODULES-4275, a provider may return arbitrary objects as the current value. This value is written (as YAML) in the corrective change file and in the report (if there is a change). The assumption has always been that the current value is primitive (string, integer, etc), but the ACL module returns Hash subclasses. Since we rely on to_yaml_properties for report serialization (see PUP-7381), Ruby 2.3 will serialize instance variables of our subclasses, which causes puppet to try to serialize the provider instance. This wasn't a problem previously, because Ruby 2.2 and below just serialize the hash key/value pairs. (The commit changing the Ruby behavior is https://github.com/ruby/ruby/commit/fe0414b5473b5332706126d2a017a9bf235c8146#diff-aed2624c7e8f254dd7356f2a32d8358fR471)
Puppet needs to be more defensive about how current values are handled. Presumably this could be done by always writing out the to_s version of the object.
Attachments
Issue Links
- is blocked by
-
PUP-5912 Implement a human friendly PCore serialization format
-
- Closed
-
- relates to
-
MODULES-5051 ACL 2.0 doesn't work with corrective change
-
- Ready for Engineering
-
-
MODULES-4275 ACL module - Failed to apply catalog: undefined method `split' for :windows:Symbol
-
- Resolved
-
-
PUP-6694 Fix various type system glitches, Puppet Data type should be limited to JSON types.
-
- Closed
-
-
PUP-7381 Consistently use encode_with for YAML serialization
-
- Closed
-