Issue #20445 has been updated by Tristan Helmich. Category set to functions
---------------------------------------- Bug #20445: Inconsistent "defined()" behavior with nested defined types https://projects.puppetlabs.com/issues/20445#change-94498 * Author: Sean Millichamp * Status: Unreviewed * Priority: Normal * Assignee: Charlie Sharpsteen * Category: functions * Target version: * Affected Puppet version: 2.7.21 * Keywords: defined type, customer * Branch: ---------------------------------------- I believe the easiest way to explain this problem is with sample code demonstrating the bug. I've done some digging in the underlying Ruby and looks like a bug in the "findresource()" function (which the "defined" parser function calls) but it wasn't immediately obvious to me exactly what that might be. Here is the Puppet code which will demonstrate the issue: <pre> define mydef::one { notify { "notify_${title}": message => "my notify is ${title}" } } define mydef::two { mydef::one { $title: } } mydef::one { 'asdf': } mydef::two { 'hjkl': } if defined(Mydef::One['asdf']) { notify { 'Mydef::One["asdf"] returns defined': } } if defined(Mydef::Two['hjkl']) { notify { 'Mydef::Two["hjkl"] returns defined': } } if defined(Mydef::One['hjkl']) { notify { 'Mydef::One["hjkl"] returns defined': } } else { notify { 'Mydef::One["hjkl"] does not return defined even though I can reference it': loglevel => err, require => Mydef::One['hjkl'], } } </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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
