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

puppet lookup command too verbose: implied application of manifest (site.pp by default) and all its output

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 4.3.0, PUP 4.3.1
    • Fix Version/s: PUP 4.3.2
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2016-01-13
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      The lookup command always compiled the entire catalog before performing the actual lookup of the given key. While correct, it can potentially be very time consuming, and produce unwanted logging. Since a full compilation is typically a special case (normally values does no interpolate arbitrary global puppet variables). A full compilation is now available for those that have data that is configured with interpolation of arbitrary (non fact/ENC variables) by using the flag --compile. Without this flag the command uses an empty catalog
      Show
      The lookup command always compiled the entire catalog before performing the actual lookup of the given key. While correct, it can potentially be very time consuming, and produce unwanted logging. Since a full compilation is typically a special case (normally values does no interpolate arbitrary global puppet variables). A full compilation is now available for those that have data that is configured with interpolation of arbitrary (non fact/ENC variables) by using the flag --compile. Without this flag the command uses an empty catalog

      Description

      'puppet lookup symbol' is supposed to return the value of symbol as discovered by the lookup() function. There is an implied application of a manifest (production environment, site.pp by default). If these manifests generate output, then that becomes part of the output of the puppet lookup command.

      Here is an example using branch=master, sha = ef9569c59088b85ad8476695a24d479be0dfb376

      [root@lmrgtt9kjyg5esn manifests]# puppet --version
      4.3.0
      [root@lmrgtt9kjyg5esn manifests]# pwd
      /etc/puppetlabs/code/environments/production/modules/data_module/manifests
      [root@lmrgtt9kjyg5esn manifests]# cat init.pp
       
      class data_module(
      ) {
        notice("Hello from modules/data_module/manifests/init.pp!")
        notice("Goodbye from modules/data_module/manifests/init.pp!")
      }
      [root@lmrgtt9kjyg5esn manifests]# puppet lookup data_module::key_in_module
      Notice: Scope(Class[Data_module]): Hello from modules/data_module/manifests/init.pp!
      Notice: Scope(Class[Data_module]): Goodbye from modules/data_module/manifests/init.pp!
      --- data_module1
      ...
      [root@lmrgtt9kjyg5esn manifests]#
      

      The expected value is only at the end of the output.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                sean Sean Griffin
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support