i''ve inherited a system managed by Puppet and have upgraded puppet from 0.24.4 to 2.6.4. I upgraded facter as well; in both instances i used the latest versions. There are a few issue, the most major of which atm seems to be this: undefined method `function_file'' for #<Puppet::Parser::Scope: 0x7f7b32ee3540> NOne of the files have been altered. Anyone have any ideas? Thanks Martin -- 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.
Sorted; had old rb files in /usr/lib/ruby/1.8/puppet.New files were in /usr/local/lib/site_ruby/1.8/puppet. renamed first to something else and bingo it works. On Dec 16, 1:43 pm, boddiesdrinker <martin.s...@gmail.com> wrote:> i''ve inherited a system managed by Puppet and have upgraded puppet > from 0.24.4 to 2.6.4. I upgraded facter as well; in both instances i > used the latest versions. > > There are a few issue, the most major of which atm seems to be this: > > undefined method `function_file'' for #<Puppet::Parser::Scope: > 0x7f7b32ee3540> > > NOne of the files have been altered. > > Anyone have any ideas? > > Thanks > Martin-- 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.
Spoke too soon. If i run puppetd like this: sudo puppetd --test --noop -v i get the error: err: Failed to parse template postfix/relayhost.erb: undefined method `function_file'' for #<Puppet::Parser::Scope:0x7fc135e5b0e8> at /etc/ puppet/testing/modules/postfix/manifests/init.pp:114 on node ip-10-250-14-118.ec2.internal Help. Thanks again Martin On Dec 16, 3:25 pm, boddiesdrinker <martin.s...@gmail.com> wrote:> Sorted; had old rb files in /usr/lib/ruby/1.8/puppet.New files were > in /usr/local/lib/site_ruby/1.8/puppet. > renamed first to something else and bingo it works. > > On Dec 16, 1:43 pm, boddiesdrinker <martin.s...@gmail.com> wrote: > > > > > > > > > i''ve inherited a system managed by Puppet and have upgraded puppet > > from 0.24.4 to 2.6.4. I upgraded facter as well; in both instances i > > used the latest versions. > > > There are a few issue, the most major of which atm seems to be this: > > > undefined method `function_file'' for #<Puppet::Parser::Scope: > > 0x7f7b32ee3540> > > > NOne of the files have been altered. > > > Anyone have any ideas? > > > Thanks > > Martin-- 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.
The template file has this code: relay = scope.function_file(["/etc/puppet/secrets/smtp/" + name + "/ relay"]).chomp Could it be the form of the file function which has changed? On Dec 16, 3:45 pm, boddiesdrinker <martin.s...@gmail.com> wrote:> Spoke too soon. > > If i run puppetd like this: > > sudo puppetd --test --noop -v > > i get the error: > > err: Failed to parse template postfix/relayhost.erb: undefined method > `function_file'' for #<Puppet::Parser::Scope:0x7fc135e5b0e8> at /etc/ > puppet/testing/modules/postfix/manifests/init.pp:114 on node > ip-10-250-14-118.ec2.internal > > Help. > > Thanks again > > Martin > > On Dec 16, 3:25 pm, boddiesdrinker <martin.s...@gmail.com> wrote: > > > > > > > > > Sorted; had old rb files in /usr/lib/ruby/1.8/puppet.New files were > > in /usr/local/lib/site_ruby/1.8/puppet. > > renamed first to something else and bingo it works. > > > On Dec 16, 1:43 pm, boddiesdrinker <martin.s...@gmail.com> wrote: > > > > i''ve inherited a system managed by Puppet and have upgraded puppet > > > from 0.24.4 to 2.6.4. I upgraded facter as well; in both instances i > > > used the latest versions. > > > > There are a few issue, the most major of which atm seems to be this: > > > > undefined method `function_file'' for #<Puppet::Parser::Scope: > > > 0x7f7b32ee3540> > > > > NOne of the files have been altered. > > > > Anyone have any ideas? > > > > Thanks > > > Martin-- 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.
On Dec 16, 10:48 am, boddiesdrinker <martin.s...@gmail.com> wrote:> The template file has this code: > > relay = scope.function_file(["/etc/puppet/secrets/smtp/" + name + "/ > relay"]).chomp > > Could it be the form of the file function which has changed?According to the docs[1][2] it looks the same. The error you posted sounds like the puppet master can''t find the function/file.rb. It should be somwhere in the path like "ruby/site_ruby/1.8/puppet/parser/ functions/file.rb". On the master does this manifest work for you with ''puppet apply'': $content = file("/etc/motd") notify { $content: } [1] http://docs.puppetlabs.com/references/0.24.5/function.html#file [2] http://docs.puppetlabs.com/references/2.6.3/function.html#file -- 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.
On Dec 16, 10:48 am, boddiesdrinker <martin.s...@gmail.com> wrote:> The template file has this code: > > relay = scope.function_file(["/etc/puppet/secrets/smtp/" + name + "/ > relay"]).chomp > > Could it be the form of the file function which has changed?I''ve just opened an issue that you may be hitting in 2.6[1]. Does the puppet master appear to hang before you get the ''undefined method'' error? If you have debug you might see output like this: debug: Scope(Node[foo.domain.tld]): Retrieving template test.erb debug: template[/tmp/puppet/templates/test.erb]: Bound template variables for /tmp/puppet/templates/test.erb in 0.00 seconds err: Failed to parse template test.erb: undefined method `function_fqdn_rand'' for #<Puppet::Parser::Scope:0x2b37140ced30> at / tmp/puppet/manifests/site.pp:43 on node foo.domain.tld If so I believe it may be the same problem .Try using the first workaround in the ticket, it''s a trivial fix for the issue. You''ll need to make sure that the function is called in the manifest before you parse the template though. Putting something like ''$workaround file("/etc/puppet/secrets/smtp/relay")'' in site.pp should do it. [1] http://projects.puppetlabs.com/issues/5587 -- 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.
Donovan, yes it does. for quite a long time. it echos that its bound variables on the erb then sites there. the client times out and then eventually puppetmaster comes back with the error. Thanks, Martin On Fri, Dec 17, 2010 at 6:29 AM, donavan <donavan@desinc.net> wrote:> On Dec 16, 10:48 am, boddiesdrinker <martin.s...@gmail.com> wrote: > > The template file has this code: > > > > relay = scope.function_file(["/etc/puppet/secrets/smtp/" + name + "/ > > relay"]).chomp > > > > Could it be the form of the file function which has changed? > > I''ve just opened an issue that you may be hitting in 2.6[1]. Does the > puppet master appear to hang before you get the ''undefined method'' > error? If you have debug you might see output like this: > > debug: Scope(Node[foo.domain.tld]): Retrieving template test.erb > debug: template[/tmp/puppet/templates/test.erb]: Bound template > variables for /tmp/puppet/templates/test.erb in 0.00 seconds > err: Failed to parse template test.erb: undefined method > `function_fqdn_rand'' for #<Puppet::Parser::Scope:0x2b37140ced30> at / > tmp/puppet/manifests/site.pp:43 on node foo.domain.tld > > If so I believe it may be the same problem .Try using the first > workaround in the ticket, it''s a trivial fix for the issue. You''ll > need to make sure that the function is called in the manifest before > you parse the template though. Putting something like ''$workaround > file("/etc/puppet/secrets/smtp/relay")'' in site.pp should do it. > > > [1] http://projects.puppetlabs.com/issues/5587 > > -- > 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<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- "If we moved in next door, your lawn would die" Lemmy, Motorhead -- 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.
Donavan, took a while to get round to testing, but that worked. i now have to work out how to move the facts that are in place... Thanks for the help, Martin On Fri, Dec 17, 2010 at 7:46 AM, Martin Samm <martin.samm@gmail.com> wrote:> Donovan, > > yes it does. for quite a long time. > > it echos that its bound variables on the erb then sites there. > > the client times out and then eventually puppetmaster comes back with the > error. > > Thanks, > > Martin > > > On Fri, Dec 17, 2010 at 6:29 AM, donavan <donavan@desinc.net> wrote: > >> On Dec 16, 10:48 am, boddiesdrinker <martin.s...@gmail.com> wrote: >> > The template file has this code: >> > >> > relay = scope.function_file(["/etc/puppet/secrets/smtp/" + name + "/ >> > relay"]).chomp >> > >> > Could it be the form of the file function which has changed? >> >> I''ve just opened an issue that you may be hitting in 2.6[1]. Does the >> puppet master appear to hang before you get the ''undefined method'' >> error? If you have debug you might see output like this: >> >> debug: Scope(Node[foo.domain.tld]): Retrieving template test.erb >> debug: template[/tmp/puppet/templates/test.erb]: Bound template >> variables for /tmp/puppet/templates/test.erb in 0.00 seconds >> err: Failed to parse template test.erb: undefined method >> `function_fqdn_rand'' for #<Puppet::Parser::Scope:0x2b37140ced30> at / >> tmp/puppet/manifests/site.pp:43 on node foo.domain.tld >> >> If so I believe it may be the same problem .Try using the first >> workaround in the ticket, it''s a trivial fix for the issue. You''ll >> need to make sure that the function is called in the manifest before >> you parse the template though. Putting something like ''$workaround >> file("/etc/puppet/secrets/smtp/relay")'' in site.pp should do it. >> >> >> [1] http://projects.puppetlabs.com/issues/5587 >> >> -- >> 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<puppet-users%2Bunsubscribe@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> >> > > > -- > "If we moved in next door, your lawn would die" > Lemmy, Motorhead >-- "If we moved in next door, your lawn would die" Lemmy, Motorhead -- 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.