Issue #4522 has been updated by Jesse Wolfe. Status changed from Accepted to Available In Testing Branch Assigned to changed from Paul Berry to Jesse Wolfe Target version set to Statler % Done changed from 50 to 100 Branch set to http://github.com/reductivelabs/puppet/tree/next
Available in `next` as 16f701edd89a320ad73b5468d883dfb017fe6e96 ---------------------------------------- Bug #4522: Classes, defines, and nodes inside conditionals always take effect http://projects.puppetlabs.com/issues/4522 Author: Paul Berry Status: Available In Testing Branch Priority: Normal Assigned to: Jesse Wolfe Category: Target version: Statler Affected version: 2.6.1rc1 Keywords: Branch: http://github.com/reductivelabs/puppet/tree/next The following manifest: <pre> if true { class foo { notify {"truth": } } notify {"beauty": } } else { class foo { notify {"falsehood": } } notify {"ugliness": } } include foo </pre> Produces this output: <pre> notice: falsehood notice: //foo/Notify[falsehood]/message: defined 'message' as 'falsehood' notice: beauty notice: //Notify[beauty]/message: defined 'message' as 'beauty' notice: truth notice: //foo/Notify[truth]/message: defined 'message' as 'truth' </pre> (Note: the "beauty" and "ugliness" notify statements are to work around issue #4521) The "falsehood" message is unexpected, since it is declared inside a conditional that isn't being executed. Looking through the code, the problem appears to apply to classes, defines, and nodes. These three types of language constructs always take effect, regardless of where they appear in a source file. A possible fix would be to issue an error (or perhaps a warning) if the user tried to put a class, define, or node inside a conditional language construct. This behavior exists in both 2.6.x and 0.25.x. -- 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.
