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

The yaml_data function used by lookup should return empty hash for empty yaml files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 4.9.0
    • Fix Version/s: PUP 4.9.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      Ubuntu 16.04, Puppet Server 4.9.0

    • Template:
    • Team:
      Puppet Developer Experience
    • Story Points:
      1
    • Sprint:
      PDE 2017-02-08
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hiera 5 introduced a regression that when a yaml data file was read, and it was empty this would lead to an error "Expected Hash, got Boolean". This is now fixed.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      covered by unit tests

      Description

      Since upgrading to 4.9.0 my Puppet installation is throwing errors up about lookup_options not being found in Hiera.

      Full error:

      Info: Using configured environment 'ci'
      Info: Retrieving pluginfacts
      Info: Retrieving plugin
      Info: Loading facts
      Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Lookup of key 'lookup_options' failed: Value returned from Hierarchy entry "yaml" has wrong type, expects a Hash value, got Boolean in Value returned from Hierarchy entry "yaml" has wrong type, expects a Hash value, got Boolean at /etc/puppetlabs/code/modules/klxnginx/manifests/init.pp:4:3 on node klx-ci
      Warning: Not using cache on failed catalog
      Error: Could not retrieve catalog; skipping run
      

      Line 4 of klxnginx/manifests/init.pp is as follows:

      class { 'nginx' : }
      

      which references the Puppet NGINX module

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            joshbrw Josh Brown
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support