Issue #17457 has been updated by Andrew Parker. Target version deleted (2.7.x)
As the 2.7.x line is winding down, I am removing the target at 2.7.x from tickets in the system. The 2.7 line should only receive fixes for major problems (crashes, for instance) or security problems. ---------------------------------------- Bug #17457: Date-like strings are munged during serialization, breaking puppet inspect runs https://projects.puppetlabs.com/issues/17457#change-80551 Author: Ken Johnson Status: Tests Insufficient Priority: Normal Assignee: David Gwilliam Category: zaml Target version: Affected Puppet version: Keywords: Branch: https://github.com/puppetlabs/puppet/pull/1281 So, we had a customer hit an issue with the way Puppet audit changes the date in catalogs. This seems to pop up specifically with user resources present which have the expiry parameter specified. When a node is affected Puppet inspect runs throw an error that looks like this: Error message from cron: Could not run: Parameter expiry failed: Expiry dates must be YYYY-MM-DD at /etc/puppetlabs/puppet/modules/env/manifests/somemanifest.pp:51 Lindsey was able to replicate this by following these steps: <pre> To reproduce, in a PE 2.6 environment: 1) Add the following resource to site.pp: user {'expirer': expiry => '2020-05-01', } 2) Run puppet apply -t 3) Run puppet inspect It looks like the expiry field is getting serialized in the cached catalog in a way that makes it unserialize back in to Ruby as not-a-string. This causes inspect, which uses the cached catalog, to trip up when validating the expiry: [3] pry(main)> '2020-05-10' !~ /^\d{4}-\d{2}-\d{2}$/ => false [4] pry(main)> 2020-05-10 !~ /^\d{4}-\d{2}-\d{2}$/ => true You can verify this is the case by editing the cached catalog and quoting the 'expiry' value (e.g. from `!ruby/sym expiry: 2020-05-01` to `!ruby/sym expiry: "2020-05-01"`. </pre> -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
