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

Module consistently says it can't find the type_of function

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:
    • QA Risk Assessment:
      Needs Assessment

      Description

      The Problem

      I managed to create a module that can't seem to find the type_of function, I have stdlib installed and when I try to run this branch of the module it consistently says it can't find the type_of function. I spent some time working with Reid Vandewiele and he tried cloning it down and he had the same issue on his own setup.

      https://github.com/npwalker/puppetdb_gc/tree/cannot_find_type_of_function_error

      Reid and I spent a few hours looking at it and trying some different things to determine a root cause and we couldn't narrow it down.

      He recreated a small sample of just a module with a defined type that used the type_of function and that worked so we were at a loss for what the issue might be.

      Reproduction

      puppet module install puppetlabs/stdlib
      cd /etc/puppetlabs/code/environments/production/modules
      git clone https://github.com/npwalker/puppetdb_gc
      cd puppetdb_gc
      git checkout cannot_find_type_of_function_error
      puppet apply -e "include puppetdb_gc"
      

      The issue is occurring on PE 2016.4.2 which uses puppet-agent 1.7.1

      More reproduction

      I've also confirmed the issue using puppet-agent 1.8.1.

      [root@agent-181-centos puppetdb_gc]# puppet apply -e "include puppetdb_gc"
      Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Unknown function: 'type_of'. at /etc/puppetlabs/code/environments/production/modules/puppetdb_gc/manifests/gc_cron.pp:12:29  at /etc/puppetlabs/code/environments/production/modules/puppetdb_gc/manifests/init.pp:30 on node agent-181-centos.puppetdebug.vlan
      [root@agent-181-centos puppetdb_gc]# puppet --version
      4.8.1
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              nick.walker Nick Walker
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support