Issue #4534 has been updated by Jesse Wolfe. Status changed from Unreviewed to Accepted
---------------------------------------- Bug #4534: Class inheritance with parameterized classes is ignored http://projects.puppetlabs.com/issues/4534 Author: Thorsten Biel Status: Accepted Priority: Normal Assigned to: Category: parameterized classes Target version: Affected version: 2.6.1rc2 Keywords: Branch: I have the following classes: <pre> class tomcat { import "*.pp" create_if_no_such_file { "/etc/munin/plugin-conf.d/tomcat": content => "[tomcat*]" } } class tomcat::tomcat6 ( $java_home ) inherits tomcat { # install Tomcat RPM } </pre> and this definition: <pre> define setup_generic_tomcat { # do lots of other things file { "/etc/munin/plugins/${tc_version}_threads_${name}": require => [ Package[munin-node], Create_if_no_such_file[ "/etc/munin/plugin-conf.d/tomcat" ] ] ensure => "/usr/share/munin/plugins/${tc_version}_threads_", notify => Service[munin-node] } } </pre> which are used by this class: <pre> class myserver { # include the java6 class include java::java6 # include the tomcat module and tomcat6 class (installs Tomcat package) class { "tomcat::tomcat6": java_home => "${java::java6::javahome}"; } # set up a Tomcat instance setup_generic_tomcat { "test": } } </pre> When I try to run this, I get the following error: <pre> err: Could not run Puppet configuration client: Could not find dependency Create_if_no_such_file[/etc/munin/plugin-conf.d/tomcat] for File[/etc/munin/plugins/tomcat6_threads_test] at /etc/puppet/modules/tomcat/manifests/setup_generic_tomcat.pp:382 </pre> The error disappears when I remove the inheritance between tomcat::tomcat6 and tomcat, so that instead of <pre> class tomcat::tomcat6 ( $java_home ) inherits tomcat { } </pre> I have <pre> class tomcat::tomcat6 ( $java_home ) { include tomcat } </pre> To me it looks like the "tomcat" class is not properly inherited by the parameterized "tomcat::tomcat6" class. Inheritance in classes not using parameters works as usual. Is this just a parsing issue, or has inheritance been forfeited when classes use parameters? -- 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.
