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

"Function lookup() did not find a value for the name 'classes' on node"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 5.0.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Agent
    • Sprint:
      Agent 2017-06-28
    • Method Found:
      Needs Assessment
    • Release Notes:
      Not Needed
    • Release Notes Summary:
      covered by general documentation about hiera
    • QA Risk Assessment:
      No Action

      Description

      Somewhere in between 78e175e6 and 27fdad2 of puppet, puppet server tests have started failing.

      Specifically, https://jenkins-master-prod-1.delivery.puppetlabs.net/job/platform_puppetserver_integration-system_no-conditional_smoke-master/366/LAYOUT=redhat7-64ma-windows2008r2-64a,LDAP_TYPE=default,label=beaker/consoleFull, with output:

      10:26:01 p7145rmqxgo7fs9.delivery.puppetlabs.net (redhat7-64-1) 17:26:01$ curl --silent --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem --key /etc/puppetlabs/puppet/ssl/private_keys/p7145rmqxgo7fs9.delivery.puppetlabs.net.pem --cert /etc/puppetlabs/puppet/ssl/certs/p7145rmqxgo7fs9.delivery.puppetlabs.net.pem https://p7145rmqxgo7fs9.delivery.puppetlabs.net:8140/puppet/v3/catalog/p7145rmqxgo7fs9.delivery.puppetlabs.net?environment=production | python -m json.tool
      10:26:01   {
      10:26:02       "issue_kind": "RUNTIME_ERROR",
      10:26:02       "message": "Server Error: Function lookup() did not find a value for the name 'classes' on node p7145rmqxgo7fs9.delivery.puppetlabs.net"
      10:26:02   }
      10:26:02 
      10:26:02 p7145rmqxgo7fs9.delivery.puppetlabs.net (redhat7-64-1) executed in 1.00 seconds
      10:26:02 Minitest::Assertion: FAIL: Expected catalog to contain current_code_id 3aafbd686b0f884f4519de1ebd6fdac5d2454d14..
      

      On repro, the actual stack trace from logs is https://gist.github.com/MosesMendoza/4cdedf11fb92c137404a29b28d137a48.

      Update
      This is the result of laying down a hiera 5 yaml file in puppet instead of the previous default hiera yaml file provided by the hiera project.

      This was done in https://github.com/puppetlabs/puppet/commit/7178bf1850c1addc40b5cc31a29aa4add09f34a9. The puppet install.rb runs after the hiera install.rb during the puppet agent build process, so the hiera.yaml from hiera is overwritten by the hiera.yaml from puppet.

      The new default does not specify the same hierarchy, so lookup now fails where it previously succeeded.

      This is problematic because the original hiera.yaml file was never modified - which means package managers won't back it up given a new one (the hiera 5 yaml) on upgrade. If users were relying on the previous behavior their lookups will fail.

        Attachments

          Activity

            People

            Assignee:
            tony.juric Tony Juric
            Reporter:
            moses Moses Mendoza
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support