Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-11136

When Upgraded Puppet 5 to 6, Unable to Render ERB files via Template Function.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Cannot Reproduce
    • Affects Version/s: PUP 6.15.0
    • Fix Version/s: None
    • Component/s: Compiler
    • Labels:
      None
    • Template:
      PUP Bug Template
    • Affects Build:
      6.15.3
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 6.15.0
      Puppet Server Version: 6.15.3
      OS Name/Version: Centos 7.8
      Ruby Version: ruby 2.0.0p648 (2015-12-16) [x86_64-linux]

      We have upgraded puppet 5 to 6, then executed our one module which was using templates, it was of course using template function to invoke erb file but on puppet agent run it gives following error:- 

      Info: Using configured environment 'production'
      Info: Retrieving pluginfacts
      Info: Retrieving plugin
      Info: Retrieving locales
      Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, undefined method `[]' for Puppet::Pops::Loader::RubyLegacyFunctionInstantiator::Puppet:Module (file: /etc/puppet/environments/production/modules/test/manifests/init.pp, line: 4, column: 20) on node xxxxxxxxxxxxxxx
      Warning: Not using cache on failed catalog
      Error: Could not retrieve catalog; skipping run

      Content of init.pp:- 

      class test{

      file

      { 'test': content => template('test/test.erb'), ensure => file, path => '/etc/test', }

      Desired Behavior: Should Render erb file.

      Actual Behavior: gives of Error 500 with "undefined method `[]'"

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            vegeta007 Gurender
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support