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

puppet lookup command returns warning with poor formatting

    Details

    • Type: Task
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: PUP 5.5.2
    • Fix Version/s: None
    • Component/s: None
    • Template:
    • Team:
      Puppet Developer Experience
    • Sprint:
      Forge - To Accept
    • CS Priority:
      Reviewed

      Description

      When performing a hiera lookup against a hierarchy that includes an undefined variable, the warning message that Puppet returns includes a new line marker:

      [root@pe-201812-master ~]# puppet lookup "foo"
      Warning: Undefined variable 'bar'; \n   (file & line not available)
      

      Otherwise the lookup appears to perform as intended:

      [root@pe-201812-master ~]# puppet lookup "foo" --explain
      Warning: Undefined variable 'bar'; \n (file & line not available)
      Searching for "lookup_options"
       Global Data Provider (hiera configuration version 5)
       Using configuration "/etc/puppetlabs/puppet/hiera.yaml"
       Merge strategy hash
       Hierarchy entry "Classifier Configuration Data"
       No such key: "lookup_options"
       Hierarchy entry "Missing Var"
       Path "/etc/puppetlabs/puppet/data/.yaml"
       Original path: "%{bar}.yaml"
       Path not found
       Environment Data Provider (hiera configuration version 5)
       Using configuration "/etc/puppetlabs/code/environments/production/hiera.yaml"
       Hierarchy entry "Common"
       Path "/etc/puppetlabs/code/environments/production/hieradata/common.yaml"
       Original path: "common.yaml"
       No such key: "lookup_options"
      Searching for "foo"
       Global Data Provider (hiera configuration version 5)
       Using configuration "/etc/puppetlabs/puppet/hiera.yaml"
       Hierarchy entry "Classifier Configuration Data"
       No such key: "foo"
       Hierarchy entry "Missing Var"
       Path "/etc/puppetlabs/puppet/data/.yaml"
       Original path: "%{bar}.yaml"
       Path not found
       Environment Data Provider (hiera configuration version 5)
       Using configuration "/etc/puppetlabs/code/environments/production/hiera.yaml"
       Hierarchy entry "Common"
       Path "/etc/puppetlabs/code/environments/production/hieradata/common.yaml"
       Original path: "common.yaml"
       No such key: "foo"
      Function lookup() did not find a value for the name 'foo'
      

        Attachments

          Activity

            People

            • Assignee:
              henrik.lindberg Henrik Lindberg
              Reporter:
              paul.schaffer Paul Schaffer
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support