Upgrade from puppet 5 to puppet 6

78 views
Skip to first unread message

Aditya Gupta

unread,
Jun 18, 2020, 11:08:45 AM6/18/20
to Puppet Users
Hello All,

Recently i have updated from puppet-5 to puppet-6 but after upgrade my erb stop working.
It is throwing error:

Error: Error while evaluating a Function Call, undefined method `[]' for Puppet::Pops::Loader::RubyLegacyFunctionInstantiator::Puppet:Module 

Simple resource: 
    file { '/etc/libvirt/libvirtd.conf':
        ensure  => file,
        path    => '/etc/libvirt/libvirtd.conf',
        content => template('kvm/libvirtd.conf.erb'),
    }


Please suggest.

Thanks,
Aditya

Justin Stoller

unread,
Jun 18, 2020, 4:15:24 PM6/18/20
to puppet...@googlegroups.com
providing the erb template would be valuable, if possible.

The error looks like someone defined new constants w/in a custom function file.
Is your erb file calling a custom function?

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/d541414b-9f12-4d0b-8abf-ecd00f67747ao%40googlegroups.com.

Aditya Gupta

unread,
Jun 24, 2020, 12:31:25 PM6/24/20
to Puppet Users
Same error is coming even erb file is empty.


On Friday, June 19, 2020 at 1:45:24 AM UTC+5:30, Justin Stoller wrote:
providing the erb template would be valuable, if possible.

The error looks like someone defined new constants w/in a custom function file.
Is your erb file calling a custom function?

On Thu, Jun 18, 2020 at 8:08 AM Aditya Gupta <aditya...@gmail.com> wrote:
Hello All,

Recently i have updated from puppet-5 to puppet-6 but after upgrade my erb stop working.
It is throwing error:

Error: Error while evaluating a Function Call, undefined method `[]' for Puppet::Pops::Loader::RubyLegacyFunctionInstantiator::Puppet:Module 

Simple resource: 
    file { '/etc/libvirt/libvirtd.conf':
        ensure  => file,
        path    => '/etc/libvirt/libvirtd.conf',
        content => template('kvm/libvirtd.conf.erb'),
    }


Please suggest.

Thanks,
Aditya

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet...@googlegroups.com.

Ben Ford

unread,
Jun 24, 2020, 1:14:14 PM6/24/20
to puppet...@googlegroups.com
That sounds like the server isn't compiling the code that you think it is. Can you first restart puppetserver to ensure that it's not just cached, and then check that you're deploying code correctly and that you're using the right environment, etc.

Also, try commenting out the resource causing the problem and just ensure that you're even looking at the right code!



To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/228686bf-5111-4b99-aa84-84fc3758c00bo%40googlegroups.com.

Justin Stoller

unread,
Jun 24, 2020, 1:54:01 PM6/24/20
to puppet...@googlegroups.com
On Wed, Jun 24, 2020 at 9:31 AM Aditya Gupta <aditya...@gmail.com> wrote:
Same error is coming even erb file is empty.

Have you changed the content of the included template function or written your own?
However, I can't imagine the Puppet module being undefined when loading a ruby function.
Is this running within Puppet Server as a normal catalog compilation or is this happening when executing a different tool that might bootstrap Puppet differently?
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/228686bf-5111-4b99-aa84-84fc3758c00bo%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages