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

Puppet lookup invocation recursion detection not thread-safe

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 6.12.0
    • Component/s: None
    • Labels:
      None
    • Template:
      PUP Bug Template
    • Team:
      Froyo
    • Method Found:
      Customer Feedback
    • Release Notes:
      Not Needed
    • QA Risk Assessment:
      Needs Assessment

      Description

      Initial production testing by Customer0 with Puppet in multithreaded mode has revealed that the code to detect recursive hiera lookups is not thread-safe:

      2020-01-07T08:41:31.500-08:00 ERROR [qtp612319309-15848] [puppetserver] Puppet Evaluation Error: Error while evaluating a Resource Statement, Lookup of key 'ntp::config_template' failed: Recursive lookup detected in [epel::epel_debuginfo_sslclientkey, ntp::tinker, ntp::leapfile, ntp::config_template] (file: /etc/puppetlabs/code/environments/production/site/profile/manifests/time.pp, line: 2, column: 3) on node ldap-testfixture-prod-2.delivery.puppetlabs.net
      

      These errors come from https://github.com/puppetlabs/puppet/blob/master/lib/puppet/pops/lookup/invocation.rb#L84. Current theory is that since the @current class variable is not thread-safe, if multiple threads look for the same key at the same time, this error could occur. In their environments, this was happening when doing automatic lookup of class params via hiera.

        Attachments

          Activity

            People

            Assignee:
            maggie Maggie Dreyer
            Reporter:
            maggie Maggie Dreyer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support