Frederik Wagner
2010-Aug-20 14:00 UTC
[Puppet Users] error from Puppet::Parser::Files.find_template in self defined function
Hi group, today I updated puppet from 0.25.5 to 2.6.0 and I''m running into a problem of a self defined function taken from <http://pastie.org/666728>. It''s the multi_source_template function which takes the first available template from the argument as the one to be processed. This function was running well until version 0.25.5 but now with 2.6.0 I get the error message: "err: undefined method `to_sym'' for #<Puppet::Node::Environment:0x7f9921291140> at /etc/puppet/modules/network-1/manifests/init.pp:66 on node XYZ.mydomain.de" This error is triggered by the function call of "Puppet::Parser::Files.find_template(file, environment)". Can you help me with this problem, since upgrading to 2.6.0 would be very nice :-) Thanks a lot, Frederik -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Brice Figureau
2010-Aug-20 14:23 UTC
Re: [Puppet Users] error from Puppet::Parser::Files.find_template in self defined function
On Fri, 2010-08-20 at 16:00 +0200, Frederik Wagner wrote:> Hi group, > > today I updated puppet from 0.25.5 to 2.6.0 and I''m running into a > problem of a self defined function taken from > <http://pastie.org/666728>. It''s the multi_source_template function > which takes the first available template from the argument as the one > to be processed. > This function was running well until version 0.25.5 but now with 2.6.0 > I get the error message: > "err: undefined method `to_sym'' for > #<Puppet::Node::Environment:0x7f9921291140> at > /etc/puppet/modules/network-1/manifests/init.pp:66 on node > XYZ.mydomain.de" > > This error is triggered by the function call of > "Puppet::Parser::Files.find_template(file, environment)". > Can you help me with this problem, since upgrading to 2.6.0 would be > very nice :-)Rewrite "Puppet::Parser::Files.find_template(file, environment)" to: Puppet::Parser::Files.find_template(file, environment.to_s) You should better run 2.6.1rc2 than 2.6.0 as some serious bugs have been fixed in this version. -- Brice Figureau Follow the latest Puppet Community evolutions on www.planetpuppet.org! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Frederik Wagner
2010-Aug-20 15:00 UTC
Re: [Puppet Users] error from Puppet::Parser::Files.find_template in self defined function
On Fri, Aug 20, 2010 at 4:23 PM, Brice Figureau <brice-puppet@daysofwonder.com> wrote:> On Fri, 2010-08-20 at 16:00 +0200, Frederik Wagner wrote: >> Hi group, >> >> today I updated puppet from 0.25.5 to 2.6.0 and I''m running into a >> problem of a self defined function taken from >> <http://pastie.org/666728>. It''s the multi_source_template function >> which takes the first available template from the argument as the one >> to be processed. >> This function was running well until version 0.25.5 but now with 2.6.0 >> I get the error message: >> "err: undefined method `to_sym'' for >> #<Puppet::Node::Environment:0x7f9921291140> at >> /etc/puppet/modules/network-1/manifests/init.pp:66 on node >> XYZ.mydomain.de" >> >> This error is triggered by the function call of >> "Puppet::Parser::Files.find_template(file, environment)". >> Can you help me with this problem, since upgrading to 2.6.0 would be >> very nice :-) > > Rewrite "Puppet::Parser::Files.find_template(file, environment)" to: > > Puppet::Parser::Files.find_template(file, environment.to_s)thanks so far. The initial error is fine, but now none of the templates are found: ... debug: Looking for Network-1/etc/hosts/service.basenode.erb in production debug: Looking for Network-1/etc/hosts/default.erb in production err: multi_source_template: No match found for files: Network-1/etc/hosts/service.basenode.erb, Network-1/etc/hosts/default.erb at /etc/puppet/modules/network-1/manifests/init.pp:52 on node lx64a147.cos.lrz-muenchen.de err: multi_source_template: No match found for files: Network-1/etc/hosts/service.basenode.erb, Network-1/etc/hosts/default.erb at /etc/puppet/modules/network-1/manifests/init.pp:52 on node lx64a147.cos.lrz-muenchen.de ... the second file "Network-1/etc/hosts/default.erb" exists.... Strange...> You should better run 2.6.1rc2 than 2.6.0 as some serious bugs have been > fixed in this version.o.k., just upgraded...> -- > Brice Figureau > Follow the latest Puppet Community evolutions on www.planetpuppet.org! > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.