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

hiera: YAML.load_file('/dev/null') returns `false`, instead of a hash

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.9.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      Hide

      The lookup framwork uses a default Hiera 3 configuration when the hiera.yaml file exists but is empty (as is the case for /dev/null).

      Show
      The lookup framwork uses a default Hiera 3 configuration when the hiera.yaml file exists but is empty (as is the case for /dev/null ).
    • Team:
      Puppet Developer Experience
    • Story Points:
      1
    • Sprint:
      PDE 2017-01-11
    • Release Notes:
      Not Needed
    • Release Notes Summary:
      The bug was found in unreleased code.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      covered by unit tests

      Description

      331778e from PUP-6980 caused hiera to call YAML.load_file('/dev/null') in some situations, which returns `false`, instead of a hash, leading to failures. This e.g. breaks rspec-puppet's setup shenanigans: https://github.com/rodjek/rspec-puppet/issues/434

      That link also has a stack-trace and travis log showing the problem.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              david.schmitt David Schmitt
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support