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

Hashes with dots in hiera will no longer fail a puppetrun

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: PUP 4.9.4
    • Fix Version/s: PUP 4.10.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      RHEL7

    • Template:
    • Team:
      Puppet Developer Experience
    • Story Points:
      1
    • Sprint:
      PDE 2017-03-22, PDE 2017-04-05
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      A regression in hiera 5 caused an error to not be issued when calls to any of the hiera_* functions contained an unescaped period {{.}} in the requested key. There is no such restriction when the {{lookup}} function is used. The regression caused silent undefined behavior. This is now fixed and the earlier behavior of the hiera_* functions have been restored.
      Show
      A regression in hiera 5 caused an error to not be issued when calls to any of the hiera_* functions contained an unescaped period {{.}} in the requested key. There is no such restriction when the {{lookup}} function is used. The regression caused silent undefined behavior. This is now fixed and the earlier behavior of the hiera_* functions have been restored.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      covered by unit tests

      Description

      We are in tihe process of moving to puppet 4. One of the issues we encountered with puppet 4.8.2 (puppet-agent 1.8.3) was that when trying to read a hash from hiera that contained a dot in the name. We used 4.8.2 first as 4.9.3 was giving us a lot of issues. However, with the release of 4.9.4, most were fixed so we switched to that. However, I noticed a regression has slipped in where hashes with dots in the name are no longer failing a puppetrun. In fact, they are silently ignored (leaving your resources unmanaged!). The puppetserver also doesn't print any warning about using illegal hash names.

      Example hash that should fail:

      my.hash:
        some: value
        another: value
      

      With puppet 4.8.x, reading this hash with hiera_hash fails the run with:

      Evaluation Error: Error while evaluating a Function Call, Resolution type :hash is illegal when accessing values using dotted keys. Offending key was ....

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rkool Roland Kool
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support