Uploaded image for project: 'Hiera'
  1. Hiera
  2. HI-544

Hiera should error if it finds a v4 hiera.yaml

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: HI 3.3.1
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Agent
    • Story Points:
      1
    • Sprint:
      PDS 2016-11-30
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      Hiera now errors if it is given a configuration file `hiera.yaml` that uses the version 4 format as that is only available in environments and modules. Earlier hiera just silently ignored its content and no keys were given values. Now there is a clear error if a version 4 configuration file ends up in the wrong place.
      Show
      Hiera now errors if it is given a configuration file `hiera.yaml` that uses the version 4 format as that is only available in environments and modules. Earlier hiera just silently ignored its content and no keys were given values. Now there is a clear error if a version 4 configuration file ends up in the wrong place.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      low risk, covered well by unit tests

      Description

      With the introduction of the hiera.yaml version 4 format used by lookup (a format that is now also deprecated, but starting to see more use in its experimental form) it is a common mistake to try to point to an environment's hiera.yaml via the puppet setting --hiera_config. The end result is that hiera gets a v4 version config to read.

      When hiera reads a configuration there is no checking of what was actually read in terms of excess information. The configuration will look like an empty configuration to hiera and it silently just returns nothing on each request.

      Instead, hiera should error explicitly if given a v4 hiera.yaml to read as its configuration. The error should tell the user that a "v4 hiera.yaml is only to be used inside an environment or a module and cannot be given to the global hiera"

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              henrik.lindberg Henrik Lindberg
              QA Contact:
              Eric Thompson
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support