Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-5168

puppet lookup fails with "--compile" option when using module puppet_agent

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • puppet_agent 1.4.1
    • puppet_agent
    • None
    • OS : CentOS 7.3
      Puppet version :
      puppet-agent-1.10.0-1.el7.x86_64
      puppetserver-2.7.2-1.el7.noarch
      puppetlabs-release-pc1-1.1.0-5.el7.noarch
      puppetdb-terminus-2.3.8-1.el7.noarch

    • Needs Assessment
    • Bug Fix
    • strict_variables and "puppet lookup" will now succeed when the puppet_agent module is used.
    • Needs Assessment

    Description

      When using "puppet lookup" from the puppet master, when "--compile" is used (required with my configuration normally), if the puppet module "puppet_agent" is called, an error is raised and the lookup is stopped.

      Example :

      puppet lookup --node vmlabdbm02.rsvgnw.local --compile --environment=lab global::ldapauth
      Warning: Undefined variable '::global::sector::sector'; class ::global::sector has not been evaluated
         (file & line not available)
      Warning: /etc/puppetlabs/code/environments/lab/hiera/team/IT.yaml: file does not contain a valid yaml hash
      Warning: /etc/puppetlabs/code/environments/lab/hiera/application/all.yaml: file does not contain a valid yaml hash
      Warning: /etc/puppetlabs/code/environments/lab/hiera/datacenter/all.yaml: file does not contain a valid yaml hash
      Warning: ModuleLoader: module 'puppet_agent' has unresolved dependencies - it will only see those that are resolved. Use 'puppet module list --tree' to see information about modules
         (file & line not available)
      Error: Could not run: Evaluation Error: Error while evaluating a Function Call, The puppet_agent class requires stringify_facts to be disabled at /etc/puppetlabs/code/environments/lab/modules/puppet_agent/manifests/params.pp:9:5
      

      If the "--compile" option is not given, the lookup is successful.

      However, nothing to report on the client side : the run of the agent on a node is successful, only the "puppet lookup --compile" on the server fails.

      The puppet_agent module has this code :

        if $::puppet_stringify_facts {
          fail('The puppet_agent class requires stringify_facts to be disabled')
        }
      

      $::puppet_stringify_facts is false on the client, but not during a "lookup --compile" run on the master.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ybroccard Yvan Broccard
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support