Jira (PUP-9345) Resource defaults are no longer evaluation-order independent
Title: Message Title Henrik Lindberg updated an issue Puppet / PUP-9345 Resource defaults are no longer evaluation-order independent Change By: Henrik Lindberg Component/s: DOCS Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-9345) Resource defaults are no longer evaluation-order independent
Title: Message Title Henrik Lindberg assigned an issue to Jean Bond Puppet / PUP-9345 Resource defaults are no longer evaluation-order independent Change By: Henrik Lindberg Assignee: Jean Bond Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-9345) Resource defaults are no longer evaluation-order independent
Title: Message Title Henrik Lindberg commented on PUP-9345 Re: Resource defaults are no longer evaluation-order independent This was a deliberate breaking change in Puppet 5.0.0 that apparently did not make it into documentation as it should. I am not 100% sure if there were changes in late 4.x series that caused order to be different - we were fixing issues and ran into conflicting requirements. The change was deliberate in Puppet 5 because of the conflicting requirements (impossible to meet at the same time) and the conclusion was that it was more valuable to support the other use cases instead of the faux declarative "the default can be set at any time". This started in PUP-25, and was fixed in PUP-7484 where some bugs were found. I am taking this to be a ticket to fix the documentation. Puppet will eagerly bind default values in effect at the time a resource _expression_ is evaluated (i.e in "evaluation order"). We are not going to change it back to how this worked before Puppet 5. Ping Jean Bond - the documentation should change to say something like: "Resource Defaults are evaluation order dependant as they are assigned to a created resource when a resource _expression_ is evaluated (declared for inclusion in the catalog). The default values in effect for the type at that point in time are used." Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to
Jira (PUP-9345) Resource defaults are no longer evaluation-order independent
Title: Message Title Steve Traylen commented on PUP-9345 Re: Resource defaults are no longer evaluation-order independent It's probably obvious but should have said: File{ mode => '0777', } file{'/tmp/junk.txt': ensure => file, content => "content\n", } with the default specified first works just fine. Add Comment
Jira (PUP-9345) Resource defaults are no longer evaluation-order independent
Title: Message Title Steve Traylen updated an issue Puppet / PUP-9345 Resource defaults are no longer evaluation-order independent Change By: Steve Traylen *Puppet Version: 6.0.4 *Puppet Server Version: n/a *OS Name/Version: CentOS 7.From the [docs|https://puppet.com/docs/puppet/5.5/lang_defaults.html#behavior]:Resource defaults are evaluation-order independent — that is, a default affects resource declarations written both above and below it.This is no longer the case since release 4.10.5.*Desired Behavior:*puppet apply the following manifest:{noformat}file{'/tmp/junk.txt': ensure => present, content => "junk\n",}File{ mode => '0777',}{noformat}This should result in a file with ownership mode '0777'.Running with puppet 4.9.4:{noformat}Notice: /Stage[main]/Main/File[/tmp/file.txt]/ensure: defined content as '{md5}477fbe8ae54fcb5effa415227ec05cb4'Notice: Applied catalog in 0.07 seconds-rwxrwxrwx. 1 straylen c3 13 Dec 6 20:36 /tmp/file.txt{noformat}*Actual Behavior:*Running with current HEAD 6.0.4+{noformat}rm /tmp/file.txt && bundle exec puppet apply ~/tmp/apply.pp && ls -l /tmp/file.txtNotice: Compiled catalog for aiadm83.cern.ch in environment production in 0.05 secondsNotice: /Stage[main]/Main/File[/tmp/file.txt]/ensure: defined content as '{md5}477fbe8ae54fcb5effa415227ec05cb4'Notice: Applied catalog in 0.32 seconds-rw-r--r--. 1 straylen c3 13 Dec 6 20:35 /tmp/file.txt{noformat}The file is not '0777' as the defaults were never applied.Running a git bisect the patch that introduced this behaviour is[https://github.com/puppetlabs/puppet/commit/38413cd78c61fe34d2ee343ef773a07b4786f65a]Note the same behaviour is observed in both a simple manifest like above or if global default parameters are attempted via the site.pp file. Add Comment
Jira (PUP-9345) Resource defaults are no longer evaluation-order independent
Title: Message Title Steve Traylen created an issue Puppet / PUP-9345 Resource defaults are no longer evaluation-order independent Issue Type: Bug Affects Versions: PUP 6.0.4 Assignee: Unassigned Components: Compiler Created: 2018/12/06 11:43 AM Priority: Normal Reporter: Steve Traylen *Puppet Version: 6.0.4 *Puppet Server Version: n/a *OS Name/Version: CentOS 7. From the docs: Resource defaults are evaluation-order independent — that is, a default affects resource declarations written both above and below it. This is no longer the case since release 4.10.5. Desired Behavior: puppet apply the following manifest: file{'/tmp/junk.txt': ensure => present, content => "junk\n", }