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

Failing mapped_paths don't get explained by lookup --explain

    XMLWordPrintable

Details

    • The --explain output for {{mapped_paths}} have been improved when there are errors in the input. Earlier, the explain output simply did not output anything if something was wrong.
    • Manual

    Description

      If you set a hierarchy level to use mapped_paths but the fact you're trying to map does not exist, puppet lookup --explain does not tell you anything helpful about it. You just get one line:

              Hierarchy entry "Networks"
      

      In my case, I was using an old version of facter that didn't support the networking fact, but I had to go through a whole lot of extra sleuthing to figure out what --explain should have told me.

      The explain output should give useful help for the following cases:

      • The mapped variable is not set, so there's nothing to map.
      • The mapped variable isn't mappable, because it's a string/bool/number/undef.
      • You've made the wrong assumptions in the path template, and are trying to access subkeys that aren't what you expect. <string>.1, or something.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nick.fagerlund Nicholas Fagerlund
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support