On Fri, Jan 7, 2011 at 3:26 AM, R.I.Pienaar <[email protected]> wrote: [snip]
> Then I am doubly perplexed. It's not a surprise that the feature isn't > adequate perhaps even mistake has been made. > > Being that it is not done or fixed in stone you're almost guaranteed > that its behavior, implications, perhaps even the syntax will change in > future > versions. And not just superficially either, its far from workable. > I've switched to writing modules entirely using 2.6.x syntax and parametrized classes. While many aspects could certainly be improved, I've found them to be workable from a module author perspective. Does it serve the users that we are recommending they use such a feature? > I think the net gain is worth recommending parametrized classes. The net gain I see is that it helps new and veteran Puppet users flatten their nested scopes and avoid unintended side effects which arise from variables referenced but not defined in the local scope and resource defaults. In the example you posted previously, what scope does class apache exist in? You included the class twice, once in the top scope and once inside of class apache::php. The class is only included once so it's either top or inside of apache::php. It's unclear reading the code what the resulting scope and behavior of the apache class will end up as. Do we not almost guarantee costly from a time and effort and risk basis > that using this feature will result in a very difficult migration to a > future > version of puppet? > I don't think we guarantee a difficult migration if we recommend switching to parametrized classes. On the contrary, I think we all agree we _must_ address the scoping issue at some point. I've previously [1] recommended we change the behavior of include to always add classes at top scope, but didn't get much positive feedback from this idea. If we must address the scoping issue, there is a significant chance the migration to the fix will require non-zero effort. My educated guess is that migrations will be far easier if the code base is already using class parameters and you have a guarantee multiple inclusions aren't happening in the puppet manifests. [1] http://groups.google.com/group/puppet-users/browse_thread/thread/cabf600aff9fe19b Cheers, -- Jeff McCune http://www.puppetlabs.com/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" 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-users?hl=en.
